Joseph Michael Pesch
VP Programming

Hosted Site Issues with Roslyn - This program is blocked by group policy. For more information, contact your system administrator

by 9. September 2018 12:24
NOTE: Had to remove package: Microsoft.CodeDom.Providers.DotNetCompilerPlatform
      Due to hosting limitation, throwing this error:
      This program is blocked by group policy. For more information, contact your system administrator
      Cannot execute a program. The command being executed was 
          "C:\InetPub\...\bin\roslyn\csc.exe" 
              /shared /keepalive:"10" /noconfig  
              /fullpaths @"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\bd40b76f\3452b533\33n50imf.cmdline"
       
NOTE: See nuget url for package details:
      https://www.nuget.org/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform
       
NOTE: Some of the new C# 6.0 language features if used in Views (MVC project) will not compile. 
      Many of my views use the ? null checking operator for accessing Model properties.  
      All of these views now return errors on my Godaddy hosted MVC 5 application.
      This error occurs because Views (by default) are compiled at runtime using the .NET pipeline (not pre-compiled).
      To resolve this issue, simply uncheck the "Allow precompiled site to be updatable" option in your publish profile settings.  
      This should pre-compile your views and allow your C# 6.0 (Latest version of Roslyn Compiler) to run like a champ.

Tags:

MVC

Comments are closed