4

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,

mitomed
  • 2,006
  • 2
  • 29
  • 58
  • what version of MonoDevelop is this? what's the Microsoft.DiaSymReader assembly? – knocte Jul 18 '16 at 11:05
  • Xamarin Studio 5.10. Regarding the dll not sure if I get your question, you mean the version? – mitomed Jul 18 '16 at 11:28
  • no, I mean what I wrote: what is it, where does that come from? why does the compilation require it? – knocte Jul 18 '16 at 11:31
  • Oh, afaik is an implementation for reading and writing pdb files – mitomed Jul 18 '16 at 11:33
  • MonoDevelop 5.10 doesn't use roslyn but the Mono compiler, so the compilation shouldn't be dealing with Microsoft tools to read pdb files at all, not sure what the hell happened there – knocte Jul 18 '16 at 11:45
  • Yeah, well. I will try to spend more time today on this. Thanks – mitomed Jul 18 '16 at 11:52
  • Any progress/ insight to this? We are running into same issue. – Patrick Aug 01 '16 at 13:46
  • @Patrick unfortunately not, gave up eventually until I can have more time for this project. So would really appreciate if you post any update – mitomed Aug 03 '16 at 07:05

3 Answers3

2

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.

mgibas
  • 408
  • 4
  • 14
1

Building the project in release configuration should fix it!

sschmid
  • 11
  • 2
0

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
Somdip Dey
  • 3,346
  • 6
  • 28
  • 60