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>
<BundledTemplate Include="Microsoft.DotNet.Common.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.Test.ProjectTemplates.2.0" Version="$(TemplateEngineTemplateVersion)" />
<BundledTemplate Include="Microsoft.DotNet.Web.ProjectTemplates.2.0" Version="$(TemplateEngineTemplateVersion)" />
<BundledTemplate Include="Microsoft.DotNet.Common.ProjectTemplates.2.1" Version="$(TemplateEngineTemplate2_0Version)" />
<BundledTemplate Include="Microsoft.DotNet.Test.ProjectTemplates.2.1" Version="$(TemplateEngineTemplateVersion)" />
<BundledTemplate Include="Microsoft.DotNet.Web.ProjectTemplates.2.1" Version="$(TemplateEngineTemplateVersion)" />
<BundledTemplate Include="Microsoft.DotNet.Web.Spa.ProjectTemplates" Version="$(SpaTemplateVersion)" />
</ItemGroup>
</Project>

View file

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

View file

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

View file

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

View file

@ -44,11 +44,16 @@ namespace Microsoft.DotNet.New.Tests
var rootPath = TestAssets.CreateTestDirectory().FullName;
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)
{
var projectFolder = Path.Combine(rootPath, cSharpTemplate + "1");
Directory.CreateDirectory(projectFolder);
CreateAndRestoreNewProject(cSharpTemplate, projectFolder, packagesDirectory);
CreateAndRestoreNewProject(cSharpTemplate, projectFolder, packagesDirectory, configFile);
}
Directory.EnumerateFiles(packagesDirectory, $"*.nupkg", SearchOption.AllDirectories)
@ -58,25 +63,24 @@ namespace Microsoft.DotNet.New.Tests
private void CreateAndRestoreNewProject(
string projectType,
string projectFolder,
string packagesDirectory)
string packagesDirectory,
string configFile)
{
var repoRootNuGetConfig = Path.Combine(RepoDirectoriesProvider.RepoRoot, "NuGet.Config");
new NewCommand()
.WithWorkingDirectory(projectFolder)
.Execute($"{projectType} --debug:ephemeral-hive --no-restore")
.Should().Pass();
// https://github.com/dotnet/templating/issues/946 - remove DisableImplicitAssetTargetFallback once this is fixed.
new RestoreCommand()
.WithWorkingDirectory(projectFolder)
.Execute($"--configfile {repoRootNuGetConfig} --packages {packagesDirectory} /p:DisableImplicitAssetTargetFallback=true")
.Execute($"--configfile {configFile} --packages {packagesDirectory}")
.Should().Pass();
}
[Theory(Skip = "https://github.com/dotnet/cli/issues/7476")]
[Theory]
[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)
{
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#", "mstest", false, false)]
[InlineData("C#", "xunit", false, false)]
[InlineData("C#", "web", false, false)]
[InlineData("C#", "mvc", false, false)]
[InlineData("C#", "webapi", false, false)]
[InlineData("C#", "web", true, false)]
[InlineData("C#", "mvc", true, false)]
[InlineData("C#", "webapi", true, false)]
[InlineData("C#", "angular", false, true)]
[InlineData("C#", "react", false, true)]
[InlineData("C#", "reactredux", false, true)]
[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#", "mstest", false, false)]
[InlineData("F#", "xunit", false, false)]
@ -62,10 +62,9 @@ namespace Microsoft.DotNet.New.Tests
Directory.CreateDirectory(Path.Combine(rootPath, "wwwroot", "dist"));
}
// https://github.com/dotnet/templating/issues/946 - remove DisableImplicitAssetTargetFallback once this is fixed.
new TestCommand("dotnet")
.WithWorkingDirectory(rootPath)
.Execute($"restore /p:DisableImplicitAssetTargetFallback=true")
.Execute($"restore")
.Should().Pass();
var buildResult = new TestCommand("dotnet")

View file

@ -5,6 +5,7 @@
<clear />
<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="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-release" value="https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json" />
</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()
{
var rootPath = TestAssets.CreateTestDirectory().FullName;

View file

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