Merge pull request #73 from wli3/merge-release/2.2.1xx

Merge release/2.2.1xx
This commit is contained in:
Livar 2018-09-17 16:32:22 -07:00 committed by GitHub
commit d7693b2f5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 186 additions and 79 deletions

3
.gitignore vendored
View file

@ -127,6 +127,9 @@ bin/
*.svclog
*.scc
# BinLog artifacts
msbuild.*.ProjectImports.zip
# Chutzpah Test files
_Chutzpah*

View file

@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), testAsset.props))\testAsset.props" />
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props" />
<PropertyGroup>
<VersionPrefix>1.0.0-rc</VersionPrefix>
@ -16,4 +17,5 @@
<PackageReference Include="System.Linq" Version="4.3.0" />
</ItemGroup>
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" />
</Project>

View file

@ -13,7 +13,14 @@
<PackageReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<Target Name="WriteVersionsFile" BeforeTargets="Restore">
<Target Name="WriteDefaultPatchVersionsFile" BeforeTargets="Restore">
<WriteLinesToFile
File="$(MSBuildThisFileDirectory)/.DefaultPatchVersionForAspNetCoreApp2_1"
Lines="$(DefaultPatchVersionForAspNetCoreApp2_1)"
Overwrite="true"/>
</Target>
<Target Name="WriteBundledVersionsFile" BeforeTargets="Restore">
<WriteLinesToFile
File="$(MSBuildThisFileDirectory)/.BundledAspNetCoreVersion"
Lines="$(MicrosoftAspNetCoreAppPackageVersion)"

View file

@ -34,6 +34,7 @@
<NoWarn>NU1701;NU5104</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<MSBuildTreatWarningsAsErrors>true</MSBuildTreatWarningsAsErrors>
<IncludeWpfAndWinForms Condition=" '$(IncludeWpfAndWinForms)' == '' AND '$(OS)' == 'Windows_NT' ">true</IncludeWpfAndWinForms>
<IncludeWpfAndWinForms Condition=" '$(IncludeWpfAndWinForms)' == '' ">false</IncludeWpfAndWinForms>

View file

@ -1,8 +1,8 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<BundledTemplate Include="Microsoft.DotNet.Common.ItemTemplates" Version="$(MicrosoftDotNetCommonItemTemplatesPackageVersion)" />
<BundledTemplate Include="Microsoft.DotNet.Common.ProjectTemplates.2.1" Version="$(MicrosoftDotNetCommonProjectTemplates20PackageVersion)" />
<BundledTemplate Include="Microsoft.DotNet.Test.ProjectTemplates.2.1" Version="$(MicrosoftDotNetTestProjectTemplates20PackageVersion)" />
<BundledTemplate Include="Microsoft.DotNet.Common.ProjectTemplates.2.2" Version="$(MicrosoftDotNetCommonProjectTemplates22PackageVersion)" />
<BundledTemplate Include="Microsoft.DotNet.Test.ProjectTemplates.2.2" Version="$(MicrosoftDotNetTestProjectTemplates22PackageVersion)" />
<BundledTemplate Include="Microsoft.Dotnet.Wpf.ProjectTemplates" Version="$(MicrosoftDotnetWpfProjectTemplatesPackageVersion)" />
<BundledTemplate Include="Microsoft.Dotnet.WinForms.ProjectTemplates" Version="$(MicrosoftDotnetWinFormsProjectTemplatesPackageVersion)" />

View file

@ -22,10 +22,9 @@
</PropertyGroup>
<PropertyGroup>
<MicrosoftDotNetCommonItemTemplatesPackageVersion>1.0.2-beta3</MicrosoftDotNetCommonItemTemplatesPackageVersion>
<MicrosoftDotNetCommonProjectTemplates20PackageVersion>$(MicrosoftDotNetCommonItemTemplatesPackageVersion)</MicrosoftDotNetCommonProjectTemplates20PackageVersion>
<MicrosoftDotNetTestProjectTemplates20PackageVersion>1.0.2-beta3-20180716-1864993</MicrosoftDotNetTestProjectTemplates20PackageVersion>
<MicrosoftDotNetCommonItemTemplatesPackageVersion>1.0.2-beta4-20180803-1918431</MicrosoftDotNetCommonItemTemplatesPackageVersion>
<MicrosoftDotNetCommonProjectTemplates22PackageVersion>$(MicrosoftDotNetCommonItemTemplatesPackageVersion)</MicrosoftDotNetCommonProjectTemplates22PackageVersion>
<MicrosoftDotNetTestProjectTemplates22PackageVersion>1.0.2-beta4-20180821-1966911</MicrosoftDotNetTestProjectTemplates22PackageVersion>
<MicroBuildCorePackageVersion>0.2.0</MicroBuildCorePackageVersion>
<NUnit3TemplatesVersion>1.5.1</NUnit3TemplatesVersion>
</PropertyGroup>
@ -48,7 +47,7 @@
<PropertyGroup>
<BuildTasksFeedToolVersion>2.1.0-prerelease-02430-04</BuildTasksFeedToolVersion>
<VersionToolsVersion>$(BuildTasksFeedToolVersion)</VersionToolsVersion>
<DotnetDebToolVersion>2.0.0-preview2-25331-01</DotnetDebToolVersion>
<DotnetDebToolVersion>2.0.0</DotnetDebToolVersion>
</PropertyGroup>
</Project>

View file

@ -34,6 +34,7 @@
<add key="linux-musl-bootstrap-feed" value="https://dotnetfeed.blob.core.windows.net/orchestrated-release-2-1/20180420-03/aspnet-inputs/index.json" />
<add key="dotnet-msbuild" value="https://dotnet.myget.org/F/msbuild/api/v3/index.json" />
<add key="myget-vstest" value="https://dotnet.myget.org/F/vstest/api/v3/index.json" />
<add key="BlobFeed-2.1.3-runtime" value="https://dotnetfeed.blob.core.windows.net/orchestrated-release-2-1/20180725-02/final/index.json"/>
]]>
</NugetConfigCLIFeeds>

View file

@ -10,6 +10,7 @@
<TestPackagesDir>$(TestOutputDir)/packages/</TestPackagesDir>
<TestArtifactsDir>$(TestOutputDir)/artifacts/</TestArtifactsDir>
<TestResultXmlDir>$(TestOutputDir)/results/</TestResultXmlDir>
<ExternalRestoreSourcesTestsContainer>$(TestArtifactsDir)/ExternalRestoreSourcesForTestsContainer.txt</ExternalRestoreSourcesTestsContainer>
</PropertyGroup>
<Target Name="Test"
@ -86,6 +87,12 @@
DependsOnTargets="Init;
SetupTestProjectData">
<MakeDir Directories="$(TestPackagesDir)" Condition="!Exists('$(TestPackagesDir)')"/>
<MakeDir Directories="$(TestArtifactsDir)" Condition="!Exists('$(TestArtifactsDir)')"/>
<WriteLinesToFile Condition="'$(ExternalRestoreSources)' != ''"
File="$(ExternalRestoreSourcesTestsContainer)"
Lines="&lt;add key=&quot;PrivateBlobFeed%(NugetConfigPrivateFeeds.Identity)&quot; value=&quot;%(NugetConfigPrivateFeeds.Identity)&quot; /&gt;"
Overwrite="false" />
</Target>
<Target Name="RestoreTests"
@ -120,6 +127,7 @@
ProjectPath="%(TestPackageProject.ProjectPath)"
ToolPath="$(OutputDirectory)"
VersionSuffix="%(TestPackageProject.VersionSuffix)"
ReleaseSuffix="%(TestPackageProject.ReleaseSuffix)"
MsbuildArgs="%(TestPackageProject.MsbuildArgs) /p:SdkNuGetVersion=$(SdkNugetVersion) /p:RestoreAdditionalProjectSources=$(TestOutputDir)/packages /p:PreviousStageProps=$(NextStagePropsPath)" />
</Target>

View file

