-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Include only PackageReferences included at runtime in deps.json #46218
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
Merged
dsplaisted
merged 20 commits into
dotnet:main
from
Forgind:deps-json-has-extant-assemblies
May 16, 2025
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
90898c7
Include only PackageReferences included at runtime
Forgind a8ae853
Tweak test
Forgind fa1bd9d
First step in fixing deps.json
Forgind 6e201bf
Turn comment into code
Forgind 082634c
Merge branch 'release/9.0.3xx' of https://github.com/dotnet/sdk into …
Forgind dc20de0
remove unnecessary change
Forgind 298bb03
Guard against missing deps
Forgind 9542489
Add test
Forgind 61ab712
Remove ExcludeAssets
Forgind 4df737f
Add mini unit test
Forgind 7cf7f45
Add more complicated unit test
Forgind 5fba7d6
PR feedback
Forgind 662d157
Properly handle main project references
Forgind e73d3df
Add unit tests
Forgind 6a09c4c
Little tweaks (one per dsplaisted's suggestion)
Forgind 181689f
e2e test
Forgind f436c2d
Make tests pass
Forgind ee824dd
Merge branch 'main' of https://github.com/dotnet/sdk into deps-json-h…
Forgind 87f906a
PR comments
Forgind 540e612
Support package references and cut down lock file
Forgind File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
src/Tasks/Microsoft.NET.Build.Tasks.UnitTests/LockFiles/simpleApp.project.lock.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"version": 3, | ||
"targets": { | ||
"net10.0": {} | ||
}, | ||
"libraries": {}, | ||
"projectFileDependencyGroups": { | ||
"net10.0": [] | ||
}, | ||
"packageFolders": { | ||
"C:\\Users\\nmytelka\\.nuget\\packages\\": {}, | ||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} | ||
}, | ||
"project": { | ||
"version": "1.0.0", | ||
"restore": { | ||
"projectUniqueName": "C:\\git\\repro\\consoletest\\consoletest.csproj", | ||
"projectName": "consoletest", | ||
"projectPath": "C:\\git\\repro\\consoletest\\consoletest.csproj", | ||
"packagesPath": "C:\\Users\\username\\.nuget\\packages\\", | ||
"outputPath": "C:\\git\\repro\\consoletest\\obj\\", | ||
"projectStyle": "PackageReference", | ||
"fallbackFolders": [], | ||
"configFilePaths": [ | ||
"C:\\Users\\username\\AppData\\Roaming\\NuGet\\NuGet.Config" | ||
], | ||
"originalTargetFrameworks": [ | ||
"net10.0" | ||
], | ||
"sources": { | ||
"https://api.nuget.org/v3/index.json": {} | ||
}, | ||
"frameworks": { | ||
"net10.0": { | ||
"targetAlias": "net10.0", | ||
"projectReferences": {} | ||
} | ||
}, | ||
"warningProperties": { | ||
"warnAsError": [ | ||
"NU1605" | ||
] | ||
}, | ||
"restoreAuditProperties": { | ||
"enableAudit": "true", | ||
"auditLevel": "low", | ||
"auditMode": "all" | ||
}, | ||
"SdkAnalysisLevel": "10.0.100" | ||
}, | ||
"frameworks": { | ||
"net10.0": { | ||
"targetAlias": "net10.0", | ||
"imports": [ | ||
"net472", | ||
"net481" | ||
], | ||
"frameworkReferences": { | ||
"Microsoft.NETCore.App": { | ||
"privateAssets": "all" | ||
} | ||
}, | ||
"runtimeIdentifierGraphPath": "C:\\git\\sdk\\artifacts\\bin\\redist\\Debug\\dotnet\\sdk\\10.0.100-dev\\RuntimeIdentifierGraph.json" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having resource assets is not the most common case, so instead we should probably model whether the libraries have runtime or compilation assets (and then resource assets if we have additional scenarios for that).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All three are handled in the same way in this part of the code, but they're added in different ways...I don't disagree with you, exactly, but I suspect it would take me a couple days to get that to work, and it wouldn't actually test anything we aren't already properly testing using resource assets.