user2657943
user2657943

Reputation: 2748

Visual Studio 2015 can't find class library even though it builds

I'm trying to share a class library between an ASP.NET Core project and a Xamarin Forms project. So far I managed to make the project compile and actually work, however I have a problem referencing my file in Visual Studio.

As shown in the image below, it says it can't find the class library (even though there is a reference to it and it build/runs correctly!)

I found out that when I delete the classlibrary, and load the xproj file instead of the csproj file it works in the Asp.net core project, but then it doesn't work in xamarin anymore.

Any way to make it work in both projects?

Edit: This is the solution I am talking about: https://github.com/arnvanhoutte/Drivr

Upvotes: 0

Views: 2344

Answers (3)

Marvin Klar
Marvin Klar

Reputation: 1917

Visual Studio has sometimes issues like this. If you have a issue like this, copy the content from the class which is not found, delete it, create a new file/class with the name of the old file/class and paste the content. Save and your problem should be fixed.

Upvotes: 1

user2657943
user2657943

Reputation: 2748

Turns out the solution is to delete the .xproj files

Upvotes: 0

Chakra Jamdagneya
Chakra Jamdagneya

Reputation: 24

Set your classpath in project->properties

Upvotes: 0

Related Questions