@ -101,15 +101,20 @@
UseHardlinksIfPossible="False" />
<!-- Proactively remove all possible Shared Framework and Debian Packages -->
<Exec Command="sudo dpkg -r $(SdkDebianPackageName)" />
<Exec Command="sudo dpkg -r $(AspNetCoreSharedFxDebianPackageName)" />
<Exec Command="sudo dpkg -r $(AspNetCoreSharedFxDebianPackageFileName)" />
<Exec Command="sudo dpkg -r $(SharedFxDebianPackageName)" />
<Exec Command="sudo dpkg -r $(SharedFxDebianPackageFileName)" />
<Exec Command="sudo dpkg -r $(HostFxrDebianPackageName)" />
<Exec Command="sudo dpkg -r $(HostFxrDebianPackageFileName)" />
<Exec Command="sudo dpkg -r $(HostDebianPackageName)" />
<Exec Command="sudo dpkg -r $(RuntimeDepsPackageName)" />
<ItemGroup>
<SetupDebPackageToRemove Include="$(SdkDebianPackageName)" />
<SetupDebPackageToRemove Include="$(AspNetCoreSharedFxDebianPackageName)" />
<SetupDebPackageToRemove Include="$(AspNetCoreSharedFxDebianPackageFileName)" />
<SetupDebPackageToRemove Include="$(SharedFxDebianPackageName)" />
<SetupDebPackageToRemove Include="$(SharedFxDebianPackageFileName)" />
<SetupDebPackageToRemove Include="$(HostFxrDebianPackageName)" />
<SetupDebPackageToRemove Include="$(HostFxrDebianPackageFileName)" />
<SetupDebPackageToRemove Include="$(HostDebianPackageName)" />
<SetupDebPackageToRemove Include="$(RuntimeDepsPackageName)" />
</ItemGroup>
<!-- The following line is needed. So it won't warning dotnet folder is not empty after uninstall -->
<Exec Command="sudo rm -rf /usr/share/dotnet/sdk/NuGetFallbackFolder" />
<Exec Command="!(dpkg-query -W %(SetupDebPackageToRemove.Identity)) || sudo dpkg -r %(SetupDebPackageToRemove.Identity)" />
</Target>
<Target Name="TestSdkDeb"
@ -139,12 +144,19 @@
ToolPath="$(DebianInstalledDirectory)" />
<!-- Clean up Packages -->
<Exec Command="sudo dpkg -r $(SdkDebianPackageName)" />
<Exec Command="sudo dpkg -r $(AspNetCoreSharedFxDebianPackageName)" />
<Exec Command="sudo dpkg -r $(SharedFxDebianPackageName)" />
<Exec Command="sudo dpkg -r $(HostFxrDebianPackageName)" />
<Exec Command="sudo dpkg -r $(HostDebianPackageName)" />
<Exec Command="sudo dpkg -r $(RuntimeDepsPackageName)" />
<!-- The following line is needed. So it won't warning dotnet folder is not empty after uninstall -->
<Exec Command="sudo rm -rf /usr/share/dotnet/sdk/NuGetFallbackFolder" />
<ItemGroup>
<TestSdkDebPackageToRemove Include="$(SdkDebianPackageName)" />
<TestSdkDebPackageToRemove Include="$(AspNetCoreSharedFxDebianPackageName)" />
<TestSdkDebPackageToRemove Include="$(SharedFxDebianPackageName)" />
<TestSdkDebPackageToRemove Include="$(HostFxrDebianPackageName)" />
<TestSdkDebPackageToRemove Include="$(HostDebianPackageName)" />
<TestSdkDebPackageToRemove Include="$(RuntimeDepsPackageName)"/>
</ItemGroup>
<!-- If package installed remove it -->
<Exec Command="!(dpkg-query -W %(TestSdkDebPackageToRemove.Identity)) || sudo dpkg -r %(TestSdkDebPackageToRemove.Identity)" />
</Target>
<Target Name="PrepareDotnetDebDirectories">
@ -184,8 +196,9 @@
<Target Name="TestDebuild">
<Message Text="Don't remove this" />
<!-- run Debuild -->
<Exec Command="/usr/bin/env debuild -h" ContinueOnError="true">
<!-- run Debuild -->
<!-- NB: IgnoreExitCode prevents Exec from failing, but does not prevent us from retrieving the exit code. -->
<Exec Command="/usr/bin/env debuild -h > /dev/null 2>&amp;1" IgnoreExitCode="true">
<Output TaskParameter="ExitCode" PropertyName="DebuildExitCode" />
</Exec>

