Quantcast
Channel: Could not find a part of the path ... bin\roslyn\csc.exe - Stack Overflow
Viewing all articles
Browse latest Browse all 62

Answer by Korayem for Could not find a part of the path ... bin\roslyn\csc.exe

$
0
0

The problem with the default VS2015 templates is that the compiler isn't actually copied to the {outdir}_PublishedWebsites\tfr\bin\roslyn\ directory, but rather the {outdir}\roslyn\ directory. This is likely different from your local environment since AppHarbor builds apps using an output directory instead of building the solution "in-place".

To fix it, add the following towards end of .csproj file right after xml block <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">...</Target>

<PropertyGroup><PostBuildEvent>    if not exist "$(WebProjectOutputDir)\bin\Roslyn" md "$(WebProjectOutputDir)\bin\Roslyn"    start /MIN xcopy /s /y /R "$(OutDir)roslyn\*.*""$(WebProjectOutputDir)\bin\Roslyn"</PostBuildEvent></PropertyGroup>

Reference: https://support.appharbor.com/discussions/problems/78633-cant-build-aspnet-mvc-project-generated-from-vstudio-2015-enterprise


Viewing all articles
Browse latest Browse all 62

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>