Monodevelop fails to build, can't find Microsoft.DiaSymReader.Native.x86.dll'

这一生的挚爱 提交于 2020-01-13 11:48:29

问题


I am trying to build a web api project using monodevelop on a mac. The thing is that after a few hiccups (explained in a question that turned out to be so messy I have just deleted) I get to the point of getting this error

/Users/myuser/git/LiveData/LiveData/CSC: Error CS0041: Unexpected error writing debug information -- 'Windows PDB writer is not available -- could not find Microsoft.DiaSymReader.Native.x86.dll' (CS0041) (LiveData)

In a windows machine the same project builds using visual studio targeting mono 4.5.

When I click on the error it tells me that /Users/myuser/git/LiveData/LiveData/CSC doesn't exist

Another thing is that in the folder structure of the solution there's a package folder (not the one inside the project) and inside this one I have a folder called Microsoft.Net.Compilers 1.3.2 that has inside another folder called "tools" that contains among other things csc.exe and the dll thta can't be found.

I have tried to install the dll directly in the project using nuget but even if it was installed the build showed me the same error

Thanks,


回答1:


As for workaround for now you can just limit usage of Microsoft.Net.Compilers to Release configuration (edit *.csproj file):

<Import Project="..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props" Condition="'$(Configuration)' == 'Release' And Exists('..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props')" />

take a look at beginning of condition:

'$(Configuration)' == 'Release'

This way I can build and debug locally and build my project ie. in appharbor.




回答2:


Building the project in release configuration should fix it!




回答3:


This might not be completely related but may be helpful in some ways. Regarding the issue on 'could not find Microsoft.DiaSymReader.Native.x86.dll', have a look at this issue on GitHub: https://github.com/dotnet/cli/issues/3016

It seems like the solution is either:

  • Dependency to Microsoft.NETCore.Platforms needed for RID graph which was missing. Any package which has transitive dependency on it (like NETStandard.Library) could also make things work.
  • Adding dependency to "Microsoft.NETCore.Platforms": "1.0.1-" or
    "NETStandard.Library":"1.5.0-" make it work.
  • adding Microsoft.NETCore.Platforms works as well


来源:https://stackoverflow.com/questions/38413584/monodevelop-fails-to-build-cant-find-microsoft-diasymreader-native-x86-dll

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!