Moving NuGet package versions to Directory.build.targers leads to fail

Novikov Egor's Avatar

Novikov Egor

16 Apr, 2021 03:25 PM

Hello. I faced a problem. I moved nuget package versions to Directory.build.targers as it described here:
1) https://codeopinion.com/nuget-packagereference-versions-solution-wide/
2) https://www.strathweb.com/2018/07/solution-wide-nuget-package-version-handling-with-msbuild-15/

Solution builds successfully localy. But in appveyot it fails:
https://ci.appveyor.com/project/Egor92/mvvmnavigation/builds/38639482

I described package reference NUnit version="3.12.0" in Directory.build.targers. But msbuild in appveyor tries to install version="2.5.7.10213"
https://ci.appveyor.com/project/Egor92/mvvmnavigation/builds/38639482#L139
Because of it build fails. I don't understand why msbuild in appveyor ignores Directory.build.targers.
I ask for your help.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac