Background
dotnet restore
, dotnet build
)<Project Sdk="Microsoft.NET.Sdk">
)1.6.10
, is version 1.6.9
, with backwards compatible fixes)1.6.*
)My project file for my application might contain this:
<PackageReference Include="MyDataAccessLibrary" Version="1.6.*" />
Here is the problem: When I publish a new version of my package to the nuget server, running dotnet restore
on my development machine is not downloading that new version (if I have already been building against a previous version.)
For example, if I have been building against package version 1.6.9, I expected that dotnet restore
would detect the recently published 1.6.10, install it, and use it when building my dependent application. That has not been my experience on my development machine. (On the build server, it works fine because it gets a clean copy for every build.)
Here is what I have been doing as a workaround on my dev machine:
1.6.*
with 1.6.10
.dotnet restore
1.6.10
back to 1.6.*
Question: What is the right way to say, "please download the latest patch for a package" in the above situation?
I think I found the answer... the --no-cache
option on dotnet restore.
dotnet restore --no-cache
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With