My nuget package needs to inspect the system it is installed in to determine what packages and versions of those packages that should be installed.
Is there any recommended (or not recommended) way to accomplish this?
For example, during the build:
- Is the special software installed? No -> Fail with nice error message.
- If version of special software is < 3.0 install "old-api-package" package.
- If version of special software is > 3.0 install "new-API-package" package.
... or similar.
I'm currently thinking I need to write a custom msbuild task that uses the nuget API... but... before doing this work I'd like to make sure this is the right approach!