I am using the latest version of XUnit and I followed these steps to get the Class Library (.NET Core) project started.
All other libraries throughout my entire solution are only using 4.6.1 so I changed the frameworks section in project.json to the following:
{
"frameworks": {
"net461": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.0.1-rc2-24027"
}
}
}
}
and everything works fine inside of my solution. I am able to run tests and all references to other libraries work fine even though they are 461 only. Basically, in my solution I have several other Class Libraries (.NET Core) and my XUnit Library relies on them so I am simply able to reference them right through visual studio and the references get added to the XUnit project's project.json file.
A situation arose where I need to do the following:
Copy only the XUnit project to another developers computer. Allow him to edit the source code so he is able to create tests, but not give him access to all of the other libraries/code. I figured I would simply be able to copy all of the other dlls into a random folder and be able to reference them from the standalone XUnit project. However, this isn't the case because when trying to reference I get an error saying that .NET Core projects can't reference standard dlls.
Can someone give me an idea of how I can do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…