How do I replace the package when Build?

wajika 21 Reputation points
2021-10-21T07:05:56.917+00:00

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

Community Center Not monitored
{count} votes

1 answer

Sort by: Most helpful
  1. Sreeju Nair 12,666 Reputation points
    2021-10-21T10:43:18.72+00:00

    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/

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.