Skip to content

NuGet msbuild script should not install TapPackages with `--force`

Force can have some uninteded/unintuitive side effects and could produce a broken end result. I think it would be better to not force the install, and let the developer handle any errors by modifying what gets installed.

Here is an example, where it is quite unintuitive what happens:

Csproj specifies OpenTAP 9.8.5 and also the SDK package (without specifying a version of that). I would assume the result would be OpenTAP 9.8.5 and a compatible version of the SDK package. Instead this happens:

...
549        InstallOpenTapPackages:
550          .\tap package install --dependencies --force "SDK"
551          Installing to C:\build\builds\TXvPcRSz\0\tap\vssdk\OpenTap.VSSdk.Debugger\bin\Release
552          A required dependency is currently not installed.
553          Downloading [=========================     ] 86.48% (3 of 3MB) 
554          Downloading [==============================] 100.00% (3 of 3MB) 
555          
556          Downloaded 'OpenTAP' to 'C:\build\builds\TXvPcRSz\0\tap\vssdk\OpenTap.VSSdk.Debugger\bin\Release\PackageCache\OpenTAP.9.9.3+2fa91315.x64.TapPackage'. [1.77 s]
557          Downloading [=========================     ] 84.62% (2 of 2MB) 
558          Downloading [==============================] 100.00% (2 of 2MB) 
559          
560          Downloaded 'SDK' to 'C:\build\builds\TXvPcRSz\0\tap\vssdk\OpenTap.VSSdk.Debugger\bin\Release\PackageCache\SDK.9.9.3+2fa91315.Windows,Linux.TapPackage'. [1.54 s]
561          Uninstalled OpenTAP version 9.8.5+e7f2bdda. [35.6 ms]
562          Installed OpenTAP version 9.9.3+2fa91315 [240 ms]
...
Edited by Vivienne Spence