View file

@ -197,7 +197,8 @@
<Target Name="TestFPMTool">
<!-- run FPM -->
<Exec Command="fpm --help > /dev/null" ContinueOnError="True">
<!-- NB: IgnoreExitCode prevents Exec from failing, but does not prevent us from retrieving the exit code. -->
<Exec Command="fpm --help > /dev/null 2>&amp;1" IgnoreExitCode="True">
<Output TaskParameter="ExitCode" PropertyName="FPMExitCode"/>
</Exec>

0
build/run-build.ps1 Normal file
View file

View file

@ -27,6 +27,7 @@
<IsApplicable>True</IsApplicable>
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
<ReleaseSuffix>$(ReleaseSuffix)</ReleaseSuffix>
<Clean>True</Clean>
</BaseTestPackageProject>
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-portable">
@ -36,6 +37,7 @@
<IsApplicable>True</IsApplicable>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<ReleaseSuffix></ReleaseSuffix>
<Clean>True</Clean>
</BaseTestPackageProject>
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-prefercliruntime">
@ -45,6 +47,7 @@
<IsApplicable>True</IsApplicable>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<ReleaseSuffix></ReleaseSuffix>
<Clean>True</Clean>
</BaseTestPackageProject>

View file

@ -82,7 +82,38 @@ namespace Microsoft.DotNet.Build.Tasks
protected override MessageImportance StandardOutputLoggingImportance
{
get { return MessageImportance.High; } // or else the output doesn't get logged by default
// Default is low, but we want to see output at normal verbosity.
get { return MessageImportance.Normal; }
}
protected override MessageImportance StandardErrorLoggingImportance
{
// This turns stderr messages into msbuild errors below.
get { return MessageImportance.High; }
}
protected override void LogEventsFromTextOutput(string singleLine, MessageImportance messageImportance)
{
// Crossgen's error/warning formatting is inconsistent and so we do
// not use the "canonical error format" handling of base.
//
// Furthermore, we don't want to log crossgen warnings as msbuild
// warnings because we cannot prevent them and they are only
// occasionally formatted as something that base would recognize as
// a canonically formatted warning anyway.
//
// One thing that is consistent is that crossgne errors go to stderr
// and everything else goes to stdout. Above, we set stderr to high
// importance above, and stdout to normal. So we can use that here
// to distinguish between errors and messages.
if (messageImportance == MessageImportance.High)
{
Log.LogError(singleLine);
}
else
{
Log.LogMessage(messageImportance, singleLine);
}
}
protected override string GenerateFullPathToTool()

View file

@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build
protected override string Args
{
get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetNoBuild()} {GetOutput()} {GetVersionSuffix()} {GetRuntime()} {GetIncludeSymbols()} {MsbuildArgs}"; }
get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetNoBuild()} {GetOutput()} {GetVersionSuffix()} {GetReleaseSuffix()} {GetRuntime()} {GetIncludeSymbols()} {MsbuildArgs}"; }
}
public string Configuration { get; set; }
@ -27,6 +27,8 @@ namespace Microsoft.DotNet.Cli.Build
public string VersionSuffix { get; set; }
public string ReleaseSuffix { get; set; }
public string Runtime { get; set; }
public bool IncludeSymbols { get; set; }
@ -77,6 +79,18 @@ namespace Microsoft.DotNet.Cli.Build
{
return $"--version-suffix {VersionSuffix}";
}
else
{
return $"--version-suffix \"\"";
}
}
private string GetReleaseSuffix()
{
if (!string.IsNullOrEmpty(ReleaseSuffix))
{
return $"-property:ReleaseSuffix={ReleaseSuffix}";
}
return null;
}

View file

