-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we do Maven style snapshots? #7092
Comments
NuGet already supports pre-release packages, which is kind of what snapshots are trying to achieve. NuGet also has the concept of floating versions that allows you get the latest prerelease version of that said package. What exactly are you trying to achieve here? |
I want to mark a package as a snapshot version so nuget/Visual Studio always downloads the most current version of that package. Like maven does it- this isn't a wierd use case. Can the prerelease thing do that? I want to not have to modify the version number and have nuget always redownload the latest version- like maven snapshots |
Even with maven, you still can't re-download the same version. You can achieve a similar thing. The thing is that each package you release should have a unique identifier. Please refer to https://docs.microsoft.com/en-us/nuget/consume-packages/dependency-resolution and https://docs.microsoft.com/en-us/nuget/reference/package-versioning#version-ranges-and-wildcards for more info. |
"--update-snapshots" correct me if im wrong but maven absolutely can and thats kind of the whole point! Doing it your way means I still need to update the package reference right? Go into nuget package manager and install that version right? Maybe im missing something? Maybe there is a VS extension or a build task that can selectively run "Update-Package –reinstall" on certain packages- by doing a string match for some identifying token in the version number or something? |
@red8888 |
Thanks for answering my questions. So to set that version like "1.0.0-rc.*" do I do that in packages.config or in PackageReference in csproj files? Our users are most familiar with nuget package manager though, is there a way to set a wildcard version from that GUI too? Thanks again! |
Floating versions are only supported with PackageReferences in csproj. packages.config is a rather old design at this point and we prefer if customers move towards PR whenever appropriate. Floating versions docs There's currently no UI handling for floating versions unfortunately. Please note that updates/installs are way more performant and consistent in PackageReference that they don't need to be changed with the UI. |
Closing as all the questions seem to be resolved, feel free to reopen or create a new issue if there are further related concerns. |
one of the nice things about snapshots is that if i maven publish a project with snapshot it gets pushed to my local maven repo, and then when i refresh dependencies over in another project it'll see that local snapshot and pull it in fairly quickly. This makes REPL on a dependency very easy...i'm wondering what the equivalent flow is for NuGet |
Having snapshot style managing would be very nice for local development of packages and the consumer of the package. |
Agreed! I have been spending the last couple days trying to figure this out. I did something like this to achieve a similar effect.
If anyone knows a more elegant way to handle this, I'm all ears. Changing version numbers each time just for local development is just silly. semver is great and everything but we shouldn't be forced to adhere to it just for the sake of purity because doing so results in dirty hacks or workarounds. |
I think #6579 is related. |
@red8888 -- I don't think these people have ever developed with Java or Maven, so they don't know what they're missing with how clunky nugets & multi-project solutions & cross-solution development are in C#/.NET! |
Now that project.json is dead how can you emulate maven style snapshots?
I want to mark a package as a snapshot version so nuget/Visual Studio always downloads the most current version of that package.
The text was updated successfully, but these errors were encountered: