Update migration to use the web template as a base for web projects
This commit is contained in:
parent
22a5a15ba9
commit
e847389fc2
5 changed files with 111 additions and 0 deletions
|
@ -49,6 +49,26 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
|
|||
privateAssetsMetadata.Value.Should().Be("All");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void It_migrates_web_projects_to_have_web_sdk_PrivateAssets()
|
||||
{
|
||||
var mockProj = RunPackageDependenciesRuleOnPj(@"
|
||||
{
|
||||
""dependencies"": {
|
||||
""Microsoft.AspNetCore.Mvc"" : {
|
||||
""version"": ""1.0.0""
|
||||
}
|
||||
}
|
||||
}");
|
||||
|
||||
|
||||
var packageRef = mockProj.Items.First(i => i.Include == "Microsoft.NET.Sdk.Web" && i.ItemType == "PackageReference");
|
||||
|
||||
var privateAssetsMetadata = packageRef.GetMetadataWithName("PrivateAssets");
|
||||
privateAssetsMetadata.Value.Should().NotBeNull();
|
||||
privateAssetsMetadata.Value.Should().Be("All");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void It_migrates_suppress_parent_array_to_PrivateAssets()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue