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 Mitchell 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 tfr\bin\roslyn\ directory, but rather the {outdir}\roslyn\ directory

Add this code in your .csproj file:

<Target Name="CopyRoslynFiles" AfterTargets="AfterBuild" Condition="!$(Disable_CopyWebApplication) And '$(OutDir)' != '$(OutputPath)'"><ItemGroup><RoslynFiles Include="$(CscToolPath)\*" /></ItemGroup><MakeDir Directories="$(WebProjectOutputDir)\bin\roslyn" /><Copy SourceFiles="@(RoslynFiles)" DestinationFolder="$(WebProjectOutputDir)\bin\roslyn" SkipUnchangedFiles="true" Retries="$(CopyRetryCount)" RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" /></Target>

Viewing all articles
Browse latest Browse all 62

Trending Articles