简体   繁体   中英

Developing two Nuget packages at the same time

Suppose project A 1.0 depends on B 1.0 (each is it's own nuget package). I get these projects from source control, so after package restore A 1.0 has a dll reference to B 1.0 .

I want to develop A and B at the same time, and publish to Nuget with A 2.0 depending on B 2.0 .

How can I do this?

Note: I cant simply add A and B to a solution because A will still have a dll reference, and wont be updated when B updates. Also manually changing the dll reference to a project reference and changing it back before publishing seems laborious (especially with more projects).

Edit: I don't want to publish to the Nuget server until A and B have been fully developed to v2.

One thing you can do when developing nuget packages is using a fileshare as your own nuget server. you can look here https://docs.nuget.org/create/hosting-your-own-nuget-feeds how to make a feed from your local file system

Then you make sure that the build of B produces a nuget package, and put it in your own c:\\devenvironment\\nugetsnapshot directory.

After that you can just look at that directory for your nuget packages and you can develop A against a snapshot for B without publishing it.

Alternatively you could create your own development nuget server or mark snapshots as prerepeases so people know they might be broken

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM