Merge pull request #7001 from dotnet/merges/release/2.0.0-to-master-20170626-070030

Merge release/2.0.0 to master
This commit is contained in:
Livar 2017-06-26 11:25:58 -07:00 committed by GitHub
commit eeddfb6ea1
21 changed files with 132 additions and 14 deletions

View file

@ -41,7 +41,7 @@
<!-- infrastructure and test only dependencies -->
<PropertyGroup>
<VersionToolsVersion>1.0.27-prerelease-01611-04</VersionToolsVersion>
<VersionToolsVersion>1.0.27-prerelease-01723-01</VersionToolsVersion>
<DotnetDebToolVersion>2.0.0-preview2-25331-01</DotnetDebToolVersion>
</PropertyGroup>
</Project>

View file

@ -54,9 +54,8 @@
CommitHash="$(CommitHash)"
Coherent="$(Coherent)" />
<!-- Uncomment the line below when https://github.com/dotnet/buildtools/issues/1547 gets fixed. -->
<!-- <UpdateVersionsRepo BranchName="$(BranchName)"
<UpdateVersionsRepo BranchName="$(BranchName)"
PackagesDirectory="$(PackagesDirectory)"
GitHubPassword="$(GITHUB_PASSWORD)" /> -->
GitHubPassword="$(GITHUB_PASSWORD)" />
</Target>
</Project>

View file

@ -82,7 +82,8 @@ namespace Microsoft.DotNet.Scripts
private static string GetDefaultCoreSetupVersionFragment()
{
string coreSetupChannel = GetRepoMSBuildPropValue("BundledRuntimes.props", "CoreSetupChannel") ?? "master";
// by default, the current core-setup branch should match the current cli branch name
string coreSetupChannel = Instance.GitHubUpstreamBranch;
return $"dotnet/core-setup/{coreSetupChannel}";
}

View file

