问题描述
我正在尝试在Mac上使用monodevelop构建一个Web api项目.事实是,打了几个小睡(原来这个问题太乱了,我刚刚删除了一个问题),我明白了要弄懂这个错误的地方
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)
在Windows计算机中,相同的项目使用针对Mono 4.5的Visual Studio构建.
In a windows machine the same project builds using visual studio targeting mono 4.5.
当我单击错误时,它告诉我/Users/myuser/git/LiveData/LiveData/CSC不存在
When I click on the error it tells me that /Users/myuser/git/LiveData/LiveData/CSC doesn't exist
另一件事是,在该解决方案的文件夹结构中有一个package文件夹(不是项目内部的文件夹),在此文件夹中,我有一个名为Microsoft.Net.Compilers 1.3.2的文件夹,该文件夹在另一个名为工具"中找不到csc.exe和dll.
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.
我尝试使用nuget直接在项目中安装dll,但是即使已安装,该版本也向我显示了相同的错误
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
谢谢
推荐答案
至于目前的解决方法,您可以仅限制使用Microsoft.Net.Compilers来发布配置(编辑* .csproj文件):
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')" />
看看病情的开始:
'$(Configuration)' == 'Release'
这样,我可以在本地构建和调试并构建我的项目,即.在热烈的欢迎中.
This way I can build and debug locally and build my project ie. in appharbor.
这篇关于Monodevelop无法建立,找不到Microsoft.DiaSymReader.Native.x86.dll'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!