Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sven Temmerman 10 posts 112 karma points
    Apr 16, 2019 @ 05:44
    Sven Temmerman
    0

    Roslyn compiler

    Hi guys,

    I've uploaded a new site to the hosting envronment and that results in an error. "Could not find file '...\bin\roslyn\csc.exe'."

    I've contacted the hosting company and their response is that they do not allow exe files due to security reasons.

    Does anyone know a way to make Umbraco work without the Roslyn Compiler? The site is running on Umbraco 7.14.

    Thanks

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 16, 2019 @ 05:55
    Dave Woestenborghs
    101

    Hi Sven,

    I guess you are running modelsbuilder in pure live mode. You can check the web.config if it says

    <add key="Umbraco.ModelsBuilder.ModelsMode" value="PureLive" />
    

    Modelsbuilders in PureLive mode needs to be able to run the roslyn compiler (the exe files in \bin\roslyn)

    What you can on your local machine is change the Modelsbuilder mode to "Dll" in the web.config file.

    <add key="Umbraco.ModelsBuilder.ModelsMode" value="Dll" />
    

    After that go in Modelsbuilders dashboard again and click the "Generate Models" button.

    After that transfer your local bin folder and web.config to the hosting company.

    Dave

  • Sven Temmerman 10 posts 112 karma points
    Apr 16, 2019 @ 07:24
    Sven Temmerman
    0

    Thanks Dave, I'll try it when I get home from work.

  • Sven Temmerman 10 posts 112 karma points
    Apr 23, 2019 @ 13:18
    Sven Temmerman
    2

    Dave's solution worked fine. Just had to comment out the codedom lines from the web.config as well.

    <system.codedom>
    <compilers>
      <compiler language="c#;cs;csharp" extension=".cs"
        type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
        type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
    </compilers>
    

Please Sign in or register to post replies

Write your reply to:

Draft