Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't add reference to project, Visual studio

I have created a project container In Visual studio. In this container, I have added three projects: A class library, a ASP .NET MVC Application and a Unit Test application.

Now, Im trying to add references between this projects. When Im trying to add a reference to my class library from my .NET MVC Application, I get an error that says that the reference could not be added.

Why do I get this error? Why can't I add a reference from my class library, to my mvc application?

like image 289
Bryan Avatar asked Feb 15 '26 19:02

Bryan


1 Answers

For future reference you really need to tell the versions on what you're using : Visual Studio?, ASP.NET MVC?, and .net Framework? as Ufuk mentioned. I'll assume you mean ASP.NET 5 vNext, as I know this has an issue.

Firstly, look at other posts: Issue adding reference to class library project in ASP.NET 5 (Core)

And secondly, if it's similar to what I experienced, there appears to be a bug in the beta7, so try adding a file reference: https://stackoverflow.com/a/32399377/2537017

(That's assuming you've removed the dnxcore50 so it can use the new class library).

like image 59
JamesDill Avatar answered Feb 18 '26 08:02

JamesDill