I'm trying to use the following in a MSBUILD property in my project:
$([System.DateTime]::Now.ToString("MMMM", $([System.Globalization.CultureInfo]::CurrentCulture))) and getting the error:
Error MSB4185: The function "CurrentCulture" on type "System.Globalization.CultureInfo" is not available for execution as an MSBuild property function.
I’m trying to get the equivalent of this: DateTime.Now.ToString("MMMM", CultureInfo.CurrentCulture)
Can anyone suggest how can I fix this in my case.
I'm using it inside a .wixproj that sets ToolsVersion=4.0 in the Project tag. Looking at the log I see that it's using MSBUILD.exe with 12.0.30723.0 version.
I already looked at Error MSB4185: "System.Globalization.CultureInfo" has not been enabled for execution but I need something I can pass in the project instead of setting a commandline property.
Any help here is appreciated.
Regards, Rajesh