简体   繁体   中英

Publish: Could not find a part of the path … \obj\DEV\AspnetCompileMerge\Source\bin\roslyn\csc.exe'

I recently added the new .NET compiler NuGet packages (Microsoft.CodeDom.Providers.DotNetCompilerPlatfor) to an existing older MVC.NET website. Now when trying to publish the website I get the following exception:

Could not find a part of the path … \\obj\\DEV\\AspnetCompileMerge\\Source\\bin\\roslyn\\csc.exe'

I have tried everything mentioned in this question , but nothing worked. It is, after all, a slightly different problem. The problem mentioned in that post is build exceptions, my solution builds fine locally. Uninstalling the NuGet packages works, but that's not really a solution.

The issue is basically the same as this one, but that also has no solution.

Publish output:

4>------ Publish started: Project: Jdn.ArticleCatalogue.Web, Configuration: DEV Any CPU ------
4>Connecting to \\vm-arcawebdev01\WEBSITES\ArticleCatalogue...
4>Transformed Web.config using D:\DOTNET\Local\Logistics.Web\Portal\DEV\Application Projects\Article Catalogue\Jdn.ArticleCatalogue.Web\Web.DEV.config into obj\DEV\TransformWebConfig\transformed\Web.config.
4>Copying all files to temporary location below for package/publish:
4>obj\DEV\AspnetCompileMerge\Source.
4>C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v / -p "D:\DOTNET\Local\Logistics.Web\Portal\DEV\Application Projects\Article Catalogue\Jdn.ArticleCatalogue.Web\obj\DEV\AspnetCompileMerge\Source" "D:\DOTNET\Local\Logistics.Web\Portal\DEV\Application Projects\Article Catalogue\Jdn.ArticleCatalogue.Web\obj\DEV\AspnetCompileMerge\TempBuildDir" -keyfile "..\..\..\Solution Items\Jdn.LogisticsPortal.snk" 
4>ASPNETCOMPILER(0,0): Error ASPRUNTIME: Could not find a part of the path 'D:\DOTNET\Local\Logistics.Web\Portal\DEV\Application Projects\Article Catalogue\Jdn.ArticleCatalogue.Web\obj\DEV\AspnetCompileMerge\Source\bin\roslyn\csc.exe'.

Any ideas on how to solve this one?

This was a known issue whereby the Roslyn binary wasn't being copied correctly to the publish directory. It should be fixed if you install Microsoft.CodeDom.Providers.DotNetCompilerPlatform 1.0.7 .

There seem to be some residual issues which are being tracked here .

Same problem accourred to me while publish MVC .NET application to my local path. I solved the problem delete Microsoft.CodeDom.Providers.DotNetCompilerPlatform by nuget package.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM