Add autodetection of PackageDownload version#73
Merged
sharwell merged 1 commit intoJan 2, 2020
Conversation
jnm2
force-pushed
the
autodetect_package_download
branch
from
January 1, 2020 22:23
756d843 to
b7c41bb
Compare
sharwell
approved these changes
Jan 2, 2020
| <Target Name="ResolveAnnotatedReferenceAssemblies"> | ||
| <Target Name="DetermineAnnotationPackageDownloadVersion"> | ||
| <ItemGroup> | ||
| <_CandidatePackageDownloadVersion Include="@(PackageDownload->'%(Version)'->Distinct())" Condition="'%(PackageDownload.Identity)' == 'Microsoft.NETCore.App.Ref'" /> |
Member
There was a problem hiding this comment.
💭 Does this work with just %(Identity)?
Suggested change
| <_CandidatePackageDownloadVersion Include="@(PackageDownload->'%(Version)'->Distinct())" Condition="'%(PackageDownload.Identity)' == 'Microsoft.NETCore.App.Ref'" /> | |
| <_CandidatePackageDownloadVersion Include="@(PackageDownload->'%(Version)'->Distinct())" Condition="'%(Identity)' == 'Microsoft.NETCore.App.Ref'" /> |
jnm2
commented
Jan 2, 2020
Comment on lines
46
to
61
| <ItemGroup> | ||
| <PackageReference Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" Version="$(TunnelVisionLabsReferenceAssemblyAnnotatorVersion)" PrivateAssets="all" /> | ||
| <PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[$(AnnotatedReferenceAssemblyVersion)]" /> | ||
| <PackageReference Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" Version="1.0.0-alpha.138" PrivateAssets="all" /> | ||
|
|
||
| <!-- Specifies the version of Microsoft.NETCore.App.Ref to obtain nullability information from. --> | ||
| <PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[3.1.0]" /> | ||
| </ItemGroup> | ||
| ``` | ||
|
|
||
| Minimal: | ||
|
|
||
| ```xml | ||
| <PropertyGroup> | ||
| <AnnotatedReferenceAssemblyVersion>3.1.0</AnnotatedReferenceAssemblyVersion> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <PackageReference Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" Version="1.0.0-alpha.138" PrivateAssets="all" /> | ||
| <PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[$(AnnotatedReferenceAssemblyVersion)]" /> | ||
| <PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[3.1.0]" /> | ||
| </ItemGroup> | ||
| ``` |
Contributor
Author
There was a problem hiding this comment.
@sharwell Ugh, readme fail. These snippets don't work against 1.0.0-alpha.138.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Next best while sticking with PackageDownload as the means of obtaining the package, since #70 is not technically feasible.