question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet restore --no-dependencies is loading asset files from upstream project references in the latest .Net 6 preview

See original GitHub issue

@breidikl commented on Wed, 11 Aug 2021 21:05:08 GMT

NuGet Product Used

dotnet.exe

Product Version

6.0.0-preview.7.21377.19

Worked before?

It works in 5.x version and also worked in 6 preview 4

Impact

No response

Repro Steps & Context

We have a distributed build that cds to the directory for each csproj and runs the following dotnet command on the machine that will be building that node:

dotnet.exe restore --use-lock-file --no-dependencies /p:ImportProjectExtensionProps=false /p:ImportProjectExtensionTargets=false /nodeReuse:false /maxcpucount:1 --lock-file-path packages.lock.json --locked-mode

At some point after .Net 6 preview 4, this started reading the project.assets.json files from the upstream project references, which causes problems with our build distribution model.

Verbose Logs

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
breidiklcommented, Sep 3, 2021

I’ve sent a PR with the change I tested locally at #20612

Retargeted to the release branch using #20624

0reactions
baronfelcommented, Apr 6, 2022

Closing due to the linked PR having been merged already.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet restore --no-dependencies is loading asset files ...
Net 6 preview 4, this started reading the project.assets.json files from the upstream project references, which causes problems with our build ...
Read more >
dotnet restore command - .NET CLI
Learn how to restore dependencies and project-specific tools with the dotnet restore command.
Read more >
Assets file project.assets.json doesn't have a target for 'net6.0'
I found the problem and it indeed had to do with restoring NuGet Packages, in that I have a connection to a corporate...
Read more >
Assets file project.assets.json not found. Run a NuGet ...
Doing dotnet restore adds the required files. In case when 'dotnet restore' not works, following steps may help:
Read more >
Please stop lying about .NET Standard 2.0 support!
In this post I have a bit of a rant about Microsoft's NuGet packages lying about supporting .NET Standard 2.0 when they kinda...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found