Azure Web Deploy "Could not find part of path" D: \ home \ site \ wwwroot \ bin \ roslyn \ csc.exe "."

I browse the web for a couple of hours looking for an answer to my problem. I am trying to deploy a web API in Azure Web App Service using VS2017. Everything works and works fine when running locally, but after deploying to Azure (via VS2017) I get this error:

D: \ main \ site \ Wwwroot \ Bin \ Roslyn \ csc.exe

My project is an ASP.NET web application (using the Azure API template) .. NET Framework 4.6.1. I am using Microsoft.CodeDom.Providers.DotNetCompilerPlatform Version=1.0.6.0

I also made sure csc.exe is located in:

Visual Studio 2017\Projects\DeviceManagementAPI\DeviceManagementAPI\bin\roslyn

+5
source share
4 answers

I had the same problem and it seems to be a known issue with Microsoft.CodeDom.Providers.DotNetCompilerPlatform 1.0.6 and 1.0.7 .

Decreasing to 1.0.5 solves the problem.

+1
source

After a while, I simply manually uploaded the roslyn file directly to the server via Kudu. The problem seems to be resolved, but I still don't know why it won't load automatically.

0
source

Updating Microsoft.CodeDom.Providers.DotNetCompilerPlatform to 1.08 worked for me

0
source

The same problem may be caused by a missing or incorrect relative package . If you change the structure of the solution folders, make sure that all importers have the correct path so that they do not skip Roslyn files.

As a rule, suggest replacing the automatically generated rabit hole with the number t20>, which points to the correct Nuget folder.

 <Import Project="$(NugetPackagesPath)\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('$(NugetPackagesPath)\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" /> 
0
source

Source: https://habr.com/ru/post/1270722/


All Articles