Merge pull request #246 from dsplaisted/update-netcore
Update .NET Core version
This commit is contained in:
commit
19cfda7e38
3 changed files with 56 additions and 11 deletions
21
.vsts-ci.yml
21
.vsts-ci.yml
|
@ -238,16 +238,17 @@ jobs:
|
|||
Build_Release:
|
||||
_BuildConfig: Release
|
||||
|
||||
- template: /eng/build.yml
|
||||
parameters:
|
||||
agentOs: FreeBSD
|
||||
queue:
|
||||
name: dnceng-freebsd-internal
|
||||
timeoutInMinutes: 180
|
||||
matrix:
|
||||
Build_Release:
|
||||
_BuildConfig: Release
|
||||
_AdditionalBuildParameters: '/p:DisableSourceLink=true /p:DISABLE_CROSSGEN=true'
|
||||
# https://github.com/dotnet/core-sdk/issues/248
|
||||
# - template: /eng/build.yml
|
||||
# parameters:
|
||||
# agentOs: FreeBSD
|
||||
# queue:
|
||||
# name: dnceng-freebsd-internal
|
||||
# timeoutInMinutes: 180
|
||||
# matrix:
|
||||
# Build_Release:
|
||||
# _BuildConfig: Release
|
||||
# _AdditionalBuildParameters: '/p:DisableSourceLink=true /p:DISABLE_CROSSGEN=true'
|
||||
|
||||
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- job: Copy_SDK_To_Latest
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<DotnetWatchPackageVersion>$(MicrosoftAspNetCoreAppPackageVersion)</DotnetWatchPackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<MicrosoftNETCoreAppPackageVersion>3.0.0-preview-27218-01</MicrosoftNETCoreAppPackageVersion>
|
||||
<MicrosoftNETCoreAppPackageVersion>3.0.0-preview-27219-3</MicrosoftNETCoreAppPackageVersion>
|
||||
<MicrosoftNETCoreDotNetHostResolverPackageVersion>$(MicrosoftNETCoreAppPackageVersion)</MicrosoftNETCoreDotNetHostResolverPackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -61,6 +61,50 @@ namespace EndToEnd.Tests
|
|||
binDirectory.Should().NotHaveFilesMatching("*.dll", SearchOption.AllDirectories);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ItCanRunAnAppUsingTheWebSdk()
|
||||
{
|
||||
var directory = TestAssets.CreateTestDirectory();
|
||||
string projectDirectory = directory.FullName;
|
||||
|
||||
string newArgs = "console --debug:ephemeral-hive --no-restore";
|
||||
new NewCommandShim()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.Execute(newArgs)
|
||||
.Should().Pass();
|
||||
|
||||
string projectPath = Path.Combine(projectDirectory, directory.Name + ".csproj");
|
||||
|
||||
var project = XDocument.Load(projectPath);
|
||||
var ns = project.Root.Name.Namespace;
|
||||
|
||||
project.Root.Attribute("Sdk").Value = "Microsoft.NET.Sdk.Web";
|
||||
|
||||
project.Save(projectPath);
|
||||
|
||||
new BuildCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.Execute()
|
||||
.Should().Pass();
|
||||
|
||||
var runCommand = new RunCommand()
|
||||
.WithWorkingDirectory(projectDirectory);
|
||||
|
||||
// Set DOTNET_ROOT as workaround for https://github.com/dotnet/cli/issues/10196
|
||||
var dotnetRoot = Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest);
|
||||
if (!string.IsNullOrEmpty(dotnetRoot))
|
||||
{
|
||||
bool useX86 = RepoDirectoriesProvider.DotnetRidUnderTest.EndsWith("x86", StringComparison.InvariantCultureIgnoreCase);
|
||||
runCommand = runCommand.WithEnvironmentVariable(useX86 ? "DOTNET_ROOT(x86)" : "DOTNET_ROOT",
|
||||
dotnetRoot);
|
||||
}
|
||||
|
||||
runCommand.ExecuteWithCapturedOutput()
|
||||
.Should().Pass()
|
||||
.And.HaveStdOutContaining("Hello World!");
|
||||
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("console")]
|
||||
[InlineData("classlib")]
|
||||
|
|
Loading…
Reference in a new issue