Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge release/2.0.0 to master #1650

Merged
merged 3 commits into from
Oct 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="TransportFeed" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/packages/index.json" />
<add key="nugetbuild" value="https://www.myget.org/F/nugetbuild/api/v3/index.json" />
<add key="msbuild" value="https://dotnet.myget.org/F/msbuild/api/v3/index.json" />
<add key="dotnet-buildtools" value="https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json" />
Expand Down
8 changes: 0 additions & 8 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,6 @@ Invoke-WebRequest $DOTNET_INSTALL_SCRIPT_URL -OutFile "$env:DOTNET_INSTALL_DIR\d
& "$env:DOTNET_INSTALL_DIR\dotnet-install.ps1" -Version $DotnetCLIVersion $dotnetInstallVerbosity
if($LASTEXITCODE -ne 0) { throw "Failed to install stage0" }

# This is a hack to prevent this target from being imported twice. We want to import the one that is build in the repo. If anyone knows
# of a better way to do this, let licavalc known and I will immediatelly fix it.
$NETBuildExtensionsTargets = "$env:DOTNET_INSTALL_DIR\sdk\$DotnetCLIVersion\15.0\Microsoft.Common.targets\ImportAfter\Microsoft.NET.Build.Extensions.targets"
if (Test-Path $NETBuildExtensionsTargets)
{
Remove-Item $NETBuildExtensionsTargets
}

# Install 1.0.4 shared framework
if (!(Test-Path "$env:DOTNET_INSTALL_DIR\shared\Microsoft.NETCore.App\1.0.5"))
{
Expand Down
1 change: 0 additions & 1 deletion build/sdk-test-env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
set MSBuildSDKsPath=%SDK_REPO_ROOT%bin\Debug\Sdks
set DOTNET_MSBUILD_SDK_RESOLVER_SDKS_DIR=%SDK_REPO_ROOT%bin\Debug\Sdks
set NETCoreSdkBundledVersionsProps=%SDK_REPO_ROOT%.dotnet_cli\sdk\%SDK_CLI_VERSION%\Microsoft.NETCoreSdk.BundledVersions.props
set CustomAfterMicrosoftCommonTargets=%SDK_REPO_ROOT%bin\Debug\Sdks\Microsoft.NET.Build.Extensions\msbuildExtensions-ver\Microsoft.Common.Targets\ImportAfter\Microsoft.NET.Build.Extensions.targets
set MicrosoftNETBuildExtensionsTargets=%SDK_REPO_ROOT%bin\Debug\Sdks\Microsoft.NET.Build.Extensions\msbuildExtensions\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.targets
rem You also need to add https://dotnet.myget.org/F/dotnet-core/api/v3/index.json to your NuGet feeds if building projects outside the SDK cone
24 changes: 20 additions & 4 deletions test/Microsoft.NET.TestFramework/RepoInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,12 @@ public static ICommand AddTestEnvironmentVariables(ICommand command)

command = command.EnvironmentVariable("NETCoreSdkBundledVersionsProps", Path.Combine(RepoInfo.CliSdkPath, "Microsoft.NETCoreSdk.BundledVersions.props"));

// The following line can be removed once this file is integrated into MSBuild
command = command.EnvironmentVariable("CustomAfterMicrosoftCommonTargets", Path.Combine(RepoInfo.BuildExtensionsSdkPath,
"msbuildExtensions-ver", "Microsoft.Common.targets", "ImportAfter", "Microsoft.NET.Build.Extensions.targets"));
if (UsingFullMSBuildWithoutExtensionsTargets())
{
command = command.EnvironmentVariable("CustomAfterMicrosoftCommonTargets", Path.Combine(RepoInfo.BuildExtensionsSdkPath,
"msbuildExtensions-ver", "Microsoft.Common.targets", "ImportAfter", "Microsoft.NET.Build.Extensions.targets"));
}

command = command.EnvironmentVariable("MicrosoftNETBuildExtensionsTargets", Path.Combine(RepoInfo.BuildExtensionsMSBuildPath, "Microsoft.NET.Build.Extensions.targets"));

command = command
Expand All @@ -178,5 +181,18 @@ public static ICommand AddTestEnvironmentVariables(ICommand command)

return command;
}

private static bool UsingFullMSBuildWithoutExtensionsTargets()
{
string fullMSBuildPath = Environment.GetEnvironmentVariable("DOTNET_SDK_TEST_MSBUILD_PATH");
if (string.IsNullOrEmpty(fullMSBuildPath))
{
return false;
}

string fullMSBuildDirectory = Path.GetDirectoryName(fullMSBuildPath);
string extensionsImportAfterPath = Path.Combine(fullMSBuildDirectory, "..", "Microsoft.Common.targets", "ImportAfter", "Microsoft.NET.Build.Extensions.targets");
return !File.Exists(extensionsImportAfterPath);
}
}
}
}