Skip to content
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

Change xml formatting for store artifacts xml #1487

Merged
merged 2 commits into from
Aug 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected override void ExecuteCore()
TaskItem item = new TaskItem(resolvedAssembly.SourcePath);
item.SetMetadata("DestinationSubPath", resolvedAssembly.DestinationSubPath);
item.SetMetadata("AssetType", resolvedAssembly.Asset.ToString().ToLower());
item.SetMetadata(MetadataKeys.PackageName, resolvedAssembly.Package.Id.ToString().ToLower());
item.SetMetadata(MetadataKeys.PackageName, resolvedAssembly.Package.Id.ToString());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eerhardt Will removing this ToLower() break anything?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Package Ids are supposed to be case insensitive, so in theory it is fine to make this change. If it does break something, that something should be fixed to use a case insensitive comparison.

I did a quick look at where this is used, and the only place I found was it gets passed into FilterResolvedFiles, which then uses it to create a PackageIdentity, which does case insensitive comparisons. So this should be fine.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool ... It's a UX issue if the files have lowercase package names. Some devs are bound to wonder: Do they always need to be lowercase in the artifact.xml file? This will fix that prob.

item.SetMetadata(MetadataKeys.PackageVersion, resolvedAssembly.Package.Version.ToString().ToLower());
_assembliesToPublish.Add(item);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Copyright (c) .NET Foundation. All rights reserved.
</RemoveDuplicatePackageReferences>

<ItemGroup>
<ListOfPackageReference Include="@(AllResolvedPackagesPublishedAfterFilter -> '%20%20%20&lt;Package Id=&quot;%(Identity)&quot; Version =&quot;%(Version)&quot;/&gt;')"/>
<ListOfPackageReference Include="@(AllResolvedPackagesPublishedAfterFilter -> '%20%20&lt;Package Id=&quot;%(Identity)&quot; Version=&quot;%(Version)&quot; /&gt;')"/>
</ItemGroup>
<PropertyGroup>
<_StoreArtifactContent>
Expand Down