Remove Razor.Tools/Razor.Design from migration logic.
- Razor.Tools/Razor.Design will not be shipping with MSBuild support for the upcoming release.
This commit is contained in:
parent
d1772f6ed4
commit
411dd02923
2 changed files with 14 additions and 18 deletions
|
@ -29,12 +29,8 @@ namespace Microsoft.DotNet.ProjectJsonMigration
|
||||||
{"Microsoft.EntityFrameworkCore.Tools", new PackageDependencyInfo {
|
{"Microsoft.EntityFrameworkCore.Tools", new PackageDependencyInfo {
|
||||||
Name = "Microsoft.EntityFrameworkCore.Tools",
|
Name = "Microsoft.EntityFrameworkCore.Tools",
|
||||||
Version = ConstantPackageVersions.AspNetToolsVersion } },
|
Version = ConstantPackageVersions.AspNetToolsVersion } },
|
||||||
{ "Microsoft.AspNetCore.Razor.Tools", new PackageDependencyInfo {
|
{ "Microsoft.AspNetCore.Razor.Tools", null },
|
||||||
Name = "Microsoft.AspNetCore.Razor.Design",
|
{ "Microsoft.AspNetCore.Razor.Design", null },
|
||||||
Version = ConstantPackageVersions.AspNetToolsVersion } },
|
|
||||||
{ "Microsoft.AspNetCore.Razor.Design", new PackageDependencyInfo {
|
|
||||||
Name = "Microsoft.AspNetCore.Razor.Design",
|
|
||||||
Version = ConstantPackageVersions.AspNetToolsVersion } },
|
|
||||||
{ "Microsoft.VisualStudio.Web.CodeGenerators.Mvc", new PackageDependencyInfo {
|
{ "Microsoft.VisualStudio.Web.CodeGenerators.Mvc", new PackageDependencyInfo {
|
||||||
Name = "Microsoft.VisualStudio.Web.CodeGeneration.Design",
|
Name = "Microsoft.VisualStudio.Web.CodeGeneration.Design",
|
||||||
Version = ConstantPackageVersions.AspNetToolsVersion } },
|
Version = ConstantPackageVersions.AspNetToolsVersion } },
|
||||||
|
@ -61,9 +57,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration
|
||||||
{"Microsoft.EntityFrameworkCore.Tools", new PackageDependencyInfo {
|
{"Microsoft.EntityFrameworkCore.Tools", new PackageDependencyInfo {
|
||||||
Name = "Microsoft.EntityFrameworkCore.Tools.DotNet",
|
Name = "Microsoft.EntityFrameworkCore.Tools.DotNet",
|
||||||
Version = ConstantPackageVersions.AspNetToolsVersion } },
|
Version = ConstantPackageVersions.AspNetToolsVersion } },
|
||||||
{ "Microsoft.AspNetCore.Razor.Tools", new PackageDependencyInfo {
|
{ "Microsoft.AspNetCore.Razor.Tools", null },
|
||||||
Name = "Microsoft.AspNetCore.Razor.Tools",
|
|
||||||
Version = ConstantPackageVersions.AspNetToolsVersion } },
|
|
||||||
{ "Microsoft.VisualStudio.Web.CodeGeneration.Tools", new PackageDependencyInfo {
|
{ "Microsoft.VisualStudio.Web.CodeGeneration.Tools", new PackageDependencyInfo {
|
||||||
Name = "Microsoft.VisualStudio.Web.CodeGeneration.Tools",
|
Name = "Microsoft.VisualStudio.Web.CodeGeneration.Tools",
|
||||||
Version = ConstantPackageVersions.AspNetToolsVersion } },
|
Version = ConstantPackageVersions.AspNetToolsVersion } },
|
||||||
|
|
|
@ -13,8 +13,6 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
|
||||||
{
|
{
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData("Microsoft.EntityFrameworkCore.Tools", "Microsoft.EntityFrameworkCore.Tools", ConstantPackageVersions.AspNetToolsVersion)]
|
[InlineData("Microsoft.EntityFrameworkCore.Tools", "Microsoft.EntityFrameworkCore.Tools", ConstantPackageVersions.AspNetToolsVersion)]
|
||||||
[InlineData("Microsoft.AspNetCore.Razor.Tools", "Microsoft.AspNetCore.Razor.Design", ConstantPackageVersions.AspNetToolsVersion)]
|
|
||||||
[InlineData("Microsoft.AspNetCore.Razor.Design", "Microsoft.AspNetCore.Razor.Design", ConstantPackageVersions.AspNetToolsVersion)]
|
|
||||||
[InlineData("Microsoft.VisualStudio.Web.CodeGenerators.Mvc", "Microsoft.VisualStudio.Web.CodeGeneration.Design", ConstantPackageVersions.AspNetToolsVersion)]
|
[InlineData("Microsoft.VisualStudio.Web.CodeGenerators.Mvc", "Microsoft.VisualStudio.Web.CodeGeneration.Design", ConstantPackageVersions.AspNetToolsVersion)]
|
||||||
public void It_migrates_project_dependencies_to_a_new_name_and_version(
|
public void It_migrates_project_dependencies_to_a_new_name_and_version(
|
||||||
string sourceToolName,
|
string sourceToolName,
|
||||||
|
@ -31,13 +29,16 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
|
||||||
packageRef.GetMetadataWithName("PrivateAssets").Value.Should().NotBeNull().And.Be("All");
|
packageRef.GetMetadataWithName("PrivateAssets").Value.Should().NotBeNull().And.Be("All");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Theory]
|
||||||
public void It_does_not_migrate_MicrosoftVisualStudioWebCodeGenerationTools()
|
[InlineData("Microsoft.AspNetCore.Razor.Tools")]
|
||||||
|
[InlineData("Microsoft.AspNetCore.Razor.Design")]
|
||||||
|
[InlineData("Microsoft.VisualStudio.Web.CodeGeneration.Tools")]
|
||||||
|
public void It_does_not_migrate_asp_project_tool_dependency(string dependencyName)
|
||||||
{
|
{
|
||||||
var mockProj = RunPackageDependenciesRuleOnPj(@"
|
var mockProj = RunPackageDependenciesRuleOnPj(@"
|
||||||
{
|
{
|
||||||
""dependencies"": {
|
""dependencies"": {
|
||||||
""Microsoft.VisualStudio.Web.CodeGeneration.Tools"" : {
|
""" + dependencyName + @""" : {
|
||||||
""version"": ""1.0.0-preview2-final"",
|
""version"": ""1.0.0-preview2-final"",
|
||||||
""type"": ""build""
|
""type"": ""build""
|
||||||
}
|
}
|
||||||
|
@ -52,7 +53,6 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData("Microsoft.EntityFrameworkCore.Tools", "Microsoft.EntityFrameworkCore.Tools.DotNet", ConstantPackageVersions.AspNetToolsVersion)]
|
[InlineData("Microsoft.EntityFrameworkCore.Tools", "Microsoft.EntityFrameworkCore.Tools.DotNet", ConstantPackageVersions.AspNetToolsVersion)]
|
||||||
[InlineData("Microsoft.AspNetCore.Razor.Tools", "Microsoft.AspNetCore.Razor.Tools", ConstantPackageVersions.AspNetToolsVersion)]
|
|
||||||
[InlineData("Microsoft.VisualStudio.Web.CodeGeneration.Tools", "Microsoft.VisualStudio.Web.CodeGeneration.Tools", ConstantPackageVersions.AspNetToolsVersion)]
|
[InlineData("Microsoft.VisualStudio.Web.CodeGeneration.Tools", "Microsoft.VisualStudio.Web.CodeGeneration.Tools", ConstantPackageVersions.AspNetToolsVersion)]
|
||||||
[InlineData("Microsoft.DotNet.Watcher.Tools", "Microsoft.DotNet.Watcher.Tools", ConstantPackageVersions.AspNetToolsVersion)]
|
[InlineData("Microsoft.DotNet.Watcher.Tools", "Microsoft.DotNet.Watcher.Tools", ConstantPackageVersions.AspNetToolsVersion)]
|
||||||
[InlineData("Microsoft.Extensions.SecretManager.Tools", "Microsoft.Extensions.SecretManager.Tools", ConstantPackageVersions.AspNetToolsVersion)]
|
[InlineData("Microsoft.Extensions.SecretManager.Tools", "Microsoft.Extensions.SecretManager.Tools", ConstantPackageVersions.AspNetToolsVersion)]
|
||||||
|
@ -67,13 +67,15 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
|
||||||
EmitsToolReferences(mockProj, Tuple.Create(targetToolName, targetVersion));
|
EmitsToolReferences(mockProj, Tuple.Create(targetToolName, targetVersion));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Theory]
|
||||||
public void It_does_not_migrate_MicrosoftAspNetCoreServerIISIntegrationTools()
|
[InlineData("Microsoft.AspNetCore.Razor.Tools")]
|
||||||
|
[InlineData("Microsoft.AspNetCore.Server.IISIntegration.Tools")]
|
||||||
|
public void It_does_not_migrate_asp_project_tool(string toolName)
|
||||||
{
|
{
|
||||||
var mockProj = RunPackageDependenciesRuleOnPj(@"
|
var mockProj = RunPackageDependenciesRuleOnPj(@"
|
||||||
{
|
{
|
||||||
""tools"": {
|
""tools"": {
|
||||||
""Microsoft.AspNetCore.Server.IISIntegration.Tools"": ""1.0.0-preview2-final""
|
""" + toolName + @""": ""1.0.0-preview2-final""
|
||||||
}
|
}
|
||||||
}");
|
}");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue