question

wajika-3218 avatar image
0 Votes"
wajika-3218 asked PengGe-MSFT commented

How do I replace the package when Build?

I have a lot of projects, they use different versions of packages, I want to replace the latest package version when the project is released, is there any idea?


This is my compilation script

 #!/bin/bash
    
 dotnet restore -s "https://api.nuget.org/v3/index.json"  && dotnet publish -c release -o ./publish

I read the documentation and find some helpful commands and parameters, but I know nothing about. Net core
dotnet-add-package
dotnet publish --manifest








vs-msbuild
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, @wajika-3218
I found this thread that my help you.


0 Votes 0 ·

1 Answer

sreejukg avatar image
0 Votes"
sreejukg answered

You can achieve this with MS Build. Refer the following article for reference.

https://netitude.bc3tech.net/2014/11/28/auto-update-your-nuget-packages-at-build-time/

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.