Merge branch 'rel/1.0.0' into dev/jgoshi/issue5355
This commit is contained in:
commit
c109dc29b7
8 changed files with 67 additions and 24 deletions
|
@ -6,7 +6,7 @@
|
|||
<CLI_NETSDK_Version>1.0.0-alpha-20170117-4</CLI_NETSDK_Version>
|
||||
<CLI_NuGet_Version>4.0.0-rc3</CLI_NuGet_Version>
|
||||
<CLI_WEBSDK_Version>1.0.0-alpha-20170120-3-249</CLI_WEBSDK_Version>
|
||||
<CLI_TestPlatform_Version>15.0.0-preview-20170106-08</CLI_TestPlatform_Version>
|
||||
<CLI_TestPlatform_Version>15.0.0-preview-20170123-02</CLI_TestPlatform_Version>
|
||||
<TemplateEngineVersion>1.0.0-beta1-20170108-83</TemplateEngineVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -32,5 +32,33 @@ Defaults to current directory if nothing is specified.";
|
|||
public const string MigrationFailedError = "Migration failed.";
|
||||
|
||||
public const string MigrationAdditionalHelp = "Your project has been migrated to the .csproj format and can be used with this build of the .NET Core Tools. Please visit https://aka.ms/coremigration to report issues or ask for help.";
|
||||
|
||||
public const string MigrationReportSummary = "Summary";
|
||||
|
||||
public const string MigrationReportTotalProjects = "Total Projects: {0}";
|
||||
|
||||
public const string MigrationReportSucceededProjects = "Succeeded Projects: {0}";
|
||||
|
||||
public const string MigrationReportFailedProjects = "Failed Projects: {0}";
|
||||
|
||||
public const string ProjectMigrationSucceeded = "Project {0} migration succeeded ({1}).";
|
||||
|
||||
public const string ProjectMigrationFailed = "Project {0} migration failed ({1}).";
|
||||
|
||||
public const string MigrationFailedToFindProjectInGlobalJson = "Unable to find any projects in global.json.";
|
||||
|
||||
public const string MigrationUnableToFindProjects = "Unable to find any projects in {0}.";
|
||||
|
||||
public const string MigrationProjectJsonNotFound = "No project.json file found in '{0}'.";
|
||||
|
||||
public const string MigrationInvalidProjectArgument = "Invalid project argument - '{0}' is not a project.json, global.json, or solution.sln file and a directory named '{0}' doesn't exist.";
|
||||
|
||||
public const string MigratonUnableToFindProjectJson = "Unable to find project.json file at {0}.";
|
||||
|
||||
public const string MigrationUnableToFindGlobalJson = "Unable to find global settings file at {0}.";
|
||||
|
||||
public const string MigrationUnableToFindSolutionFile = "Unable to find the solution file at {0}.";
|
||||
|
||||
public const string MigrateFilesBackupLocation = "Files backed up to {0}";
|
||||
}
|
||||
}
|
|
@ -236,7 +236,9 @@ namespace Microsoft.DotNet.Tools.Migrate
|
|||
|
||||
backupPlan.PerformBackup();
|
||||
|
||||
Reporter.Output.WriteLine($"Files backed up to {backupPlan.RootBackupDirectory.FullName}");
|
||||
Reporter.Output.WriteLine(string.Format(
|
||||
LocalizableStrings.MigrateFilesBackupLocation,
|
||||
backupPlan.RootBackupDirectory.FullName));
|
||||
}
|
||||
|
||||
private void WriteReport(MigrationReport migrationReport)
|
||||
|
@ -307,10 +309,15 @@ namespace Microsoft.DotNet.Tools.Migrate
|
|||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.AppendLine("Summary");
|
||||
sb.AppendLine($"Total Projects: {migrationReport.MigratedProjectsCount}");
|
||||
sb.AppendLine($"Succeeded Projects: {migrationReport.SucceededProjectsCount}");
|
||||
sb.AppendLine($"Failed Projects: {migrationReport.FailedProjectsCount}");
|
||||
sb.AppendLine(LocalizableStrings.MigrationReportSummary);
|
||||
sb.AppendLine(
|
||||
string.Format(LocalizableStrings.MigrationReportTotalProjects, migrationReport.MigratedProjectsCount));
|
||||
sb.AppendLine(string.Format(
|
||||
LocalizableStrings.MigrationReportSucceededProjects,
|
||||
migrationReport.SucceededProjectsCount));
|
||||
sb.AppendLine(string.Format(
|
||||
LocalizableStrings.MigrationReportFailedProjects,
|
||||
migrationReport.FailedProjectsCount));
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
@ -318,7 +325,10 @@ namespace Microsoft.DotNet.Tools.Migrate
|
|||
private string GetProjectReportSuccessContent(ProjectMigrationReport projectMigrationReport, bool colored)
|
||||
{
|
||||
Func<string, string> GreenIfColored = (str) => colored ? str.Green() : str;
|
||||
return GreenIfColored($"Project {projectMigrationReport.ProjectName} migration succeeded ({projectMigrationReport.ProjectDirectory})");
|
||||
return GreenIfColored(string.Format(
|
||||
LocalizableStrings.ProjectMigrationSucceeded,
|
||||
projectMigrationReport.ProjectName,
|
||||
projectMigrationReport.ProjectDirectory));
|
||||
}
|
||||
|
||||
private string GetProjectReportErrorContent(ProjectMigrationReport projectMigrationReport, bool colored)
|
||||
|
@ -328,7 +338,10 @@ namespace Microsoft.DotNet.Tools.Migrate
|
|||
|
||||
if (projectMigrationReport.Errors.Any())
|
||||
{
|
||||
sb.AppendLine(RedIfColored($"Project {projectMigrationReport.ProjectName} migration failed ({projectMigrationReport.ProjectDirectory})"));
|
||||
sb.AppendLine(RedIfColored(string.Format(
|
||||
LocalizableStrings.ProjectMigrationFailed,
|
||||
projectMigrationReport.ProjectName,
|
||||
projectMigrationReport.ProjectDirectory)));
|
||||
|
||||
foreach (var error in projectMigrationReport.Errors.Select(e => e.GetFormattedErrorMessage()))
|
||||
{
|
||||
|
@ -358,7 +371,7 @@ namespace Microsoft.DotNet.Tools.Migrate
|
|||
|
||||
if (!projects.Any())
|
||||
{
|
||||
throw new GracefulException("Unable to find any projects in global.json");
|
||||
throw new GracefulException(LocalizableStrings.MigrationFailedToFindProjectInGlobalJson);
|
||||
}
|
||||
}
|
||||
else if (File.Exists(projectArg) &&
|
||||
|
@ -368,7 +381,8 @@ namespace Microsoft.DotNet.Tools.Migrate
|
|||
|
||||
if (!projects.Any())
|
||||
{
|
||||
throw new GracefulException($"Unable to find any projects in {projectArg}");
|
||||
throw new GracefulException(
|
||||
string.Format(LocalizableStrings.MigrationUnableToFindProjects, projectArg));
|
||||
}
|
||||
}
|
||||
else if (Directory.Exists(projectArg))
|
||||
|
@ -377,12 +391,14 @@ namespace Microsoft.DotNet.Tools.Migrate
|
|||
|
||||
if (!projects.Any())
|
||||
{
|
||||
throw new GracefulException($"No project.json file found in '{projectArg}'");
|
||||
throw new GracefulException(
|
||||
string.Format(LocalizableStrings.MigrationProjectJsonNotFound, projectArg));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new GracefulException($"Invalid project argument - '{projectArg}' is not a project.json, global.json, or solution.sln file and a directory named '{projectArg}' doesn't exist.");
|
||||
throw new GracefulException(
|
||||
string.Format(LocalizableStrings.MigrationInvalidProjectArgument, projectArg));
|
||||
}
|
||||
|
||||
foreach (var project in projects)
|
||||
|
@ -408,7 +424,7 @@ namespace Microsoft.DotNet.Tools.Migrate
|
|||
return projectJson;
|
||||
}
|
||||
|
||||
throw new GracefulException($"Unable to find project file at {projectJson}");
|
||||
throw new GracefulException(string.Format(LocalizableStrings.MigratonUnableToFindProjectJson, projectJson));
|
||||
}
|
||||
|
||||
private IEnumerable<string> GetProjectsFromGlobalJson(string globalJson)
|
||||
|
@ -440,7 +456,8 @@ namespace Microsoft.DotNet.Tools.Migrate
|
|||
{
|
||||
if (!File.Exists(globalJson))
|
||||
{
|
||||
throw new GracefulException($"Unable to find global settings file at {globalJson}");
|
||||
throw new GracefulException(
|
||||
string.Format(LocalizableStrings.MigrationUnableToFindGlobalJson, globalJson));
|
||||
}
|
||||
|
||||
var globalJsonDirectory = Path.GetDirectoryName(globalJson);
|
||||
|
@ -451,7 +468,8 @@ namespace Microsoft.DotNet.Tools.Migrate
|
|||
{
|
||||
if (!File.Exists(slnPath))
|
||||
{
|
||||
throw new GracefulException($"Unable to find the solution file at {slnPath}");
|
||||
throw new GracefulException(
|
||||
string.Format(LocalizableStrings.MigrationUnableToFindSolutionFile, slnPath));
|
||||
}
|
||||
|
||||
_slnFile = SlnFile.Read(slnPath);
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170106-08" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170123-02" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="1.1.8-rc" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="1.0.8-rc" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170106-08" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170123-02" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta5-build3474" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta5-build1225" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<Project Sdk="FSharp.NET.Sdk;Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
|
||||
</PropertyGroup>
|
||||
|
@ -14,7 +13,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="FSharp.NET.Sdk" Version="1.0.0-beta-*" PrivateAssets="All"/>
|
||||
<PackageReference Include="Microsoft.FSharp.Core.netcore" Version="1.0.0-alpha-161023" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170106-08" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170123-02" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="1.1.8-rc" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="1.0.8-rc" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<Project Sdk="FSharp.NET.Sdk;Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
|
||||
</PropertyGroup>
|
||||
|
@ -14,7 +13,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="FSharp.NET.Sdk" Version="1.0.0-beta-*" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.FSharp.Core.netcore" Version="1.0.0-alpha-161023" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170106-08" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170123-02" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta5-build3474" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta5-build1225" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -55,7 +55,8 @@
|
|||
|
||||
public const string RunSettingsArgsHelpText = @"Any extra commandline runsettings arguments that should be passed to vstest. See 'dotnet vstest --help' for available options.
|
||||
Example: -- RunConfiguration.ResultsDirectory=""C:\users\user\desktop\Results Directory"" MSTest.DeploymentEnabled=false";
|
||||
public const string CmdResultsDirectoryDescription = @"Test results directory will be created in specified path if not exists.
|
||||
|
||||
public const string CmdResultsDirectoryDescription = @"The test results directory will be created in the specified path if it does not exist.
|
||||
Example: --results-directory <PATH_TO_RESULTS_DIRECTORY>";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue