'What is the easiest way to test multiple versions of a NuGet?
I have two C# projects. Project A is a NuGet package. Project B is a web service. Project A calls the web service.
We want B (the web serice) to remain backward-compatible with old versions of A - i.e., old versions of A can still call the newest version of B.
I want to write integration tests to verify this. This is easy enough to test for a single version of A - just install the NuGet package in a test project and run some tests against an instance of the web service.
What is the most convenient way to do this for multiple versions of the NuGet? I cannot easily reference multiple versions of a NuGet and switch between them at runtime. Of course I can make multiple test projects and reference a different NuGet version in each test project, but do I then have to copy the tests themselves across multiple projects? That would be very inconvenient.
Is there a nice way to do this? Can I maybe do something clever with preprocessor directives and build different DLLs from the same source code? Or something?
Thanks in advance!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
