I have tried microsoft unit test package from nuget ,but it's failed to install, so please help, how to use unit test in visual studio using any package.
The Visual Studio Test Runner expects a test project to be .NET 4.0 or newer. But you can reference a .NET 2.0 assembly from that and test the code.
Unless you're relying on very specific features of .NEt 2.0, then those projects will work just fine.