-
Notifications
You must be signed in to change notification settings - Fork 702
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
Allow netstandard to install contentFiles under the any tfm #755
Conversation
By default ContentModel translates 'any' to 'dotnet', this works for the lib folder but for scenarios such as contentFiles any does refer to all frameworks. This change updates contentModel to allow per pattern token replacement tables. Fixes NuGet/Home#3118
var collection = new ContentItemCollection(); | ||
collection.Load(new string[] | ||
{ | ||
"contentFiles/any/any/config1.xml", |
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.
What is the first any
?
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.
codeLanguage
|
||
// Assert | ||
Assert.Equal(1, groups.Count); | ||
Assert.Equal(".NETPlatform,Version=v5.0", groups[0].Properties["tfm"].ToString()); |
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.
Compare to FrameworkIdentifiers.CommonFrameworks.DotNet
? This seems like a "truer" test since the string ".NETPlatform,Version=v5.0"
would also allow this to pass.
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 can update that, the type here is Object, and apparently Assert.Equal(FrameworkIdentifiers.CommonFrameworks.DotNet, groups[0].Properties["tfm"]) is false, even though it is that exact framework
Thanks for the background information on this one. Address/ignore my last comment then |
This change removes the
any
->dotnet
for contentFiles, unlike lib and other folders contentFiles does supports theany
framework.ContentModel previously defined token replacements such as
any
->dotnet
on a per pattern basis. All patterns that contained{tfm}
would apply this replacement. This change moves the replacement table to the pattern which contains the folder name to allow fine grained control over it.Fixes NuGet/Home#3118
//cc @joelverhagen @alpaix @jainaashish @rohit21agrawal @rrelyea @drewgil