Merge pull request #7554 from seancpeters/update_templates_to_2.1.0_versions

Updating new templates to 2.1.0 versions
This commit is contained in:
Nick Guerrera 2017-09-01 11:32:35 -07:00 committed by GitHub
commit fba2302b45
9 changed files with 28 additions and 24 deletions

View file

@ -2,9 +2,9 @@
<ItemGroup> <ItemGroup>
<BundledTemplate Include="Microsoft.DotNet.Common.ItemTemplates" Version="$(TemplateEngineTemplateVersion)" /> <BundledTemplate Include="Microsoft.DotNet.Common.ItemTemplates" Version="$(TemplateEngineTemplateVersion)" />
<BundledTemplate Include="Microsoft.DotNet.Web.ItemTemplates" Version="$(TemplateEngineTemplateVersion)" /> <BundledTemplate Include="Microsoft.DotNet.Web.ItemTemplates" Version="$(TemplateEngineTemplateVersion)" />
<BundledTemplate Include="Microsoft.DotNet.Common.ProjectTemplates.2.0" Version="$(TemplateEngineTemplate2_0Version)" /> <BundledTemplate Include="Microsoft.DotNet.Common.ProjectTemplates.2.1" Version="$(TemplateEngineTemplate2_0Version)" />
<BundledTemplate Include="Microsoft.DotNet.Test.ProjectTemplates.2.0" Version="$(TemplateEngineTemplateVersion)" /> <BundledTemplate Include="Microsoft.DotNet.Test.ProjectTemplates.2.1" Version="$(TemplateEngineTemplateVersion)" />
<BundledTemplate Include="Microsoft.DotNet.Web.ProjectTemplates.2.0" Version="$(TemplateEngineTemplateVersion)" /> <BundledTemplate Include="Microsoft.DotNet.Web.ProjectTemplates.2.1" Version="$(TemplateEngineTemplateVersion)" />
<BundledTemplate Include="Microsoft.DotNet.Web.Spa.ProjectTemplates" Version="$(SpaTemplateVersion)" /> <BundledTemplate Include="Microsoft.DotNet.Web.Spa.ProjectTemplates" Version="$(SpaTemplateVersion)" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -22,9 +22,9 @@
<SharedFrameworkVersion>$(CLI_SharedFrameworkVersion)</SharedFrameworkVersion> <SharedFrameworkVersion>$(CLI_SharedFrameworkVersion)</SharedFrameworkVersion>
<SharedHostVersion>$(CLI_SharedFrameworkVersion)</SharedHostVersion> <SharedHostVersion>$(CLI_SharedFrameworkVersion)</SharedHostVersion>
<HostFxrVersion>$(CLI_SharedFrameworkVersion)</HostFxrVersion> <HostFxrVersion>$(CLI_SharedFrameworkVersion)</HostFxrVersion>
<TemplateEngineVersion>1.0.0-beta2-20170810-304</TemplateEngineVersion> <TemplateEngineVersion>1.0.0-beta2-20170828-305</TemplateEngineVersion>
<TemplateEngineTemplateVersion>1.0.0-beta2-20170810-304</TemplateEngineTemplateVersion> <TemplateEngineTemplateVersion>1.0.0-beta2-20170828-305</TemplateEngineTemplateVersion>
<TemplateEngineTemplate2_0Version>1.0.0-beta2-20170810-304</TemplateEngineTemplate2_0Version> <TemplateEngineTemplate2_0Version>1.0.0-beta2-20170828-305</TemplateEngineTemplate2_0Version>
<PlatformAbstractionsVersion>2.1.0-preview2-25616-02</PlatformAbstractionsVersion> <PlatformAbstractionsVersion>2.1.0-preview2-25616-02</PlatformAbstractionsVersion>
<DependencyModelVersion>2.1.0-preview2-25616-02</DependencyModelVersion> <DependencyModelVersion>2.1.0-preview2-25616-02</DependencyModelVersion>
<CliCommandLineParserVersion>0.1.1-alpha-167</CliCommandLineParserVersion> <CliCommandLineParserVersion>0.1.1-alpha-167</CliCommandLineParserVersion>

View file

@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
{ {
public class GivenDotNetUsesMSBuild : TestBase public class GivenDotNetUsesMSBuild : TestBase
{ {
[Fact(Skip = "https://github.com/dotnet/cli/issues/7476")] [Fact]
public void ItCanNewRestoreBuildRunCleanMSBuildProject() public void ItCanNewRestoreBuildRunCleanMSBuildProject()
{ {
using (DisposableDirectory directory = Temp.CreateDirectory()) using (DisposableDirectory directory = Temp.CreateDirectory())

View file

@ -85,7 +85,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests
.And.HaveStdOutContaining("project.assets.json"); .And.HaveStdOutContaining("project.assets.json");
} }
[Fact(Skip = "https://github.com/dotnet/cli/issues/7476")] [Fact]
public void ItRunsWhenRestoringToSpecificPackageDir() public void ItRunsWhenRestoringToSpecificPackageDir()
{ {
var rootPath = TestAssets.CreateTestDirectory().FullName; var rootPath = TestAssets.CreateTestDirectory().FullName;

View file

@ -44,11 +44,16 @@ namespace Microsoft.DotNet.New.Tests
var rootPath = TestAssets.CreateTestDirectory().FullName; var rootPath = TestAssets.CreateTestDirectory().FullName;
var packagesDirectory = Path.Combine(rootPath, "packages"); var packagesDirectory = Path.Combine(rootPath, "packages");
// For testing the 2.1 templates - some of their packages are currently only in private feeds.
var configFile = Path.Combine(rootPath, "..", "..", "..", "..", "..", "NuGet.tempaspnetpatch.config");
// For "normal" builds, once the packages needed for 2.1 templates are in the public feeds
//var configFile = Path.Combine(RepoDirectoriesProvider.RepoRoot, "NuGet.Config");
foreach (string cSharpTemplate in cSharpTemplates) foreach (string cSharpTemplate in cSharpTemplates)
{ {
var projectFolder = Path.Combine(rootPath, cSharpTemplate + "1"); var projectFolder = Path.Combine(rootPath, cSharpTemplate + "1");
Directory.CreateDirectory(projectFolder); Directory.CreateDirectory(projectFolder);
CreateAndRestoreNewProject(cSharpTemplate, projectFolder, packagesDirectory); CreateAndRestoreNewProject(cSharpTemplate, projectFolder, packagesDirectory, configFile);
} }
Directory.EnumerateFiles(packagesDirectory, $"*.nupkg", SearchOption.AllDirectories) Directory.EnumerateFiles(packagesDirectory, $"*.nupkg", SearchOption.AllDirectories)
@ -58,25 +63,24 @@ namespace Microsoft.DotNet.New.Tests
private void CreateAndRestoreNewProject( private void CreateAndRestoreNewProject(
string projectType, string projectType,
string projectFolder, string projectFolder,
string packagesDirectory) string packagesDirectory,
string configFile)
{ {
var repoRootNuGetConfig = Path.Combine(RepoDirectoriesProvider.RepoRoot, "NuGet.Config");
new NewCommand() new NewCommand()
.WithWorkingDirectory(projectFolder) .WithWorkingDirectory(projectFolder)
.Execute($"{projectType} --debug:ephemeral-hive --no-restore") .Execute($"{projectType} --debug:ephemeral-hive --no-restore")
.Should().Pass(); .Should().Pass();
// https://github.com/dotnet/templating/issues/946 - remove DisableImplicitAssetTargetFallback once this is fixed.
new RestoreCommand() new RestoreCommand()
.WithWorkingDirectory(projectFolder) .WithWorkingDirectory(projectFolder)
.Execute($"--configfile {repoRootNuGetConfig} --packages {packagesDirectory} /p:DisableImplicitAssetTargetFallback=true") .Execute($"--configfile {configFile} --packages {packagesDirectory}")
.Should().Pass(); .Should().Pass();
} }
[Theory(Skip = "https://github.com/dotnet/cli/issues/7476")] [Theory]
[InlineData("console", "RuntimeFrameworkVersion", "microsoft.netcore.app")] [InlineData("console", "RuntimeFrameworkVersion", "microsoft.netcore.app")]
[InlineData("classlib", "NetStandardImplicitPackageVersion", "netstandard.library")] // re-enable when this bug is resolved: https://github.com/dotnet/cli/issues/7574
//[InlineData("classlib", "NetStandardImplicitPackageVersion", "netstandard.library")]
public void NewProjectRestoresCorrectPackageVersion(string type, string propertyName, string packageName) public void NewProjectRestoresCorrectPackageVersion(string type, string propertyName, string packageName)
{ {
var rootPath = TestAssets.CreateTestDirectory(identifier: $"_{type}").FullName; var rootPath = TestAssets.CreateTestDirectory(identifier: $"_{type}").FullName;

View file

@ -20,14 +20,14 @@ namespace Microsoft.DotNet.New.Tests
[InlineData("C#", "classlib", false, false)] [InlineData("C#", "classlib", false, false)]
[InlineData("C#", "mstest", false, false)] [InlineData("C#", "mstest", false, false)]
[InlineData("C#", "xunit", false, false)] [InlineData("C#", "xunit", false, false)]
[InlineData("C#", "web", false, false)] [InlineData("C#", "web", true, false)]
[InlineData("C#", "mvc", false, false)] [InlineData("C#", "mvc", true, false)]
[InlineData("C#", "webapi", false, false)] [InlineData("C#", "webapi", true, false)]
[InlineData("C#", "angular", false, true)] [InlineData("C#", "angular", false, true)]
[InlineData("C#", "react", false, true)] [InlineData("C#", "react", false, true)]
[InlineData("C#", "reactredux", false, true)] [InlineData("C#", "reactredux", false, true)]
[InlineData("F#", "console", false, false)] [InlineData("F#", "console", false, false)]
// https://github.com/dotnet/cli/issues/7476 // re-enable when this bug is resolved: https://github.com/dotnet/cli/issues/7574
//[InlineData("F#", "classlib", false, false)] //[InlineData("F#", "classlib", false, false)]
[InlineData("F#", "mstest", false, false)] [InlineData("F#", "mstest", false, false)]
[InlineData("F#", "xunit", false, false)] [InlineData("F#", "xunit", false, false)]
@ -62,10 +62,9 @@ namespace Microsoft.DotNet.New.Tests
Directory.CreateDirectory(Path.Combine(rootPath, "wwwroot", "dist")); Directory.CreateDirectory(Path.Combine(rootPath, "wwwroot", "dist"));
} }
// https://github.com/dotnet/templating/issues/946 - remove DisableImplicitAssetTargetFallback once this is fixed.
new TestCommand("dotnet") new TestCommand("dotnet")
.WithWorkingDirectory(rootPath) .WithWorkingDirectory(rootPath)
.Execute($"restore /p:DisableImplicitAssetTargetFallback=true") .Execute($"restore")
.Should().Pass(); .Should().Pass();
var buildResult = new TestCommand("dotnet") var buildResult = new TestCommand("dotnet")

View file

@ -5,6 +5,7 @@
<clear /> <clear />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" /> <add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="DotnetCore" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" /> <add key="DotnetCore" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="aspnetcore-dev" value="https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json" />
<add key="aspnet-final" value="https://dotnet.myget.org/F/aspnetcore-2-0-0-preview1-no-timestamp/api/v3/index.json" /> <add key="aspnet-final" value="https://dotnet.myget.org/F/aspnetcore-2-0-0-preview1-no-timestamp/api/v3/index.json" />
<add key="aspnet-release" value="https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json" /> <add key="aspnet-release" value="https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json" />
</packageSources> </packageSources>

View file

@ -197,7 +197,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
} }
} }
[Fact(Skip = "https://github.com/dotnet/cli/issues/7476")] [Fact]
public void ItPublishesAppWhenRestoringToSpecificPackageDirectory() public void ItPublishesAppWhenRestoringToSpecificPackageDirectory()
{ {
var rootPath = TestAssets.CreateTestDirectory().FullName; var rootPath = TestAssets.CreateTestDirectory().FullName;

View file

@ -192,7 +192,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests
.And.HaveStdOutContaining("Hello World!"); .And.HaveStdOutContaining("Hello World!");
} }
[Fact(Skip = "https://github.com/dotnet/cli/issues/7476")] [Fact]
public void ItRunsAppWhenRestoringToSpecificPackageDirectory() public void ItRunsAppWhenRestoringToSpecificPackageDirectory()
{ {
var rootPath = TestAssets.CreateTestDirectory().FullName; var rootPath = TestAssets.CreateTestDirectory().FullName;