Wednesday, May 20, 2015

How to fix ASP.NET MVC Bundle not working (not rendering script files)

To my case, it is because System.Web.Optimization  is version 1.0.0
After getting the latest version (1.3), everything is fine

How to fix "The target GatherAllFilesToPublish does not exist"

By adding following section into Project file:

<Target Name="GatherAllFilesToPublish">
</Target>



Wednesday, May 13, 2015

How to apply i18n to support multiple languages in ASP.NET MVC?


For ASP.NET MVC part: Functions to switch language and get resource by culture:
http://www.codeproject.com/Articles/262917/i-n-globalization-with-gettext-and-asp-net-mvc
javascript -> cookie -> Base Controller/Razor view base page -> i18n lib functions

http://gnuwin32.sourceforge.net/packages/gettext.htm

How to edit PO files
#1 Online editor: edit, add, and delete etc.
https://localise.biz/free/poeditor
#2 Local open source app
http://sourceforge.net/projects/betterpoeditor/

Monday, May 11, 2015

C# Safe Navigation Operator ?.

Read code to understand:

var g1 = parent?.child?.child?.child;
if (g1 != null) // TODO


http://blogs.msdn.com/b/jerrynixon/archive/2014/02/26/at-last-c-is-getting-sometimes-called-the-safe-navigation-operator.aspx