@ -87,7 +87,14 @@ namespace Microsoft.DotNet.Scripts
if (s_config.HasVersionFragment("aspnet"))
{
yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftAspNetCoreAppPackageVersion", "Microsoft.AspNetCore.App");
yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftAspNetCoreAllPackageVersion", "Microsoft.AspNetCore.All");
yield return CreateRegexUpdater(dependencyVersionsPath, "DotnetEfPackageVersion", "dotnet-ef");
yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftAspNetCoreDeveloperCertificatesXPlatPackageVersion", "Microsoft.AspNetCore.DeveloperCertificates.XPlat");
yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftAspNetCoreMvcPackageVersion", "Microsoft.AspNetCore.Mvc");
yield return CreateRegexUpdater(dependencyVersionsPath, "DotnetDevCertsPackageVersion", "dotnet-dev-certs");
yield return CreateRegexUpdater(dependencyVersionsPath, "DotnetSqlCachePackageVersion", "dotnet-sql-cache");
yield return CreateRegexUpdater(dependencyVersionsPath, "DotnetUserSecretsPackageVersion", "dotnet-user-secrets");
yield return CreateRegexUpdater(dependencyVersionsPath, "DotnetWatchPackageVersion", "dotnet-watch");
}
if (s_config.HasVersionFragment("coresetup"))
{

View file

@ -74,6 +74,6 @@ Resources
<String Id="InstallationNoteTitle">Installation note</String>
<String Id="InstallationNote">A command will be run during the install process that will improve project restore speed and enable offline access. It will take up to a minute to complete.
</String>
<String Id="VisualStudioWarning">If you plan to use .NET Core 2.1 with Visual Studio, Visual Studio 2017 15.7 or newer is recommended. &lt;A HREF=&quot;https://go.microsoft.com/fwlink/?linkid=866799&quot;&gt;Learn More&lt;/A&gt;.
<String Id="VisualStudioWarning">If you plan to use .NET Core 2.2 with Visual Studio, Visual Studio 2017 15.9 or newer is recommended. &lt;A HREF=&quot;https://go.microsoft.com/fwlink/?linkid=866799&quot;&gt;Learn More&lt;/A&gt;.
</String>
</WixLocalization>

View file

@ -7,7 +7,7 @@
<Bundle Name="$(var.ProductName)" Manufacturer="$(var.Manufacturer)"
Version="$(var.DisplayVersion)" UpgradeCode="$(var.UpgradeCode)"
AboutUrl="http://dotnet.github.io/"
AboutUrl="https://dotnet.github.io/"
Compressed="yes">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.Foundation">

View file

@ -76,6 +76,9 @@ $env:DOTNET_MULTILEVEL_LOOKUP=0
# Turn off MSBuild Node re-use
$env:MSBUILDDISABLENODEREUSE=1
# Workaround for the sockets issue when restoring with many nuget feeds.
$env:DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0
# Enable vs test console logging
$env:VSTEST_BUILD_TRACE=1
$env:VSTEST_TRACE_BUILD=1
@ -109,7 +112,7 @@ if ($NoBuild)
}
else
{
dotnet msbuild build.proj /p:Architecture=$Architecture /p:GeneratePropsFile=true /t:WriteDynamicPropsToStaticPropsFiles $ExtraParametersNoTargets
dotnet msbuild build.proj /m /v:normal /fl /flp:v=diag /bl /p:Architecture=$Architecture $ExtraParameters
dotnet msbuild build.proj /bl:msbuild.generatepropsfile.binlog /p:Architecture=$Architecture /p:GeneratePropsFile=true /t:WriteDynamicPropsToStaticPropsFiles $ExtraParametersNoTargets
dotnet msbuild build.proj /bl:msbuild.mainbuild.binlog /m /v:normal /fl /flp:v=diag /bl /p:Architecture=$Architecture $ExtraParameters
if($LASTEXITCODE -ne 0) { throw "Failed to build" }
}

View file

