刚刚下载了适用于 Mac 的 Visual Studio Professional,我似乎无法构建任何东西,因为我总是遇到相同的错误:
/Library/Frameworks/Mono.framework/Versions/4.8.0/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) ->
CSC: error CS0041: Unexpected error writing debug information -- 'Operation is not supported on this platform.'
19 Warning(s)
1 Error(s)
不知道要在我的项目上更改什么才能编译。
最佳答案
我可以通过两种方式解决这个问题:
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Net.Compilers" version="1.0.0" targetFramework="net45" developmentDependency="true" />
目前尚不清楚删除这两个包会牺牲什么。这确实允许我构建包含调试信息的受影响项目。受影响的项目仅包含 webapi 端点,并没有使用 MVC 和 Razor 引擎。如果他们在此更改的上游遇到问题,很高兴听到其他人的经验。
HTH
关于mono - CSC : error CS0041: Unexpected error writing debug information -- 'Operation is not supported on this platform.' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40639999/