"dotnet build --no-restore" restores all dependencies
See original GitHub issueHi,
It has been a while since I’ve seen this error, and yet it seems nobody is aware of it:
dotnet build --no-restore
just restores dependencies, which is totally wrong.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
dotnet restore command - .NET CLI
Learn how to restore dependencies and project-specific tools with the dotnet restore command.
Read more >Restores the dependencies and tools of a project. | dotnet- ...
The dotnet restore command uses NuGet to restore dependencies as well as project-specific tools that are specified in the project file.
Read more >dotnet build, exclude only one dependency from build
To disable implicit restore, use the --no-restore option. - job: steps: - task: DotNetCoreCLI@2 displayName: ...
Read more >Help me understand restore, build, build solution : r/dotnet
Afaik, dotnet restore restores the dependencies, dotnet build then builds the code with the dependencies which were resolved by restore.
Read more >Dotnet restore clean. cs files) Removing information from ...
The dotnet restore command uses NuGet to restore dependencies and project-specific tools specified in the project file. First off we need a ....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In which directory do you replace the DLL? Would
dotnet restore
copy the DLL to that directory?Files are copied to the output directory as part of the build operation, not the restore operation, so I think the behavior you’re seeing is expected.
Some people accomplish your goal by modifying the file in the NuGet package store, so it’s the updated one that gets copied. If you choose to do this you should be aware that files in NuGet package store are intended to be immutable, so this will affect other projects and may require restarting processes to flush caches.
I’m going to close this as “by design” since the build seems to be doing the right thing.