-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Include assembly and file versions in deps file for non self-contained publish #2118
Merged
dsplaisted
merged 9 commits into
dotnet:release/2.1.3xx
from
dsplaisted:1847-assembly-versions-in-deps
Apr 21, 2018
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
986625a
Add MSBuildAllProjects to GenerateBuildDependencyFile target inputs
dsplaisted b9d8bcf
Include assembly and file versions in deps file for non self-containe…
dsplaisted 7621a25
Add tests for file and assembly versions in deps file
dsplaisted c813fb4
Add test for roll-forward assembly-loading behavior
dsplaisted 484df50
Allow projects to opt in or out of including runtime file versions in…
dsplaisted 30e87c6
Add more end-to-end tests
dsplaisted adfc2bb
Style updates based on PR feedback
dsplaisted 5f34610
Include file versions in deps file by default when targeting .NET Cor…
dsplaisted d29e8a5
Update tests to always expect file versions in deps.json
dsplaisted 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 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -41,6 +41,15 @@ public string GetPackageDirectory(string packageId, NuGetVersion version, out st | |
return _packagePathResolver.GetPackageDirectory(packageId, version); | ||
} | ||
|
||
public string ResolvePackageAssetPath(LockFileTargetLibrary package, string relativePath) | ||
{ | ||
string packagePath = GetPackageDirectory(package.Name, package.Version); | ||
return Path.Combine(packagePath, NormalizeRelativePath(relativePath)); | ||
} | ||
|
||
public static string NormalizeRelativePath(string relativePath) | ||
=> relativePath.Replace('/', Path.DirectorySeparatorChar); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: indentation looks non-standard here. |
||
|
||
public static NuGetPackageResolver CreateResolver(LockFile lockFile, string projectPath) | ||
{ | ||
NuGetPackageResolver packageResolver; | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
Note - when @tannergooding's change #2090 goes in, we will need to merge this with that, so the new references get
CreateRuntimeFile
called on them as well.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.
#2090 was merged, was this handled?
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.
@tannergooding @eerhardt It looks like this is handled correctly, as the new code from #2090 ends up calling through
GetReferenceRuntimeLibraries
for the indirect references, the same as how the direct references are handled.