@ -156,6 +156,9 @@ export DOTNET_MULTILEVEL_LOOKUP=0
# Turn off MSBuild Node re-use
export MSBUILDDISABLENODEREUSE=1
# Workaround for the sockets issue when restoring with many nuget feeds.
export DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0
# Install a stage 0
INSTALL_ARCHITECTURE=$ARCHITECTURE
archlower="$(echo $ARCHITECTURE | awk '{print tolower($0)}')"
@ -191,8 +194,8 @@ fi
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
if [ $BUILD -eq 1 ]; then
dotnet msbuild build.proj /p:Architecture=$ARCHITECTURE $CUSTOM_BUILD_ARGS /p:GeneratePropsFile=true /t:WriteDynamicPropsToStaticPropsFiles ${argsnotargets[@]}
dotnet msbuild build.proj /m /v:normal /fl /flp:v=diag /bl /p:Architecture=$ARCHITECTURE $CUSTOM_BUILD_ARGS $args
dotnet msbuild build.proj /bl:msbuild.generatepropsfile.binlog /p:Architecture=$ARCHITECTURE $CUSTOM_BUILD_ARGS /p:GeneratePropsFile=true /t:WriteDynamicPropsToStaticPropsFiles ${argsnotargets[@]}
dotnet msbuild build.proj /bl:msbuild.mainbuild.binlog /m /v:normal /fl /flp:v=diag /bl /p:Architecture=$ARCHITECTURE $CUSTOM_BUILD_ARGS $args
else
echo "Not building due to --nobuild"
echo "Command that would be run is: 'dotnet msbuild build.proj /m /p:Architecture=$ARCHITECTURE $CUSTOM_BUILD_ARGS $args'"

View file

