Merge pull request #9772 from dotnet/merges/release/2.1.4xx-to-release/2.2.1xx

Merge release/2.1.4xx to release/2.2.1xx
This commit is contained in:
Peter Huene 2018-07-31 23:35:45 -07:00 committed by GitHub
commit 1f2ad7c354
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 142 additions and 2 deletions

View file

@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.2</TargetFrameworks>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,12 @@
using System;
namespace MultitargetedCS
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}

View file

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.2</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,8 @@
// Learn more about F# at http://fsharp.org
open System
[<EntryPoint>]
let main argv =
printfn "Hello World from F#!"
0 // return an integer exit code

View file

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<RootNamespace>MultitargetedVB</RootNamespace>
<TargetFrameworks>netcoreapp2.2</TargetFrameworks>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,7 @@
Imports System
Module Program
Sub Main(args As String())
Console.WriteLine("Hello World!")
End Sub
End Module

View file

@ -0,0 +1,18 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View file

@ -23,7 +23,7 @@
<MicrosoftNETCoreCompilersPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftNETCoreCompilersPackageVersion>
<MicrosoftCodeAnalysisBuildTasksPackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftCodeAnalysisBuildTasksPackageVersion>
<MicrosoftNetCompilersNetcorePackageVersion>$(MicrosoftCodeAnalysisCSharpPackageVersion)</MicrosoftNetCompilersNetcorePackageVersion>
<MicrosoftNETSdkPackageVersion>2.2.100-preview1-63118-02</MicrosoftNETSdkPackageVersion>
<MicrosoftNETSdkPackageVersion>2.2.100-preview1-63130-08</MicrosoftNETSdkPackageVersion>
<MicrosoftNETBuildExtensionsPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftNETBuildExtensionsPackageVersion>
<MicrosoftNETSdkRazorPackageVersion>2.1.1</MicrosoftNETSdkRazorPackageVersion>
<MicrosoftNETSdkWebPackageVersion>2.1.400-preview1-20180705-1834985</MicrosoftNETSdkWebPackageVersion>

View file

@ -77,7 +77,7 @@ namespace Microsoft.DotNet.New.Tests
// Remove the expectedVersion parameter once we have templates targetting netcoreapp2.2.
[Theory]
[InlineData("console", "microsoft.netcore.app", "2.1.0")]
[InlineData("classlib", "netstandard.library", null)]
[InlineData("classlib", "netstandard.library", "2.0.3")] // FIXME: This is pinned to 2.0.3 due to https://github.com/dotnet/sdk/issues/2410
public void NewProjectRestoresCorrectPackageVersion(string type, string packageName, string expectedVersion)
{
var rootPath = TestAssets.CreateTestDirectory(identifier: $"_{type}").FullName;

View file

@ -1012,6 +1012,72 @@ EndGlobal
.Should().BeVisuallyEquivalentTo(ExpectedSlnFileAfterAddingProjectWithAdditionalConfigs);
}
[Fact]
public void ItAddsACSharpProjectThatIsMultitargeted()
{
var solutionDirectory = TestAssets
.Get("TestAppsWithSlnAndMultitargetedProjects")
.CreateInstance()
.WithSourceFiles()
.Root
.FullName;
var slnFullPath = Path.Combine(solutionDirectory, "App.sln");
var projectToAdd = Path.Combine("MultitargetedCS", "MultitargetedCS.csproj");
new DotnetCommand()
.WithWorkingDirectory(solutionDirectory)
.ExecuteWithCapturedOutput($"sln add {projectToAdd}")
.Should()
.Pass()
.And
.HaveStdOutContaining(string.Format(CommonLocalizableStrings.ProjectAddedToTheSolution, projectToAdd));
}
[Fact]
public void ItAddsAVisualBasicProjectThatIsMultitargeted()
{
var solutionDirectory = TestAssets
.Get("TestAppsWithSlnAndMultitargetedProjects")
.CreateInstance()
.WithSourceFiles()
.Root
.FullName;
var slnFullPath = Path.Combine(solutionDirectory, "App.sln");
var projectToAdd = Path.Combine("MultitargetedVB", "MultitargetedVB.vbproj");
new DotnetCommand()
.WithWorkingDirectory(solutionDirectory)
.ExecuteWithCapturedOutput($"sln add {projectToAdd}")
.Should()
.Pass()
.And
.HaveStdOutContaining(string.Format(CommonLocalizableStrings.ProjectAddedToTheSolution, projectToAdd));
}
[Fact]
public void ItAddsAnFSharpProjectThatIsMultitargeted()
{
var solutionDirectory = TestAssets
.Get("TestAppsWithSlnAndMultitargetedProjects")
.CreateInstance()
.WithSourceFiles()
.Root
.FullName;
var slnFullPath = Path.Combine(solutionDirectory, "App.sln");
var projectToAdd = Path.Combine("MultitargetedFS", "MultitargetedFS.fsproj");
new DotnetCommand()
.WithWorkingDirectory(solutionDirectory)
.ExecuteWithCapturedOutput($"sln add {projectToAdd}")
.Should()
.Pass()
.And
.HaveStdOutContaining(string.Format(CommonLocalizableStrings.ProjectAddedToTheSolution, projectToAdd));
}
private string GetExpectedSlnContents(
string slnPath,
string slnTemplate,