Reputation: 1533
I upgraded to latest version of Xamarin Studio(5.0.878) in MAC OSX Mountain Lion . I have a basic setting with a PCL project - which contains .NET Portable subset as expected.
And I have an android project that refers to this PCL project. However when I include the PCL project in the references and try to compile - I get that error below:
/Library/Frameworks/Mono.framework/Versions/3.4.0/lib/mono/4.5/Microsoft.Common.targets: Error: Error executing task ResolveAssemblyReference: Could not load file or assembly '/Users/uakdemir/Projects/Likya/CoreLib/bin/Debug/System.Diagnostics.Tools.dll' or one of its dependencies. The system cannot find the file specified. (MyIncludedPCLProject)
Inside the .NET Portable subset (which is added as default by Xamarin) - I see the System.Diagnostics.Tools. I never refer to that namespace in my solution (I refer to System.Diagnostics).
No matter what I tried I was not able to get over that ResolveAssemblyReference error - there are some links on the web saying that it is a bug of xbuild - it was introduced in .NET 4.0 - with suggestions of reverting to .NET 3.5 - which I cannot since I will be using async and await in the project. Googling does not help either.
Is there a workaround you know for this ResolveAssemblyReference issue? Why is msbuild trying to look for an assembly that is supposed to be in the .NET Portable Subset for PCL in the output folder for the PCL library?
I may be missing some information since I am not much experienced with this error - please bear with me and ask any additional details that might be needed.
Thanks a lot
Upvotes: 3
Views: 2477
Reputation: 30114
What worked for me was:
c# project in Xamarin 5.9.8, OSX El Capitan
Upvotes: 2
Reputation: 234
I had the exact same error in Monodevelop with my F# project I am bootstrapping and what I did was close the solution and re-opened it and saw that I was prompted that updates for some of the packages in my project were available for download, so I installed the package updates and my project ran fine after that. So you might want to give that a try.
Upvotes: 1