@ -16,3 +16,4 @@ using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("dotnet-sln-list.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("dotnet-sln-remove.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("dotnet-msbuild.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
[assembly: InternalsVisibleTo("dotnet-run.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]

View file

@ -196,4 +196,7 @@ The current {1} is '{2}'.</value>
<value>An error was encountered when reading launchSettings.json.
{0}</value>
</data>
<data name="RunCommandSpecifiecFileIsNotAValidProject" xml:space="preserve">
<value>'{0}' is not a valid project file.</value>
</data>
</root>

View file

@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.Build.Evaluation;
using Microsoft.Build.Exceptions;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.Tools;
using Microsoft.DotNet.Tools.MSBuild;
@ -39,17 +40,26 @@ namespace Microsoft.DotNet.Tools.Run
EnsureProjectIsBuilt();
}
ICommand runCommand = GetRunCommand();
int launchSettingsApplicationResult = ApplyLaunchProfileSettingsIfNeeded(ref runCommand);
if (launchSettingsApplicationResult != 0)
try
{
return launchSettingsApplicationResult;
}
ICommand runCommand = GetRunCommand();
int launchSettingsApplicationResult = ApplyLaunchProfileSettingsIfNeeded(ref runCommand);
return runCommand
.Execute()
.ExitCode;
if (launchSettingsApplicationResult != 0)
{
return launchSettingsApplicationResult;
}
return runCommand
.Execute()
.ExitCode;
}
catch (InvalidProjectFileException e)
{
throw new GracefulException(
string.Format(LocalizableStrings.RunCommandSpecifiecFileIsNotAValidProject, Project),
e);
}
}
public RunCommand(string configuration,

View file

@ -136,6 +136,11 @@ Aktuální {1} je {2}.</target>
{0}</target>
<note />
</trans-unit>
<trans-unit id="RunCommandSpecifiecFileIsNotAValidProject">
<source>'{0}' is not a valid project file.</source>
<target state="new">'{0}' is not a valid project file.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -136,6 +136,11 @@ Ein ausführbares Projekt sollte ein ausführbares TFM (z.B. netcoreapp2.0) verw
{0}</target>
<note />
</trans-unit>
<trans-unit id="RunCommandSpecifiecFileIsNotAValidProject">
<source>'{0}' is not a valid project file.</source>
<target state="new">'{0}' is not a valid project file.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -136,6 +136,11 @@ El actual {1} es '{2}'.</target>
{0}</target>
<note />
</trans-unit>
<trans-unit id="RunCommandSpecifiecFileIsNotAValidProject">
<source>'{0}' is not a valid project file.</source>
<target state="new">'{0}' is not a valid project file.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -136,6 +136,11 @@ Le {1} actuel est '{2}'.</target>
{0}</target>
<note />
</trans-unit>
<trans-unit id="RunCommandSpecifiecFileIsNotAValidProject">
<source>'{0}' is not a valid project file.</source>
<target state="new">'{0}' is not a valid project file.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -136,6 +136,11 @@ Il valore corrente di {1} è '{2}'.</target>
{0}</target>
<note />
</trans-unit>
<trans-unit id="RunCommandSpecifiecFileIsNotAValidProject">
<source>'{0}' is not a valid project file.</source>
<target state="new">'{0}' is not a valid project file.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -136,6 +136,11 @@ The current {1} is '{2}'.</source>
{0}</target>
<note />
</trans-unit>
<trans-unit id="RunCommandSpecifiecFileIsNotAValidProject">
<source>'{0}' is not a valid project file.</source>
<target state="new">'{0}' is not a valid project file.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -136,6 +136,11 @@ The current {1} is '{2}'.</source>
{0}</target>
<note />
</trans-unit>
<trans-unit id="RunCommandSpecifiecFileIsNotAValidProject">
<source>'{0}' is not a valid project file.</source>
<target state="new">'{0}' is not a valid project file.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -136,6 +136,11 @@ Bieżący element {1}: „{2}”.</target>
{0}</target>
<note />
</trans-unit>
<trans-unit id="RunCommandSpecifiecFileIsNotAValidProject">
<source>'{0}' is not a valid project file.</source>
<target state="new">'{0}' is not a valid project file.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -136,6 +136,11 @@ O {1} atual é '{2}'.</target>
{0}</target>
<note />
</trans-unit>
<trans-unit id="RunCommandSpecifiecFileIsNotAValidProject">
<source>'{0}' is not a valid project file.</source>
<target state="new">'{0}' is not a valid project file.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -136,6 +136,11 @@ The current {1} is '{2}'.</source>
{0}</target>
<note />
</trans-unit>
<trans-unit id="RunCommandSpecifiecFileIsNotAValidProject">
<source>'{0}' is not a valid project file.</source>
<target state="new">'{0}' is not a valid project file.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -136,6 +136,11 @@ Geçerli {1}: '{2}'.</target>
{0}</target>
<note />
</trans-unit>
<trans-unit id="RunCommandSpecifiecFileIsNotAValidProject">
<source>'{0}' is not a valid project file.</source>
<target state="new">'{0}' is not a valid project file.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -136,6 +136,11 @@ The current {1} is '{2}'.</source>
{0}</target>
<note />
</trans-unit>
<trans-unit id="RunCommandSpecifiecFileIsNotAValidProject">
<source>'{0}' is not a valid project file.</source>
<target state="new">'{0}' is not a valid project file.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -136,6 +136,11 @@ The current {1} is '{2}'.</source>
{0}</target>
<note />
</trans-unit>
<trans-unit id="RunCommandSpecifiecFileIsNotAValidProject">
<source>'{0}' is not a valid project file.</source>
<target state="new">'{0}' is not a valid project file.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -0,0 +1,35 @@
// 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.IO;
using FluentAssertions;
using Microsoft.DotNet.TestFramework;
using Microsoft.DotNet.Tools.Test.Utilities;
using Xunit;
namespace Microsoft.DotNet.Cli.Run.Tests
{
public class GivenThatWeCanPassNonProjectFilesToDotnetRun : TestBase
{
[Fact]
public void ItFailsWithAnAppropriateErrorMessage()
{
var projectDirectory = TestAssets
.Get("SlnFileWithNoProjectReferences")
.CreateInstance()
.WithSourceFiles()
.Root
.FullName;
var slnFullPath = Path.Combine(projectDirectory, "SlnFileWithNoProjectReferences.sln");
new RunCommand()
.ExecuteWithCapturedOutput($"-p {slnFullPath}")
.Should().Fail()
.And.HaveStdErrContaining(
string.Format(
Microsoft.DotNet.Tools.Run.LocalizableStrings.RunCommandSpecifiecFileIsNotAValidProject,
slnFullPath));
}
}
}

View file

@ -6,11 +6,15 @@
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<AssemblyName>dotnet-run.Tests</AssemblyName>
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<AssetTargetFallback>$(AssetTargetFallback);dotnet5.4;portable-net451+win8</AssetTargetFallback>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.DotNet.Tools.Tests.Utilities\Microsoft.DotNet.Tools.Tests.Utilities.csproj" />
<ProjectReference Include="..\..\src\dotnet\dotnet.csproj" />
</ItemGroup>
<ItemGroup>