M.E_
M.E_

Reputation: 87

How to allow .Net Unit Testing to Reference .Net core 2 web application

I have a bit of a problem and I have tried researching it everywhere but I cannot find an answer.

I going to be doing TDD development in Visual studio using MSTesting (Unit Testing .Net). However, I am going to developing a web application running Asp.Net Core 2.

This is where I am having a problem, The Unit testing project is running .NET Framework 4.7.1 meaning I can not reference the web application. I CAN NOT CHANGE THE FRAMEWORK OF THE WEB APPLICATION.

Please have a look at these screenshots:

Unit Testing application

Web Application

Error Message

I can not change the framework of the web application and the unit testing cant use Core 2. Please Help Thanks.

Upvotes: 0

Views: 369

Answers (1)

Gabriel Castillo Prada
Gabriel Castillo Prada

Reputation: 4701

If you only have a .net core application or a .netstandard library I recommend you to create a MSTest Project that can run on .Net Core.

enter image description here

Upvotes: 1

Related Questions