@ -4,47 +4,16 @@
#
# Dockerfile that creates a container suitable to build dotnet-cli
FROM debian:jessie
FROM microsoft/dotnet-buildtools-prereqs:debian-8.2-debpkg-d770b8b-20180628122423
# Misc Dependencies for build
RUN apt-get update && \
RUN rm -rf /var/lib/apt/lists/* && \
apt-get update && \
apt-get -qqy install \
curl \
unzip \
gettext \
sudo && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# This could become a "microsoft/coreclr" image, since it just installs the dependencies for CoreCLR (and stdlib)
RUN apt-get update &&\
apt-get -qqy install \
libunwind8 \
libkrb5-3 \
libicu52 \
liblttng-ust0 \
libssl1.0.0 \
zlib1g \
libuuid1 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install Build Prereqs
RUN apt-get update && \
apt-get -qqy install \
debhelper \
build-essential \
devscripts \
git \
cmake \
clang-3.5 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Use clang as c++ compiler
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-3.5 100
RUN update-alternatives --set c++ /usr/bin/clang++-3.5
# Setup User to match Host User, and give superuser permissions
ARG USER_ID=0
RUN useradd -m code_executor -u ${USER_ID} -g sudo

View file

@ -52,7 +52,7 @@ namespace EndToEnd
var bundledVersion = File.ReadAllText(bundledVersionPath).Trim();
restoredVersion.ToNormalizedString().Should().BeEquivalentTo(bundledVersion,
"The bundled aspnetcore versions set in Microsoft.NETCoreSdk.BundledVersions.props should be idenitical to the versions set in DependencyVersions.props." +
"The bundled aspnetcore versions set in Microsoft.NETCoreSdk.BundledVersions.props should be identical to the versions generated." +
"Please update MSBuildExtensions.targets in this repo so these versions match.");
}
@ -98,7 +98,7 @@ namespace EndToEnd
var bundledVersion = File.ReadAllText(bundledVersionPath).Trim();
restoredVersion.ToNormalizedString().Should().BeEquivalentTo(bundledVersion,
"The bundled aspnetcore versions set in Microsoft.NETCoreSdk.BundledVersions.props should be idenitical to the versions set in DependencyVersions.props." +
"The bundled aspnetcore versions set in Microsoft.NETCoreSdk.BundledVersions.props should be identical to the versions set in DependencyVersions.props." +
"Please update MSBuildExtensions.targets in this repo so these versions match.");
}

View file

@ -105,7 +105,7 @@ namespace EndToEnd
?.Version;
}
[Fact]
[Fact(Skip = "https://github.com/dotnet/cli/issues/9968")]
public void WeCoverLatestNetCoreAppRollForward()
{
// Run "dotnet new console", get TargetFramework property, and make sure it's covered in SupportedNetCoreAppVersions
@ -130,7 +130,6 @@ namespace EndToEnd
SupportedNetCoreAppVersions.Versions.Select(v => $"netcoreapp{v[0]}")
.Should().Contain(targetFramework, $"the {nameof(SupportedNetCoreAppVersions)}.{nameof(SupportedNetCoreAppVersions.Versions)} property should include the default version " +
"of .NET Core created by \"dotnet new\"");
}
}

View file

@ -18,7 +18,8 @@ namespace EndToEnd
"1.0",
"1.1",
"2.0",
"2.1"
"2.1",
"3.0"
}.Select(version => new object[] { version });
}
}

View file

@ -109,19 +109,23 @@ namespace Microsoft.DotNet.TestFramework
return this;
}
public TestAssetInstance WithNuGetConfig(string nugetCache)
public TestAssetInstance WithNuGetConfig(string nugetCache, string externalRestoreSources = null)
{
var thisAssembly = typeof(TestAssetInstance).GetTypeInfo().Assembly;
var newNuGetConfig = Root.GetFile("NuGet.Config");
externalRestoreSources = externalRestoreSources ?? string.Empty;
var content = @"<?xml version=""1.0"" encoding=""utf-8""?>
<configuration>
<packageSources>
<add key=""dotnet-core"" value=""https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json"" />
<add key=""test-packages"" value=""$fullpath$"" />
$externalRestoreSources$
</packageSources>
</configuration>";
content = content.Replace("$fullpath$", nugetCache);
content = content
.Replace("$fullpath$", nugetCache)
.Replace("$externalRestoreSources$", externalRestoreSources);
using (var newNuGetConfigStream =
new FileStream(newNuGetConfig.FullName, FileMode.Create, FileAccess.Write))

View file

@ -22,6 +22,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
private string _stage2WithBackwardsCompatibleRuntimesDirectory;
private string _testPackages;
private string _testWorkingFolder;
private string _testArtifactsFolder;
public static string RepoRoot
{
@ -92,6 +93,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
public string Stage2WithBackwardsCompatibleRuntimesDirectory => _stage2WithBackwardsCompatibleRuntimesDirectory;
public string TestPackages => _testPackages;
public string TestWorkingFolder => _testWorkingFolder;
public string TestArtifactsFolder => _testArtifactsFolder;
public RepoDirectoriesProvider(
string artifacts = null,
@ -123,6 +125,8 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
_testPackages = Path.Combine(_artifacts, "test", "packages");
}
_testArtifactsFolder = Path.Combine(_artifacts, "test", "artifacts");
_testWorkingFolder = Path.Combine(RepoRoot,
"bin",
(previousStage + 1).ToString(),

View file

@ -0,0 +1,33 @@
// 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;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.TestFramework;
using Microsoft.DotNet.Tools.Common;
namespace Microsoft.DotNet.Tools.Test.Utilities
{
public static class TestAssetInstanceExtensions
{
public static TestAssetInstance WithNuGetConfigAndExternalRestoreSources(
this TestAssetInstance testAssetInstance, string nugetCache)
{
var externalRestoreSourcesForTests = Path.Combine(
new RepoDirectoriesProvider().TestArtifactsFolder, "ExternalRestoreSourcesForTestsContainer.txt");
var externalRestoreSources = File.Exists(externalRestoreSourcesForTests) ?
File.ReadAllText(externalRestoreSourcesForTests) :
string.Empty;
return testAssetInstance.WithNuGetConfig(nugetCache, externalRestoreSources);
}
}
}

View file

@ -6,6 +6,7 @@
<Import Project="build/InitRepo.props" />
<Import Project="build/DependencyVersions.props" />
<Import Project="build/TestDependencyVersions.props" />
<Import Project="build/Version.props" />
<PropertyGroup>
<RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(TEST_PACKAGES)</RestoreAdditionalProjectSources>
<NoPackageAnalysis>true</NoPackageAnalysis>