locked
Roslyn CSC.exe, Web API 2 on Hosting Server RRS feed

  • Pergunta

  • Hi there, I have been searching high and low for a solution to my challenge. I have recently upgraded to Visual Studio 2015, and I am using .NET Framework 4.5.2 for my Web API 2 project. I have done web api related projects previously on VS 2013, and everything works fine on the hosting environment. I am using GoDaddy.

    Problem:

    When I compiled and uploaded my web api project files to the hosting server, it tells me that there is a group policy error for executing the CSC.exe file within the Bin\roslyn\ folder.

    In VS 2013, when we compile our projects, there is no such folder for "roslyn".

    I have tried to read up about Roslyn but that doesn't seem to help me with my situation.

    Is there anyway can disable roslyn in my project? I desperately need a solution to this problem.

    Note: I am using a shared hosting environment. All my past projects have no issues (done with VS 2013).


    • Editado CryoWerx domingo, 26 de julho de 2015 07:01 edit text
    domingo, 26 de julho de 2015 07:01

Todas as Respostas

  • Hello,

    >>When I compiled and uploaded my web api project files to the hosting server, it tells me that there is a group policy error for executing the CSC.exe file within the Bin\roslyn\ folder

    According to your description, the third party hosting server throw this group policy with the upgraded project. Have you tried a new project created in VS 2015 and can it throw error again? I would recommend you put your question on third party hosting server support channel.

    Feel free to le me know if you have any concerns.

    Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    segunda-feira, 27 de julho de 2015 09:18
  • I also encountered this issue using Visual Studio Community with GoDaddy hosting. I was able to work around it by uninstalling the Roslyn package from my project. It's this package:

    https://www.nuget.org/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform

    I haven't yet determined if there's any drawbacks to uninstalling it, but when I published the application to GoDaddy I no longer got the group policy error and everything appears to be working fine.

    I don't know enough about the new platform to know if there's a hit from uninstalling it, but at least it's now working on GoDaddy. Here's more info that I'm continuing to read:

    http://blogs.msdn.com/b/webdev/archive/2014/05/12/enabling-the-net-compiler-platform-roslyn-in-asp-net-applications.aspx

    Best of luck.

    • Sugerido como Resposta Alan650 quarta-feira, 21 de junho de 2017 03:34
    terça-feira, 11 de agosto de 2015 10:21
  • I have noticed a minor drawback to uninstalling this package:

    https://www.nuget.org/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform

    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.

    • Sugerido como Resposta Arni Leibovits terça-feira, 16 de agosto de 2016 19:36
    quinta-feira, 24 de setembro de 2015 20:21
  • This absolutely did the trick. Perfect!

    -Thanks

    segunda-feira, 28 de setembro de 2015 21:34
  • awesome!!! spent half a day on this, you are the only one with a valid solution!!!!
    quarta-feira, 30 de setembro de 2015 11:46
  • After 2 days, search ended on your answer. thanks dear.
    segunda-feira, 19 de outubro de 2015 01:23
  • Somehow, in godaddy's "shared" server hosting, I still get the "group policy" vieolation security issue. :(

    Could pre-compiling the web app fix the issue? 'haven't tried it, 'just thought to ask anyways, maybe some people will know.

    Tx

    sexta-feira, 23 de outubro de 2015 22:27
  • Worked like a charm! Saved me from having to upgrade to "private hosting", as per GoDaddy tech support.

    

    terça-feira, 10 de novembro de 2015 18:43
  • Nailed it, thanks!  
    quarta-feira, 2 de dezembro de 2015 19:29
  • Hi,

    I am getting same issue while deploying on GoDaddy. Do I need to uninstall Roslyn?

    segunda-feira, 7 de março de 2016 05:48
  • Hi,

    I am getting same issue while deploying on GoDaddy. Do I need to uninstall Roslyn?

     I did it and worked like a charm!
    domingo, 26 de junho de 2016 11:47
  • I follow the same steps, but now when I navigate to site/api/apicontrollername I am getting 500 error.. whereas on local IIS server its work without any error.. 
    sábado, 25 de fevereiro de 2017 04:56
  • csc.exe compiler error after publish

    comment below in web.config

        <!--<compilers>
          <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.3.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.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
        </compilers>-->
    sexta-feira, 7 de abril de 2017 15:51
  • Thank you much for the tip!

    After my hours and calls to Go Daddy Support

    A simple check mark does the trick

    sábado, 29 de abril de 2017 13:14
  • Great question and this site seems to be the only one with the correct answer.
    quarta-feira, 21 de junho de 2017 03:34
  • thanks
    segunda-feira, 3 de julho de 2017 13:29
  • I tried but its still the same
    segunda-feira, 3 de julho de 2017 19:01
  • yes they are asking to upgrade to private hosting. I unchecked the "Allow precompiled site to be updatable" option in my publish profile settings. but still the same error
    segunda-feira, 3 de julho de 2017 19:27
  • Great tips, Thanks
    quinta-feira, 1 de março de 2018 18:38