0

Recently, my hosting server does not allow .exe files in server folders as part of server security. My problem is all my mvc projects contains .exe files as part of the published application (bin\roslyn\csc.exe). So whenever I upload my application the exe files have been removed and hence application shows error. Could you suggest any workaround for this issue.

1 Answers1

0

If you don't need the views to be compiled at runtime (edit the views after deployment), you can use pre-compilation.

From the Visual Studio publish configuration: Visual Studio Publish Configuration

Publish profile configuration PrecompileBeforePublish and EnableUpdateable:

<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
    <PrecompileBeforePublish>True</PrecompileBeforePublish>
    <EnableUpdateable>False</EnableUpdateable>
</PropertyGroup>

Also mentioned here: What / why is Roslyn "needed" in /bin folder of Asp.Net

kapsiR
  • 2,720
  • 28
  • 36