程序问答   发布时间:2022-06-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Could not find a part of the path … bin\roslyn\csc.exe大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决Could not find a part of the path … bin\roslyn\csc.exe?

开发过程中遇到Could not find a part of the path … bin\roslyn\csc.exe的问题如何解决?下面主要结合日常开发的经验,给出你关于Could not find a part of the path … bin\roslyn\csc.exe的解决方法建议,希望对你解决Could not find a part of the path … bin\roslyn\csc.exe有所启发或帮助;

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>

解决方法

I am trying to run Asp.net MVC project retrieved from TFS source control. I
have added all assembly references and I am able to build and compile
successfully without any error or warning.

But I get the following error in the browser:

Here is a full screenshot of the error page.

Could not find a part of the path … bin\roslyn\csc.exe

After few days of research,I understood that
Roslyn is .Net compiler platform that offers
advance compiling features. However,I do not understand why my build is
trying to find \bin\roslyn\csc.exe because I did not configure anything
related to Roslyn nor I intend to use Roslyn in my project.

大佬总结

以上是大佬教程为你收集整理的Could not find a part of the path … bin\roslyn\csc.exe全部内容,希望文章能够帮你解决Could not find a part of the path … bin\roslyn\csc.exe所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。