diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion14/Program.cs b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion14/Program.cs
new file mode 100644
index 000000000..e901ebc5c
--- /dev/null
+++ b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion14/Program.cs
@@ -0,0 +1,16 @@
+// Copyright (c) .NET Foundation and contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+namespace TestApp
+{
+ public class Program
+ {
+ public static int Main(string[] args)
+ {
+ Console.WriteLine("Hello world");
+ return 0;
+ }
+ }
+}
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion14/TestApp.sln b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion14/TestApp.sln
new file mode 100644
index 000000000..3adf30d78
--- /dev/null
+++ b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion14/TestApp.sln
@@ -0,0 +1,23 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.25420.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestApp", "TestApp.xproj", "{0138CB8F-4AA9-4029-A21E-C07C30F425BA}"
+EndProject
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0138CB8F-4AA9-4029-A21E-C07C30F425BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0138CB8F-4AA9-4029-A21E-C07C30F425BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0138CB8F-4AA9-4029-A21E-C07C30F425BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0138CB8F-4AA9-4029-A21E-C07C30F425BA}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion14/TestApp.xproj b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion14/TestApp.xproj
new file mode 100644
index 000000000..d18702195
--- /dev/null
+++ b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion14/TestApp.xproj
@@ -0,0 +1,18 @@
+
+
+
+ 14.0.23107
+ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
+
+
+
+ 0138cb8f-4aa9-4029-a21e-c07c30f425ba
+ TestAppWithContents
+ ..\..\..\artifacts\obj\$(MSBuildProjectName)
+ ..\..\..\artifacts\
+
+
+ 2.0
+
+
+
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion14/project.json b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion14/project.json
new file mode 100644
index 000000000..166d41c2b
--- /dev/null
+++ b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion14/project.json
@@ -0,0 +1,26 @@
+{
+ "version": "1.0.0-*",
+ "buildOptions": {
+ "emitEntryPoint": true,
+ "preserveCompilationContext": true
+ },
+ "dependencies": {
+ "Microsoft.NETCore.App": "1.0.1"
+ },
+ "frameworks": {
+ "netcoreapp1.0": {}
+ },
+ "runtimes": {
+ "win7-x64": {},
+ "win7-x86": {},
+ "osx.10.10-x64": {},
+ "osx.10.11-x64": {},
+ "ubuntu.14.04-x64": {},
+ "ubuntu.16.04-x64": {},
+ "centos.7-x64": {},
+ "rhel.7.2-x64": {},
+ "debian.8-x64": {},
+ "fedora.23-x64": {},
+ "opensuse.13.2-x64": {}
+ }
+}
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion15/Program.cs b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion15/Program.cs
new file mode 100644
index 000000000..e901ebc5c
--- /dev/null
+++ b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion15/Program.cs
@@ -0,0 +1,16 @@
+// Copyright (c) .NET Foundation and contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+namespace TestApp
+{
+ public class Program
+ {
+ public static int Main(string[] args)
+ {
+ Console.WriteLine("Hello world");
+ return 0;
+ }
+ }
+}
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion15/TestApp.sln b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion15/TestApp.sln
new file mode 100644
index 000000000..88284045d
--- /dev/null
+++ b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion15/TestApp.sln
@@ -0,0 +1,23 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15 Custom
+VisualStudioVersion = 15.9.12345.4
+MinimumVisualStudioVersion = 10.9.1234.5
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestApp", "TestApp.xproj", "{0138CB8F-4AA9-4029-A21E-C07C30F425BA}"
+EndProject
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0138CB8F-4AA9-4029-A21E-C07C30F425BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0138CB8F-4AA9-4029-A21E-C07C30F425BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0138CB8F-4AA9-4029-A21E-C07C30F425BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0138CB8F-4AA9-4029-A21E-C07C30F425BA}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion15/TestApp.xproj b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion15/TestApp.xproj
new file mode 100644
index 000000000..d18702195
--- /dev/null
+++ b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion15/TestApp.xproj
@@ -0,0 +1,18 @@
+
+
+
+ 14.0.23107
+ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
+
+
+
+ 0138cb8f-4aa9-4029-a21e-c07c30f425ba
+ TestAppWithContents
+ ..\..\..\artifacts\obj\$(MSBuildProjectName)
+ ..\..\..\artifacts\
+
+
+ 2.0
+
+
+
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion15/project.json b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion15/project.json
new file mode 100644
index 000000000..166d41c2b
--- /dev/null
+++ b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersion15/project.json
@@ -0,0 +1,26 @@
+{
+ "version": "1.0.0-*",
+ "buildOptions": {
+ "emitEntryPoint": true,
+ "preserveCompilationContext": true
+ },
+ "dependencies": {
+ "Microsoft.NETCore.App": "1.0.1"
+ },
+ "frameworks": {
+ "netcoreapp1.0": {}
+ },
+ "runtimes": {
+ "win7-x64": {},
+ "win7-x86": {},
+ "osx.10.10-x64": {},
+ "osx.10.11-x64": {},
+ "ubuntu.14.04-x64": {},
+ "ubuntu.16.04-x64": {},
+ "centos.7-x64": {},
+ "rhel.7.2-x64": {},
+ "debian.8-x64": {},
+ "fedora.23-x64": {},
+ "opensuse.13.2-x64": {}
+ }
+}
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersionUnknown/Program.cs b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersionUnknown/Program.cs
new file mode 100644
index 000000000..e901ebc5c
--- /dev/null
+++ b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersionUnknown/Program.cs
@@ -0,0 +1,16 @@
+// Copyright (c) .NET Foundation and contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+namespace TestApp
+{
+ public class Program
+ {
+ public static int Main(string[] args)
+ {
+ Console.WriteLine("Hello world");
+ return 0;
+ }
+ }
+}
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersionUnknown/TestApp.sln b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersionUnknown/TestApp.sln
new file mode 100644
index 000000000..60722b8f3
--- /dev/null
+++ b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersionUnknown/TestApp.sln
@@ -0,0 +1,23 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 16
+VisualStudioVersion = 14.0.unknown.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TestApp", "TestApp.xproj", "{0138CB8F-4AA9-4029-A21E-C07C30F425BA}"
+EndProject
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0138CB8F-4AA9-4029-A21E-C07C30F425BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0138CB8F-4AA9-4029-A21E-C07C30F425BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0138CB8F-4AA9-4029-A21E-C07C30F425BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0138CB8F-4AA9-4029-A21E-C07C30F425BA}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersionUnknown/TestApp.xproj b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersionUnknown/TestApp.xproj
new file mode 100644
index 000000000..d18702195
--- /dev/null
+++ b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersionUnknown/TestApp.xproj
@@ -0,0 +1,18 @@
+
+
+
+ 14.0.23107
+ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
+
+
+
+ 0138cb8f-4aa9-4029-a21e-c07c30f425ba
+ TestAppWithContents
+ ..\..\..\artifacts\obj\$(MSBuildProjectName)
+ ..\..\..\artifacts\
+
+
+ 2.0
+
+
+
diff --git a/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersionUnknown/project.json b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersionUnknown/project.json
new file mode 100644
index 000000000..166d41c2b
--- /dev/null
+++ b/TestAssets/NonRestoredTestProjects/PJAppWithSlnVersionUnknown/project.json
@@ -0,0 +1,26 @@
+{
+ "version": "1.0.0-*",
+ "buildOptions": {
+ "emitEntryPoint": true,
+ "preserveCompilationContext": true
+ },
+ "dependencies": {
+ "Microsoft.NETCore.App": "1.0.1"
+ },
+ "frameworks": {
+ "netcoreapp1.0": {}
+ },
+ "runtimes": {
+ "win7-x64": {},
+ "win7-x86": {},
+ "osx.10.10-x64": {},
+ "osx.10.11-x64": {},
+ "ubuntu.14.04-x64": {},
+ "ubuntu.16.04-x64": {},
+ "centos.7-x64": {},
+ "rhel.7.2-x64": {},
+ "debian.8-x64": {},
+ "fedora.23-x64": {},
+ "opensuse.13.2-x64": {}
+ }
+}
diff --git a/build/Microsoft.DotNet.Cli.DependencyVersions.props b/build/Microsoft.DotNet.Cli.DependencyVersions.props
index 1c4976512..86351a0f6 100644
--- a/build/Microsoft.DotNet.Cli.DependencyVersions.props
+++ b/build/Microsoft.DotNet.Cli.DependencyVersions.props
@@ -1,11 +1,11 @@
- 15.1.0-preview-000522-02
+ 15.1.0-preview-000523-01
2.0.0-rc3-61212-03
- 1.0.0-alpha-20170111-1
+ 1.0.0-alpha-20170117-4
4.0.0-rc3
- 1.0.0-alpha-20170106-1-203
+ 1.0.0-alpha-20170114-1-223
15.0.0-preview-20170106-08
1.0.0-beta1-20170108-83
diff --git a/src/Microsoft.DotNet.ProjectJsonMigration/ConstantPackageVersions.cs b/src/Microsoft.DotNet.ProjectJsonMigration/ConstantPackageVersions.cs
index f3e33f733..9928d0e67 100644
--- a/src/Microsoft.DotNet.ProjectJsonMigration/ConstantPackageVersions.cs
+++ b/src/Microsoft.DotNet.ProjectJsonMigration/ConstantPackageVersions.cs
@@ -10,8 +10,8 @@ namespace Microsoft.DotNet.ProjectJsonMigration
public const string AspNetLTSPackagesVersion = "1.0.2";
public const string EntityFrameworkLTSPackagesVersion = "1.0.2";
public const string TestSdkPackageVersion = "15.0.0-preview-20170106-08";
- public const string XUnitPackageVersion = "2.2.0-beta4-build3444";
- public const string XUnitRunnerPackageVersion = "2.2.0-beta4-build1194";
+ public const string XUnitPackageVersion = "2.2.0-beta5-build3474";
+ public const string XUnitRunnerPackageVersion = "2.2.0-beta5-build1225";
public const string MstestTestAdapterVersion = "1.1.8-rc";
public const string MstestTestFrameworkVersion = "1.0.8-rc";
public const string BundleMinifierToolVersion = "2.2.301";
diff --git a/src/Microsoft.DotNet.ProjectJsonMigration/ProjectContextExtensions.cs b/src/Microsoft.DotNet.ProjectJsonMigration/ProjectContextExtensions.cs
index d1b0dac7a..10c2630e0 100644
--- a/src/Microsoft.DotNet.ProjectJsonMigration/ProjectContextExtensions.cs
+++ b/src/Microsoft.DotNet.ProjectJsonMigration/ProjectContextExtensions.cs
@@ -14,8 +14,9 @@ namespace Microsoft.DotNet.ProjectJsonMigration
{
public static string GetProjectName(this ProjectContext projectContext)
{
- // _ here is just an arbitrary configuration value so we can obtain the output name
- return Path.GetFileNameWithoutExtension(projectContext.GetOutputPaths("_").CompilationFiles.Assembly);
+ var projectDirectory = projectContext.ProjectDirectory;
+
+ return Path.GetFileName(projectDirectory);
}
public static bool HasRuntimes(this IEnumerable projectContexts)
diff --git a/src/Microsoft.DotNet.ProjectJsonMigration/ProjectMigrator.cs b/src/Microsoft.DotNet.ProjectJsonMigration/ProjectMigrator.cs
index eee159c59..3aaeebda5 100644
--- a/src/Microsoft.DotNet.ProjectJsonMigration/ProjectMigrator.cs
+++ b/src/Microsoft.DotNet.ProjectJsonMigration/ProjectMigrator.cs
@@ -38,12 +38,20 @@ namespace Microsoft.DotNet.ProjectJsonMigration
// Try to read the project dependencies, ignore an unresolved exception for now
MigrationRuleInputs rootInputs = ComputeMigrationRuleInputs(rootSettings);
IEnumerable projectDependencies = null;
+ var projectMigrationReports = new List();
try
{
// Verify up front so we can prefer these errors over an unresolved project dependency
VerifyInputs(rootInputs, rootSettings);
+ projectMigrationReports.Add(MigrateProject(rootSettings));
+
+ if (skipProjectReferences)
+ {
+ return new MigrationReport(projectMigrationReports);
+ }
+
projectDependencies = ResolveTransitiveClosureProjectDependencies(
rootSettings.ProjectDirectory,
rootSettings.ProjectXProjFilePath,
@@ -62,14 +70,6 @@ namespace Microsoft.DotNet.ProjectJsonMigration
});
}
- var projectMigrationReports = new List();
- projectMigrationReports.Add(MigrateProject(rootSettings));
-
- if (skipProjectReferences)
- {
- return new MigrationReport(projectMigrationReports);
- }
-
foreach(var project in projectDependencies)
{
var projectDir = Path.GetDirectoryName(project.ProjectFilePath);
diff --git a/src/dotnet/commands/dotnet-migrate/MigrateCommand.cs b/src/dotnet/commands/dotnet-migrate/MigrateCommand.cs
index 9a61d3a3e..d164c395a 100644
--- a/src/dotnet/commands/dotnet-migrate/MigrateCommand.cs
+++ b/src/dotnet/commands/dotnet-migrate/MigrateCommand.cs
@@ -20,6 +20,10 @@ namespace Microsoft.DotNet.Tools.Migrate
{
public partial class MigrateCommand
{
+ private const string ProductDescription = "Visual Studio 15";
+ private const string VisualStudioVersion = "15.0.26114.2";
+ private const string MinimumVisualStudioVersion = "10.0.40219.1";
+
private SlnFile _slnFile;
private readonly DirectoryInfo _workspaceDirectory;
private readonly string _templateFile;
@@ -141,6 +145,14 @@ namespace Microsoft.DotNet.Tools.Migrate
}
}
+ Version version;
+ if (!Version.TryParse(_slnFile.VisualStudioVersion, out version) || version.Major < 15)
+ {
+ _slnFile.ProductDescription = ProductDescription;
+ _slnFile.VisualStudioVersion = VisualStudioVersion;
+ _slnFile.MinimumVisualStudioVersion = MinimumVisualStudioVersion;
+ }
+
_slnFile.Write();
foreach (var csprojFile in csprojFilesToAdd)
diff --git a/src/dotnet/commands/dotnet-new/CSharp_Xunittest/$projectName$.csproj b/src/dotnet/commands/dotnet-new/CSharp_Xunittest/$projectName$.csproj
index f76c6d4b9..1de3d53ff 100644
--- a/src/dotnet/commands/dotnet-new/CSharp_Xunittest/$projectName$.csproj
+++ b/src/dotnet/commands/dotnet-new/CSharp_Xunittest/$projectName$.csproj
@@ -7,8 +7,8 @@
-
-
+
+
diff --git a/src/dotnet/commands/dotnet-new/FSharp_Xunittest/$projectName$.fsproj b/src/dotnet/commands/dotnet-new/FSharp_Xunittest/$projectName$.fsproj
index 17b826289..2197d2277 100644
--- a/src/dotnet/commands/dotnet-new/FSharp_Xunittest/$projectName$.fsproj
+++ b/src/dotnet/commands/dotnet-new/FSharp_Xunittest/$projectName$.fsproj
@@ -15,8 +15,8 @@
-
-
+
+
diff --git a/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigratePackageDependencies.cs b/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigratePackageDependencies.cs
index d93c3c96a..3067b567a 100644
--- a/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigratePackageDependencies.cs
+++ b/test/Microsoft.DotNet.ProjectJsonMigration.Tests/Rules/GivenThatIWantToMigratePackageDependencies.cs
@@ -309,13 +309,13 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
mockProj.Items.Should().ContainSingle(
i => (i.Include == "xunit" &&
i.ItemType == "PackageReference" &&
- i.GetMetadataWithName("Version").Value == "2.2.0-beta4-build3444" &&
+ i.GetMetadataWithName("Version").Value == "2.2.0-beta5-build3474" &&
i.GetMetadataWithName("Version").ExpressedAsAttribute));
mockProj.Items.Should().ContainSingle(
i => (i.Include == "xunit.runner.visualstudio" &&
i.ItemType == "PackageReference" &&
- i.GetMetadataWithName("Version").Value == "2.2.0-beta4-build1194" &&
+ i.GetMetadataWithName("Version").Value == "2.2.0-beta5-build1225" &&
i.GetMetadataWithName("Version").ExpressedAsAttribute));
mockProj.Items.Should().NotContain(
@@ -351,13 +351,13 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
mockProj.Items.Should().ContainSingle(
i => (i.Include == "xunit" &&
i.ItemType == "PackageReference" &&
- i.GetMetadataWithName("Version").Value == "2.2.0-beta4-build3444" &&
+ i.GetMetadataWithName("Version").Value == "2.2.0-beta5-build3474" &&
i.GetMetadataWithName("Version").ExpressedAsAttribute));
mockProj.Items.Should().ContainSingle(
i => (i.Include == "xunit.runner.visualstudio" &&
i.ItemType == "PackageReference" &&
- i.GetMetadataWithName("Version").Value == "2.2.0-beta4-build1194" &&
+ i.GetMetadataWithName("Version").Value == "2.2.0-beta5-build1225" &&
i.GetMetadataWithName("Version").ExpressedAsAttribute));
mockProj.Items.Should().NotContain(
diff --git a/test/dotnet-migrate.Tests/GivenThatIWantToMigrateSolutions.cs b/test/dotnet-migrate.Tests/GivenThatIWantToMigrateSolutions.cs
index 17ee1299a..ad29bec23 100644
--- a/test/dotnet-migrate.Tests/GivenThatIWantToMigrateSolutions.cs
+++ b/test/dotnet-migrate.Tests/GivenThatIWantToMigrateSolutions.cs
@@ -14,6 +14,35 @@ namespace Microsoft.DotNet.Migration.Tests
{
public class GivenThatIWantToMigrateSolutions : TestBase
{
+ [Theory]
+ [InlineData("PJAppWithSlnVersion14", "Visual Studio 15", "15.0.26114.2", "10.0.40219.1")]
+ [InlineData("PJAppWithSlnVersion15", "Visual Studio 15 Custom", "15.9.12345.4", "10.9.1234.5")]
+ [InlineData("PJAppWithSlnVersionUnknown", "Visual Studio 15", "15.0.26114.2", "10.0.40219.1")]
+ public void ItMigratesSlnAndEnsuresAtLeastVS15(
+ string projectName,
+ string productDescription,
+ string visualStudioVersion,
+ string minVisualStudioVersion)
+ {
+ var projectDirectory = TestAssets
+ .Get("NonRestoredTestProjects", projectName)
+ .CreateInstance()
+ .WithSourceFiles()
+ .Root;
+
+ var solutionRelPath = "TestApp.sln";
+
+ new DotnetCommand()
+ .WithWorkingDirectory(projectDirectory)
+ .Execute($"migrate \"{solutionRelPath}\"")
+ .Should().Pass();
+
+ SlnFile slnFile = SlnFile.Read(Path.Combine(projectDirectory.FullName, solutionRelPath));
+ slnFile.ProductDescription.Should().Be(productDescription);
+ slnFile.VisualStudioVersion.Should().Be(visualStudioVersion);
+ slnFile.MinimumVisualStudioVersion.Should().Be(minVisualStudioVersion);
+ }
+
[Fact]
public void ItMigratesAndBuildsSln()
{
diff --git a/test/dotnet-migrate.Tests/GivenThatIWantToMigrateTestApps.cs b/test/dotnet-migrate.Tests/GivenThatIWantToMigrateTestApps.cs
index 66922a9d7..fe7739295 100644
--- a/test/dotnet-migrate.Tests/GivenThatIWantToMigrateTestApps.cs
+++ b/test/dotnet-migrate.Tests/GivenThatIWantToMigrateTestApps.cs
@@ -177,6 +177,18 @@ namespace Microsoft.DotNet.Migration.Tests
i => i.Include == "EntityFramework" && i.ItemType == "PackageReference")
.Should().HaveCount(2);
}
+ [Fact]
+ public void ItMigratesAProjectThatDependsOnAMigratedProjectWithTheSkipProjectReferenceFlag()
+ {
+ const string dependentProject = "ProjectA";
+ const string dependencyProject = "ProjectB";
+
+ var projectDirectory = TestAssetsManager.CreateTestInstance("TestAppDependencyGraph").Path;
+
+ MigrateProject(Path.Combine(projectDirectory, dependencyProject));
+
+ MigrateProject("--skip-project-references", Path.Combine(projectDirectory, dependentProject));
+ }
[Fact]
public void ItAddsMicrosoftNetWebSdkToTheSdkAttributeOfAWebApp()