Merge remote-tracking branch 'dotnet/release/2.0.0' into merges/release/2.0.0-to-release/15.5-20171013-070028

* dotnet/release/2.0.0:
  Use temporary path for fake deps.json in test
  Porting 'dotnet-install.sh' from CLI:master to CLI:release/2.0.0
  'NuGet.master.config' does not appear to be used.
  Reverting previous change to: 'NuGet.master.config'
  Moving the runtime version to 2.0.0 for the SDK.
  Revert release/2.0.0 back to 1bcee43995
  Adding the unified transport NuGet feed.
  Keeping the branding for release/2.0.0 at 2.0.3.
  MSBuild 15.4.8
  Insert SDK 2.0.2-vspre-20170927-1
This commit is contained in:
Livar Cunha 2017-10-13 09:04:58 -07:00
commit 1943ddc57f
36 changed files with 336 additions and 321 deletions

View file

@ -147,6 +147,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.TestFramew
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "redist", "src\redist\redist.csproj", "{098D9321-1201-4974-A75E-F58EBCD98ACF}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "redist", "src\redist\redist.csproj", "{098D9321-1201-4974-A75E-F58EBCD98ACF}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_roslyn", "src\tool_roslyn\tool_roslyn.csproj", "{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_msbuild", "src\tool_msbuild\tool_msbuild.csproj", "{D82A3246-9831-4024-A9B2-1932EEF3D56F}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_msbuild", "src\tool_msbuild\tool_msbuild.csproj", "{D82A3246-9831-4024-A9B2-1932EEF3D56F}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_nuget", "src\tool_nuget\tool_nuget.csproj", "{BE4C655A-DC54-4408-B739-743456D34111}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tool_nuget", "src\tool_nuget\tool_nuget.csproj", "{BE4C655A-DC54-4408-B739-743456D34111}"
@ -703,6 +705,30 @@ Global
{098D9321-1201-4974-A75E-F58EBCD98ACF}.RelWithDebInfo|x64.Build.0 = Release|Any CPU {098D9321-1201-4974-A75E-F58EBCD98ACF}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{098D9321-1201-4974-A75E-F58EBCD98ACF}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU {098D9321-1201-4974-A75E-F58EBCD98ACF}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
{098D9321-1201-4974-A75E-F58EBCD98ACF}.RelWithDebInfo|x86.Build.0 = Release|Any CPU {098D9321-1201-4974-A75E-F58EBCD98ACF}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|x64.ActiveCfg = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|x64.Build.0 = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|x86.ActiveCfg = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Debug|x86.Build.0 = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|x64.ActiveCfg = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|x64.Build.0 = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|x86.ActiveCfg = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.MinSizeRel|x86.Build.0 = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|Any CPU.Build.0 = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|x64.ActiveCfg = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|x64.Build.0 = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|x86.ActiveCfg = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.Release|x86.Build.0 = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
{D82A3246-9831-4024-A9B2-1932EEF3D56F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D82A3246-9831-4024-A9B2-1932EEF3D56F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D82A3246-9831-4024-A9B2-1932EEF3D56F}.Debug|Any CPU.Build.0 = Debug|Any CPU {D82A3246-9831-4024-A9B2-1932EEF3D56F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D82A3246-9831-4024-A9B2-1932EEF3D56F}.Debug|x64.ActiveCfg = Release|Any CPU {D82A3246-9831-4024-A9B2-1932EEF3D56F}.Debug|x64.ActiveCfg = Release|Any CPU
@ -1599,6 +1625,7 @@ Global
{570950AD-A080-4F32-980C-F50E312910DF} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {570950AD-A080-4F32-980C-F50E312910DF} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{6592A22C-2386-4E83-A4D3-FC08075C723A} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {6592A22C-2386-4E83-A4D3-FC08075C723A} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{098D9321-1201-4974-A75E-F58EBCD98ACF} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {098D9321-1201-4974-A75E-F58EBCD98ACF} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{A0670C63-BA7A-4C1B-B9A7-1CA26A7F235C} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{D82A3246-9831-4024-A9B2-1932EEF3D56F} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {D82A3246-9831-4024-A9B2-1932EEF3D56F} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{BE4C655A-DC54-4408-B739-743456D34111} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F} {BE4C655A-DC54-4408-B739-743456D34111} = {ED2FE3E2-F7E7-4389-8231-B65123F2076F}
{2DFCC95F-75F7-46E1-8F56-256DB4CA98B2} = {0722D325-24C8-4E83-B5AF-0A083E7F0749} {2DFCC95F-75F7-46E1-8F56-256DB4CA98B2} = {0722D325-24C8-4E83-B5AF-0A083E7F0749}

View file

@ -3,6 +3,7 @@
<packageSources> <packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below --> <!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear /> <clear />
<add key="TransportFeed" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/packages/index.json" />
<add key="templating" value="https://dotnet.myget.org/F/templating/api/v3/index.json" /> <add key="templating" value="https://dotnet.myget.org/F/templating/api/v3/index.json" />
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" /> <add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="aspnet" value="https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json" /> <add key="aspnet" value="https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json" />

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>

View file

@ -29,6 +29,9 @@
<Error Condition=" '$(MSBuildExtensionsPath)' == '' " <Error Condition=" '$(MSBuildExtensionsPath)' == '' "
Text="Expected MSBuildExtensionsPath to be set, but it is not." /> Text="Expected MSBuildExtensionsPath to be set, but it is not." />
<Error Condition=" '$(CscToolExe)' == '' "
Text="Expected CscToolExe to be set, but it is not." />
<Error Condition=" '$(MSBuildSDKsPath)' == '' " <Error Condition=" '$(MSBuildSDKsPath)' == '' "
Text="Expected MSBuildSDKsPath to be set, but it is not." /> Text="Expected MSBuildSDKsPath to be set, but it is not." />

View file

@ -1,6 +1,6 @@
<Project ToolsVersion="14.0"> <Project ToolsVersion="14.0">
<PropertyGroup> <PropertyGroup>
<SdkBrandName>Microsoft .NET Core SDK - 15.5.0</SdkBrandName> <SdkBrandName>Microsoft .NET Core SDK - 2.0.3</SdkBrandName>
<MSBuildExtensionsBrandName>.NET Standard Support for Visual Studio 2015</MSBuildExtensionsBrandName> <MSBuildExtensionsBrandName>.NET Standard Support for Visual Studio 2015</MSBuildExtensionsBrandName>
<SharedFrameworkBrandName>Microsoft .NET Core Runtime - 2.0.1</SharedFrameworkBrandName> <SharedFrameworkBrandName>Microsoft .NET Core Runtime - 2.0.1</SharedFrameworkBrandName>
<SharedHostBrandName>Microsoft .NET Core Host - 2.0.1</SharedHostBrandName> <SharedHostBrandName>Microsoft .NET Core Host - 2.0.1</SharedHostBrandName>

View file

@ -6,8 +6,8 @@
<CLI_Roslyn_Version>2.6.0-beta1-62126-01</CLI_Roslyn_Version> <CLI_Roslyn_Version>2.6.0-beta1-62126-01</CLI_Roslyn_Version>
<CLI_Roslyn_Satellites_Version>2.6.0-pre-20171012-1</CLI_Roslyn_Satellites_Version> <CLI_Roslyn_Satellites_Version>2.6.0-pre-20171012-1</CLI_Roslyn_Satellites_Version>
<CLI_DiaSymNative_Version>1.6.0-beta2-25304</CLI_DiaSymNative_Version> <CLI_DiaSymNative_Version>1.6.0-beta2-25304</CLI_DiaSymNative_Version>
<CLI_FSharp_Version>4.2.0-rtm-170926-0</CLI_FSharp_Version> <CLI_FSharp_Version>4.2.0-rc-170630-0</CLI_FSharp_Version>
<CLI_FSharp_Satellites_Version>4.4.1-pre-20171003-1</CLI_FSharp_Satellites_Version> <CLI_FSharp_Satellites_Version>4.4.1-pre-20171012-1</CLI_FSharp_Satellites_Version>
<!-- We'll usually want to keep these versions in sync, but we may want to diverge in some <!-- We'll usually want to keep these versions in sync, but we may want to diverge in some
cases, so use separate properties but derive one from the other unless we want to cases, so use separate properties but derive one from the other unless we want to

View file

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="14.0" DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="AddMetadataIsPE" AssemblyFile="$(CLIBuildDll)" /> <UsingTask TaskName="AddMetadataIsPE" AssemblyFile="$(CLIBuildDll)" />
<UsingTask TaskName="AddToDeps" AssemblyFile="$(CLIBuildDll)" />
<UsingTask TaskName="ChangeEntryPointLibraryName" AssemblyFile="$(CLIBuildDll)" /> <UsingTask TaskName="ChangeEntryPointLibraryName" AssemblyFile="$(CLIBuildDll)" />
<UsingTask TaskName="CheckIfAllBuildsHavePublished" AssemblyFile="$(CLIBuildDll)" /> <UsingTask TaskName="CheckIfAllBuildsHavePublished" AssemblyFile="$(CLIBuildDll)" />
<UsingTask TaskName="ChMod" AssemblyFile="$(CLIBuildDll)" /> <UsingTask TaskName="ChMod" AssemblyFile="$(CLIBuildDll)" />

View file

@ -1,9 +1,9 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<VersionMajor>15</VersionMajor> <VersionMajor>2</VersionMajor>
<VersionMinor>5</VersionMinor> <VersionMinor>0</VersionMinor>
<VersionPatch>0</VersionPatch> <VersionPatch>3</VersionPatch>
<ReleaseSuffix Condition=" '$(ReleaseSuffix)' == '' ">preview</ReleaseSuffix> <ReleaseSuffix Condition=" '$(ReleaseSuffix)' == '' ">servicing</ReleaseSuffix>
<CliVersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix)</CliVersionPrefix> <CliVersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(ReleaseSuffix)</CliVersionPrefix>
<SimpleVersion Condition=" '$(DropSuffix)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch).$(CommitCount)</SimpleVersion> <SimpleVersion Condition=" '$(DropSuffix)' == '' ">$(VersionMajor).$(VersionMinor).$(VersionPatch).$(CommitCount)</SimpleVersion>

View file

@ -7,6 +7,8 @@
<PropertyGroup> <PropertyGroup>
<MSBuildExtensionsPathInToolPath>false</MSBuildExtensionsPathInToolPath> <MSBuildExtensionsPathInToolPath>false</MSBuildExtensionsPathInToolPath>
<MSBuildExtensionsPathInToolPath Condition="$(MSBuildExtensionsPath.StartsWith('$(NormalizedToolPath)'))">true</MSBuildExtensionsPathInToolPath> <MSBuildExtensionsPathInToolPath Condition="$(MSBuildExtensionsPath.StartsWith('$(NormalizedToolPath)'))">true</MSBuildExtensionsPathInToolPath>
<CscToolExeInToolPath>false</CscToolExeInToolPath>
<CscToolExeInToolPath Condition="$(CscToolExe.StartsWith('$(NormalizedToolPath)'))">true</CscToolExeInToolPath>
<MSBuildSDKsPathInToolPath>false</MSBuildSDKsPathInToolPath> <MSBuildSDKsPathInToolPath>false</MSBuildSDKsPathInToolPath>
<MSBuildSDKsPathInToolPath Condition="$(MSBuildSDKsPath.StartsWith('$(NormalizedToolPath)'))">true</MSBuildSDKsPathInToolPath> <MSBuildSDKsPathInToolPath Condition="$(MSBuildSDKsPath.StartsWith('$(NormalizedToolPath)'))">true</MSBuildSDKsPathInToolPath>
</PropertyGroup> </PropertyGroup>

View file

@ -1,67 +0,0 @@
// 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.IO;
using System.Linq;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Microsoft.Extensions.DependencyModel;
namespace Microsoft.DotNet.Cli.Build
{
/// <summary>
/// Merges additional .deps.json files into target .deps.json files.
/// </summary>
public class AddToDeps : Task
{
/// <summary>
/// Paths to target .deps.json files, into which <see cref="AdditionalDeps" /> will be merged.
/// These files will be overwritten with the merge result.
/// </summary>
[Required]
public string[] TargetDeps { get; set; }
/// <summary>
/// Paths to additional .deps.json files to merge into <see cref="TargetDeps" />.
/// </summary>
[Required]
public string[] AdditionalDeps { get; set; }
public override bool Execute()
{
DependencyContext additionalContext = Read(AdditionalDeps.First());
foreach (string additionalPath in AdditionalDeps.Skip(1))
{
additionalContext = additionalContext.Merge(Read(additionalPath));
}
foreach (string targetPath in TargetDeps)
{
DependencyContext targetContext = Read(targetPath).Merge(additionalContext);
Write(targetContext, targetPath);
}
return true;
}
private static DependencyContext Read(string path)
{
using (FileStream stream = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read))
using (var reader = new DependencyContextJsonReader())
{
return reader.Read(stream);
}
}
private static void Write(DependencyContext context, string path)
{
using (FileStream stream = File.Open(path, FileMode.Create, FileAccess.Write, FileShare.Read))
{
var writer = new DependencyContextWriter(); // unlike reader, writer is not disposable
writer.Write(context, stream);
}
}
}
}

View file

@ -29,6 +29,5 @@
<PackageReference Include="Microsoft.Build.Framework" Version="$(CLI_MSBuild_Version)" /> <PackageReference Include="Microsoft.Build.Framework" Version="$(CLI_MSBuild_Version)" />
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(PlatformAbstractionsVersion)" /> <PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(PlatformAbstractionsVersion)" />
<PackageReference Include="Microsoft.DotNet.VersionTools" Version="$(VersionToolsVersion)" /> <PackageReference Include="Microsoft.DotNet.VersionTools" Version="$(VersionToolsVersion)" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="2.0.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -240,7 +240,7 @@ to_lowercase() {
remove_trailing_slash() { remove_trailing_slash() {
#eval $invocation #eval $invocation
local input=${1:-} local input="${1:-}"
echo "${input%/}" echo "${input%/}"
return 0 return 0
} }
@ -250,7 +250,7 @@ remove_trailing_slash() {
remove_beginning_slash() { remove_beginning_slash() {
#eval $invocation #eval $invocation
local input=${1:-} local input="${1:-}"
echo "${input#/}" echo "${input#/}"
return 0 return 0
} }
@ -267,8 +267,8 @@ combine_paths() {
return 1 return 1
fi fi
local root_path=$(remove_trailing_slash $1) local root_path="$(remove_trailing_slash "$1")"
local child_path=$(remove_beginning_slash ${2:-}) local child_path="$(remove_beginning_slash "${2:-}")"
say_verbose "combine_paths: root_path=$root_path" say_verbose "combine_paths: root_path=$root_path"
say_verbose "combine_paths: child_path=$child_path" say_verbose "combine_paths: child_path=$child_path"
echo "$root_path/$child_path" echo "$root_path/$child_path"
@ -288,10 +288,10 @@ get_machine_architecture() {
get_normalized_architecture_from_architecture() { get_normalized_architecture_from_architecture() {
eval $invocation eval $invocation
local architecture=$(to_lowercase $1) local architecture="$(to_lowercase "$1")"
case $architecture in case "$architecture" in
\<auto\>) \<auto\>)
echo "$(get_normalized_architecture_from_architecture $(get_machine_architecture))" echo "$(get_normalized_architecture_from_architecture "$(get_machine_architecture)")"
return 0 return 0
;; ;;
amd64|x64) amd64|x64)
@ -338,11 +338,11 @@ get_commit_hash_from_version_info() {
is_dotnet_package_installed() { is_dotnet_package_installed() {
eval $invocation eval $invocation
local install_root=$1 local install_root="$1"
local relative_path_to_package=$2 local relative_path_to_package="$2"
local specific_version=${3//[$'\t\r\n']} local specific_version="${3//[$'\t\r\n']}"
local dotnet_package_path=$(combine_paths $(combine_paths $install_root $relative_path_to_package) $specific_version) local dotnet_package_path="$(combine_paths "$(combine_paths "$install_root" "$relative_path_to_package")" "$specific_version")"
say_verbose "is_dotnet_package_installed: dotnet_package_path=$dotnet_package_path" say_verbose "is_dotnet_package_installed: dotnet_package_path=$dotnet_package_path"
if [ -d "$dotnet_package_path" ]; then if [ -d "$dotnet_package_path" ]; then
@ -360,10 +360,10 @@ is_dotnet_package_installed() {
get_latest_version_info() { get_latest_version_info() {
eval $invocation eval $invocation
local azure_feed=$1 local azure_feed="$1"
local channel=$2 local channel="$2"
local normalized_architecture=$3 local normalized_architecture="$3"
local coherent=$4 local coherent="$4"
local version_file_url=null local version_file_url=null
if [ "$shared_runtime" = true ]; then if [ "$shared_runtime" = true ]; then
@ -377,7 +377,7 @@ get_latest_version_info() {
fi fi
say_verbose "get_latest_version_info: latest url: $version_file_url" say_verbose "get_latest_version_info: latest url: $version_file_url"
download $version_file_url download "$version_file_url"
return $? return $?
} }
@ -389,28 +389,28 @@ get_latest_version_info() {
get_specific_version_from_version() { get_specific_version_from_version() {
eval $invocation eval $invocation
local azure_feed=$1 local azure_feed="$1"
local channel=$2 local channel="$2"
local normalized_architecture=$3 local normalized_architecture="$3"
local version=$(to_lowercase $4) local version="$(to_lowercase "$4")"
case $version in case "$version" in
latest) latest)
local version_info local version_info
version_info="$(get_latest_version_info $azure_feed $channel $normalized_architecture false)" || return 1 version_info="$(get_latest_version_info "$azure_feed" "$channel" "$normalized_architecture" false)" || return 1
say_verbose "get_specific_version_from_version: version_info=$version_info" say_verbose "get_specific_version_from_version: version_info=$version_info"
echo "$version_info" | get_version_from_version_info echo "$version_info" | get_version_from_version_info
return 0 return 0
;; ;;
coherent) coherent)
local version_info local version_info
version_info="$(get_latest_version_info $azure_feed $channel $normalized_architecture true)" || return 1 version_info="$(get_latest_version_info "$azure_feed" "$channel" "$normalized_architecture" true)" || return 1
say_verbose "get_specific_version_from_version: version_info=$version_info" say_verbose "get_specific_version_from_version: version_info=$version_info"
echo "$version_info" | get_version_from_version_info echo "$version_info" | get_version_from_version_info
return 0 return 0
;; ;;
*) *)
echo $version echo "$version"
return 0 return 0
;; ;;
esac esac
@ -424,13 +424,13 @@ get_specific_version_from_version() {
construct_download_link() { construct_download_link() {
eval $invocation eval $invocation
local azure_feed=$1 local azure_feed="$1"
local channel=$2 local channel="$2"
local normalized_architecture=$3 local normalized_architecture="$3"
local specific_version=${4//[$'\t\r\n']} local specific_version="${4//[$'\t\r\n']}"
local osname local osname
osname=$(get_current_os_name) || return 1 osname="$(get_current_os_name)" || return 1
local download_link=null local download_link=null
if [ "$shared_runtime" = true ]; then if [ "$shared_runtime" = true ]; then
@ -451,13 +451,13 @@ construct_download_link() {
construct_legacy_download_link() { construct_legacy_download_link() {
eval $invocation eval $invocation
local azure_feed=$1 local azure_feed="$1"
local channel=$2 local channel="$2"
local normalized_architecture=$3 local normalized_architecture="$3"
local specific_version=${4//[$'\t\r\n']} local specific_version="${4//[$'\t\r\n']}"
local distro_specific_osname local distro_specific_osname
distro_specific_osname=$(get_distro_specific_os_name) || return 1 distro_specific_osname="$(get_distro_specific_os_name)" || return 1
local legacy_download_link=null local legacy_download_link=null
if [ "$shared_runtime" = true ]; then if [ "$shared_runtime" = true ]; then
@ -474,7 +474,7 @@ get_user_install_path() {
eval $invocation eval $invocation
if [ ! -z "${DOTNET_INSTALL_DIR:-}" ]; then if [ ! -z "${DOTNET_INSTALL_DIR:-}" ]; then
echo $DOTNET_INSTALL_DIR echo "$DOTNET_INSTALL_DIR"
else else
echo "$HOME/.dotnet" echo "$HOME/.dotnet"
fi fi
@ -488,7 +488,7 @@ resolve_installation_path() {
local install_dir=$1 local install_dir=$1
if [ "$install_dir" = "<auto>" ]; then if [ "$install_dir" = "<auto>" ]; then
local user_install_path=$(get_user_install_path) local user_install_path="$(get_user_install_path)"
say_verbose "resolve_installation_path: user_install_path=$user_install_path" say_verbose "resolve_installation_path: user_install_path=$user_install_path"
echo "$user_install_path" echo "$user_install_path"
return 0 return 0
@ -503,11 +503,11 @@ resolve_installation_path() {
get_installed_version_info() { get_installed_version_info() {
eval $invocation eval $invocation
local install_root=$1 local install_root="$1"
local version_file=$(combine_paths "$install_root" "$local_version_file_relative_path") local version_file="$(combine_paths "$install_root" "$local_version_file_relative_path")"
say_verbose "Local version file: $version_file" say_verbose "Local version file: $version_file"
if [ ! -z "$version_file" ] | [ -r "$version_file" ]; then if [ ! -z "$version_file" ] | [ -r "$version_file" ]; then
local version_info="$(cat $version_file)" local version_info="$(cat "$version_file")"
echo "$version_info" echo "$version_info"
return 0 return 0
fi fi
@ -522,7 +522,7 @@ get_absolute_path() {
eval $invocation eval $invocation
local relative_or_absolute_path=$1 local relative_or_absolute_path=$1
echo $(cd $(dirname "$1") && pwd -P)/$(basename "$1") echo "$(cd "$(dirname "$1")" && pwd -P)/$(basename "$1")"
return 0 return 0
} }
@ -534,17 +534,17 @@ get_absolute_path() {
copy_files_or_dirs_from_list() { copy_files_or_dirs_from_list() {
eval $invocation eval $invocation
local root_path=$(remove_trailing_slash $1) local root_path="$(remove_trailing_slash "$1")"
local out_path=$(remove_trailing_slash $2) local out_path="$(remove_trailing_slash "$2")"
local override=$3 local override="$3"
local override_switch=$(if [ "$override" = false ]; then printf -- "-n"; fi) local override_switch=$(if [ "$override" = false ]; then printf -- "-n"; fi)
cat | uniq | while read -r file_path; do cat | uniq | while read -r file_path; do
local path=$(remove_beginning_slash ${file_path#$root_path}) local path="$(remove_beginning_slash "${file_path#$root_path}")"
local target=$out_path/$path local target="$out_path/$path"
if [ "$override" = true ] || (! ([ -d "$target" ] || [ -e "$target" ])); then if [ "$override" = true ] || (! ([ -d "$target" ] || [ -e "$target" ])); then
mkdir -p $out_path/$(dirname $path) mkdir -p "$out_path/$(dirname "$path")"
cp -R $override_switch $root_path/$path $target cp -R $override_switch "$root_path/$path" "$target"
fi fi
done done
} }
@ -555,19 +555,19 @@ copy_files_or_dirs_from_list() {
extract_dotnet_package() { extract_dotnet_package() {
eval $invocation eval $invocation
local zip_path=$1 local zip_path="$1"
local out_path=$2 local out_path="$2"
local temp_out_path=$(mktemp -d $temporary_file_template) local temp_out_path="$(mktemp -d "$temporary_file_template")"
local failed=false local failed=false
tar -xzf "$zip_path" -C "$temp_out_path" > /dev/null || failed=true tar -xzf "$zip_path" -C "$temp_out_path" > /dev/null || failed=true
local folders_with_version_regex='^.*/[0-9]+\.[0-9]+[^/]+/' local folders_with_version_regex='^.*/[0-9]+\.[0-9]+[^/]+/'
find $temp_out_path -type f | grep -Eo $folders_with_version_regex | copy_files_or_dirs_from_list $temp_out_path $out_path false find "$temp_out_path" -type f | grep -Eo "$folders_with_version_regex" | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" false
find $temp_out_path -type f | grep -Ev $folders_with_version_regex | copy_files_or_dirs_from_list $temp_out_path $out_path $override_non_versioned_files find "$temp_out_path" -type f | grep -Ev "$folders_with_version_regex" | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" "$override_non_versioned_files"
rm -rf $temp_out_path rm -rf "$temp_out_path"
if [ "$failed" = true ]; then if [ "$failed" = true ]; then
say_err "Extraction failed" say_err "Extraction failed"
@ -581,14 +581,14 @@ extract_dotnet_package() {
download() { download() {
eval $invocation eval $invocation
local remote_path=$1 local remote_path="$1"
local out_path=${2:-} local out_path="${2:-}"
local failed=false local failed=false
if machine_has "curl"; then if machine_has "curl"; then
downloadcurl $remote_path $out_path || failed=true downloadcurl "$remote_path" "$out_path" || failed=true
elif machine_has "wget"; then elif machine_has "wget"; then
downloadwget $remote_path $out_path || failed=true downloadwget "$remote_path" "$out_path" || failed=true
else else
failed=true failed=true
fi fi
@ -601,14 +601,14 @@ download() {
downloadcurl() { downloadcurl() {
eval $invocation eval $invocation
local remote_path=$1 local remote_path="$1"
local out_path=${2:-} local out_path="${2:-}"
local failed=false local failed=false
if [ -z "$out_path" ]; then if [ -z "$out_path" ]; then
curl --retry 10 -sSL -f --create-dirs $remote_path || failed=true curl --retry 10 -sSL -f --create-dirs "$remote_path" || failed=true
else else
curl --retry 10 -sSL -f --create-dirs -o $out_path $remote_path || failed=true curl --retry 10 -sSL -f --create-dirs -o "$out_path" "$remote_path" || failed=true
fi fi
if [ "$failed" = true ]; then if [ "$failed" = true ]; then
say_verbose "Curl download failed" say_verbose "Curl download failed"
@ -619,14 +619,14 @@ downloadcurl() {
downloadwget() { downloadwget() {
eval $invocation eval $invocation
local remote_path=$1 local remote_path="$1"
local out_path=${2:-} local out_path="${2:-}"
local failed=false local failed=false
if [ -z "$out_path" ]; then if [ -z "$out_path" ]; then
wget -q --tries 10 -O - $remote_path || failed=true wget -q --tries 10 -O - "$remote_path" || failed=true
else else
wget -v --tries 10 -O $out_path $remote_path || failed=true wget -v --tries 10 -O "$out_path" "$remote_path" || failed=true
fi fi
if [ "$failed" = true ]; then if [ "$failed" = true ]; then
say_verbose "Wget download failed" say_verbose "Wget download failed"
@ -639,20 +639,20 @@ calculate_vars() {
eval $invocation eval $invocation
valid_legacy_download_link=true valid_legacy_download_link=true
normalized_architecture=$(get_normalized_architecture_from_architecture "$architecture") normalized_architecture="$(get_normalized_architecture_from_architecture "$architecture")"
say_verbose "normalized_architecture=$normalized_architecture" say_verbose "normalized_architecture=$normalized_architecture"
specific_version=$(get_specific_version_from_version $azure_feed $channel $normalized_architecture $version) specific_version="$(get_specific_version_from_version "$azure_feed" "$channel" "$normalized_architecture" "$version")"
say_verbose "specific_version=$specific_version" say_verbose "specific_version=$specific_version"
if [ -z "$specific_version" ]; then if [ -z "$specific_version" ]; then
say_err "Could not get version information." say_err "Could not get version information."
return 1 return 1
fi fi
download_link=$(construct_download_link $azure_feed $channel $normalized_architecture $specific_version) download_link="$(construct_download_link "$azure_feed" "$channel" "$normalized_architecture" "$specific_version")"
say_verbose "download_link=$download_link" say_verbose "download_link=$download_link"
legacy_download_link=$(construct_legacy_download_link $azure_feed $channel $normalized_architecture $specific_version) || valid_legacy_download_link=false legacy_download_link="$(construct_legacy_download_link "$azure_feed" "$channel" "$normalized_architecture" "$specific_version")" || valid_legacy_download_link=false
if [ "$valid_legacy_download_link" = true ]; then if [ "$valid_legacy_download_link" = true ]; then
say_verbose "legacy_download_link=$legacy_download_link" say_verbose "legacy_download_link=$legacy_download_link"
@ -660,7 +660,7 @@ calculate_vars() {
say_verbose "Cound not construct a legacy_download_link; omitting..." say_verbose "Cound not construct a legacy_download_link; omitting..."
fi fi
install_root=$(resolve_installation_path $install_dir) install_root="$(resolve_installation_path "$install_dir")"
say_verbose "install_root=$install_root" say_verbose "install_root=$install_root"
} }
@ -668,32 +668,33 @@ install_dotnet() {
eval $invocation eval $invocation
local download_failed=false local download_failed=false
if is_dotnet_package_installed $install_root "sdk" $specific_version; then if is_dotnet_package_installed "$install_root" "sdk" "$specific_version"; then
say ".NET SDK version $specific_version is already installed." say ".NET SDK version $specific_version is already installed."
return 0 return 0
fi fi
mkdir -p $install_root mkdir -p "$install_root"
zip_path=$(mktemp $temporary_file_template) zip_path="$(mktemp "$temporary_file_template")"
say_verbose "Zip path: $zip_path" say_verbose "Zip path: $zip_path"
say "Downloading link: $download_link" say "Downloading link: $download_link"
# Failures are normal in the non-legacy case for ultimately legacy downloads. # Failures are normal in the non-legacy case for ultimately legacy downloads.
# Do not output to stderr, since output to stderr is considered an error. # Do not output to stderr, since output to stderr is considered an error.
download "$download_link" $zip_path 2>&1 || download_failed=true download "$download_link" "$zip_path" 2>&1 || download_failed=true
# if the download fails, download the legacy_download_link # if the download fails, download the legacy_download_link
if [ "$download_failed" = true ] && [ "$valid_legacy_download_link" = true ]; then if [ "$download_failed" = true ] && [ "$valid_legacy_download_link" = true ]; then
say "Cannot download: $download_link" say "Cannot download: $download_link"
download_link=$legacy_download_link download_link="$legacy_download_link"
zip_path=$(mktemp $temporary_file_template) zip_path="$(mktemp "$temporary_file_template")"
say_verbose "Legacy zip path: $zip_path" say_verbose "Legacy zip path: $zip_path"
say "Downloading legacy link: $download_link" say "Downloading legacy link: $download_link"
download "$download_link" $zip_path download "$download_link" "$zip_path"
fi fi
say "Extracting zip from $download_link" say "Extracting zip from $download_link"
extract_dotnet_package $zip_path $install_root extract_dotnet_package "$zip_path" "$install_root"
return 0 return 0
} }
@ -717,11 +718,11 @@ override_non_versioned_files=true
while [ $# -ne 0 ] while [ $# -ne 0 ]
do do
name=$1 name="$1"
case $name in case "$name" in
-c|--channel|-[Cc]hannel) -c|--channel|-[Cc]hannel)
shift shift
channel=$1 channel="$1"
;; ;;
-v|--version|-[Vv]ersion) -v|--version|-[Vv]ersion)
shift shift
@ -764,7 +765,7 @@ do
override_non_versioned_files=false override_non_versioned_files=false
;; ;;
-?|--?|-h|--help|-[Hh]elp) -?|--?|-h|--help|-[Hh]elp)
script_name="$(basename $0)" script_name="$(basename "$0")"
echo ".NET Tools Installer" echo ".NET Tools Installer"
echo "Usage: $script_name [-c|--channel <CHANNEL>] [-v|--version <VERSION>] [-p|--prefix <DESTINATION>]" echo "Usage: $script_name [-c|--channel <CHANNEL>] [-v|--version <VERSION>] [-p|--prefix <DESTINATION>]"
echo " $script_name -h|-?|--help" echo " $script_name -h|-?|--help"
@ -830,17 +831,17 @@ if [ "$dry_run" = true ]; then
if [ "$valid_legacy_download_link" = true ]; then if [ "$valid_legacy_download_link" = true ]; then
say "Legacy payload URL: $legacy_download_link" say "Legacy payload URL: $legacy_download_link"
fi fi
say "Repeatable invocation: ./$(basename $0) --version $specific_version --channel $channel --install-dir $install_dir" say "Repeatable invocation: ./$(basename "$0") --version $specific_version --channel $channel --install-dir $install_dir"
exit 0 exit 0
fi fi
check_pre_reqs check_pre_reqs
install_dotnet install_dotnet
bin_path=$(get_absolute_path $(combine_paths $install_root $bin_folder_relative_path)) bin_path="$(get_absolute_path "$(combine_paths "$install_root" "$bin_folder_relative_path")")"
if [ "$no_path" = false ]; then if [ "$no_path" = false ]; then
say "Adding to current process PATH: \`$bin_path\`. Note: This change will be visible only when sourcing script." say "Adding to current process PATH: \`$bin_path\`. Note: This change will be visible only when sourcing script."
export PATH=$bin_path:$PATH export PATH="$bin_path":"$PATH"
else else
say "Binaries of dotnet can be found in $bin_path" say "Binaries of dotnet can be found in $bin_path"
fi fi

View file

@ -23,8 +23,9 @@ namespace Microsoft.DotNet.Cli.Utils
new Dictionary<string, string> new Dictionary<string, string>
{ {
{ "MSBuildExtensionsPath", AppContext.BaseDirectory }, { "MSBuildExtensionsPath", AppContext.BaseDirectory },
{ "MSBuildSDKsPath", GetMSBuildSDKsPath() }, { "CscToolExe", GetRunCscPath() },
{ "DOTNET_HOST_PATH", GetDotnetPath() }, { "VbcToolExe", GetRunVbcPath() },
{ "MSBuildSDKsPath", GetMSBuildSDKsPath() }
}; };
private readonly IEnumerable<string> _msbuildRequiredParameters = private readonly IEnumerable<string> _msbuildRequiredParameters =
@ -77,9 +78,20 @@ namespace Microsoft.DotNet.Cli.Utils
SdksDirectoryName); SdksDirectoryName);
} }
private static string GetDotnetPath() private static string GetRunVbcPath()
{ {
return new Muxer().MuxerPath; return GetRunToolPath("Vbc");
}
private static string GetRunCscPath()
{
return GetRunToolPath("Csc");
}
private static string GetRunToolPath(string compilerName)
{
var scriptExtension = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".cmd" : ".sh";
return Path.Combine(AppContext.BaseDirectory, "Roslyn", $"Run{compilerName}{scriptExtension}");
} }
} }
} }

View file

@ -177,7 +177,7 @@ The current {1} is '{2}'.</value>
<value>Using launch settings from {0}...</value> <value>Using launch settings from {0}...</value>
</data> </data>
<data name="LaunchProfileIsNotAJsonObject" xml:space="preserve"> <data name="LaunchProfileIsNotAJsonObject" xml:space="preserve">
<value>A profile with the specified name could not be found or is not a valid JSON object.</value> <value>Launch profile is not a JSON object.</value>
</data> </data>
<data name="LaunchProfileHandlerCannotBeLocated" xml:space="preserve"> <data name="LaunchProfileHandlerCannotBeLocated" xml:space="preserve">
<value>The launch profile type '{0}' is not supported.</value> <value>The launch profile type '{0}' is not supported.</value>

View file

@ -103,8 +103,8 @@ Aktuální {1} je {2}.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileIsNotAJsonObject"> <trans-unit id="LaunchProfileIsNotAJsonObject">
<source>A profile with the specified name could not be found or is not a valid JSON object.</source> <source>Launch profile is not a JSON object.</source>
<target state="needs-review-translation">Profil spuštění není objektem JSON.</target> <target state="translated">Profil spuštění není objektem JSON.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileHandlerCannotBeLocated"> <trans-unit id="LaunchProfileHandlerCannotBeLocated">

View file

@ -103,8 +103,8 @@ Ein ausführbares Projekt sollte ein ausführbares TFM (z.B. netcoreapp2.0) verw
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileIsNotAJsonObject"> <trans-unit id="LaunchProfileIsNotAJsonObject">
<source>A profile with the specified name could not be found or is not a valid JSON object.</source> <source>Launch profile is not a JSON object.</source>
<target state="needs-review-translation">Das Startprofil ist kein JSON-Objekt.</target> <target state="translated">Das Startprofil ist kein JSON-Objekt.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileHandlerCannotBeLocated"> <trans-unit id="LaunchProfileHandlerCannotBeLocated">

View file

@ -103,8 +103,8 @@ El actual {1} es "{2}".</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileIsNotAJsonObject"> <trans-unit id="LaunchProfileIsNotAJsonObject">
<source>A profile with the specified name could not be found or is not a valid JSON object.</source> <source>Launch profile is not a JSON object.</source>
<target state="needs-review-translation">El perfil de inicio no es un objeto JSON.</target> <target state="translated">El perfil de inicio no es un objeto JSON.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileHandlerCannotBeLocated"> <trans-unit id="LaunchProfileHandlerCannotBeLocated">

View file

@ -103,8 +103,8 @@ Le {1} actuel est '{2}'.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileIsNotAJsonObject"> <trans-unit id="LaunchProfileIsNotAJsonObject">
<source>A profile with the specified name could not be found or is not a valid JSON object.</source> <source>Launch profile is not a JSON object.</source>
<target state="needs-review-translation">Le profil de lancement n'est pas un objet JSON.</target> <target state="translated">Le profil de lancement n'est pas un objet JSON.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileHandlerCannotBeLocated"> <trans-unit id="LaunchProfileHandlerCannotBeLocated">

View file

@ -103,8 +103,8 @@ Il valore corrente di {1} è '{2}'.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileIsNotAJsonObject"> <trans-unit id="LaunchProfileIsNotAJsonObject">
<source>A profile with the specified name could not be found or is not a valid JSON object.</source> <source>Launch profile is not a JSON object.</source>
<target state="needs-review-translation">Il profilo di avvio non è un oggetto JSON.</target> <target state="translated">Il profilo di avvio non è un oggetto JSON.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileHandlerCannotBeLocated"> <trans-unit id="LaunchProfileHandlerCannotBeLocated">

View file

@ -103,8 +103,8 @@ The current {1} is '{2}'.</source>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileIsNotAJsonObject"> <trans-unit id="LaunchProfileIsNotAJsonObject">
<source>A profile with the specified name could not be found or is not a valid JSON object.</source> <source>Launch profile is not a JSON object.</source>
<target state="needs-review-translation">起動プロファイルが JSON オブジェクトではありません。</target> <target state="translated">起動プロファイルが JSON オブジェクトではありません。</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileHandlerCannotBeLocated"> <trans-unit id="LaunchProfileHandlerCannotBeLocated">

View file

@ -103,8 +103,8 @@ The current {1} is '{2}'.</source>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileIsNotAJsonObject"> <trans-unit id="LaunchProfileIsNotAJsonObject">
<source>A profile with the specified name could not be found or is not a valid JSON object.</source> <source>Launch profile is not a JSON object.</source>
<target state="needs-review-translation">시작 프로필이 JSON 개체가 아닙니다.</target> <target state="translated">시작 프로필이 JSON 개체가 아닙니다.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileHandlerCannotBeLocated"> <trans-unit id="LaunchProfileHandlerCannotBeLocated">

View file

@ -103,8 +103,8 @@ Bieżący element {1}: „{2}”.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileIsNotAJsonObject"> <trans-unit id="LaunchProfileIsNotAJsonObject">
<source>A profile with the specified name could not be found or is not a valid JSON object.</source> <source>Launch profile is not a JSON object.</source>
<target state="needs-review-translation">Profil uruchamiania nie jest obiektem JSON.</target> <target state="translated">Profil uruchamiania nie jest obiektem JSON.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileHandlerCannotBeLocated"> <trans-unit id="LaunchProfileHandlerCannotBeLocated">

View file

@ -103,8 +103,8 @@ O {1} atual é '{2}'.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileIsNotAJsonObject"> <trans-unit id="LaunchProfileIsNotAJsonObject">
<source>A profile with the specified name could not be found or is not a valid JSON object.</source> <source>Launch profile is not a JSON object.</source>
<target state="needs-review-translation">O perfil de inicialização não é um objeto JSON.</target> <target state="translated">O perfil de inicialização não é um objeto JSON.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileHandlerCannotBeLocated"> <trans-unit id="LaunchProfileHandlerCannotBeLocated">

View file

@ -103,8 +103,8 @@ The current {1} is '{2}'.</source>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileIsNotAJsonObject"> <trans-unit id="LaunchProfileIsNotAJsonObject">
<source>A profile with the specified name could not be found or is not a valid JSON object.</source> <source>Launch profile is not a JSON object.</source>
<target state="needs-review-translation">Профиль запуска не является объектом JSON.</target> <target state="translated">Профиль запуска не является объектом JSON.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileHandlerCannotBeLocated"> <trans-unit id="LaunchProfileHandlerCannotBeLocated">

View file

@ -103,8 +103,8 @@ Geçerli {1}: '{2}'.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileIsNotAJsonObject"> <trans-unit id="LaunchProfileIsNotAJsonObject">
<source>A profile with the specified name could not be found or is not a valid JSON object.</source> <source>Launch profile is not a JSON object.</source>
<target state="needs-review-translation">Başlatma profili bir JSON nesnesi değil.</target> <target state="translated">Başlatma profili bir JSON nesnesi değil.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileHandlerCannotBeLocated"> <trans-unit id="LaunchProfileHandlerCannotBeLocated">

View file

@ -103,8 +103,8 @@ The current {1} is '{2}'.</source>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileIsNotAJsonObject"> <trans-unit id="LaunchProfileIsNotAJsonObject">
<source>A profile with the specified name could not be found or is not a valid JSON object.</source> <source>Launch profile is not a JSON object.</source>
<target state="needs-review-translation">启动配置文件不是 JSON 对象。</target> <target state="translated">启动配置文件不是 JSON 对象。</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileHandlerCannotBeLocated"> <trans-unit id="LaunchProfileHandlerCannotBeLocated">

View file

@ -103,8 +103,8 @@ The current {1} is '{2}'.</source>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileIsNotAJsonObject"> <trans-unit id="LaunchProfileIsNotAJsonObject">
<source>A profile with the specified name could not be found or is not a valid JSON object.</source> <source>Launch profile is not a JSON object.</source>
<target state="needs-review-translation">啟動設定檔並非 JSON 物件。</target> <target state="translated">啟動設定檔並非 JSON 物件。</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="LaunchProfileHandlerCannotBeLocated"> <trans-unit id="LaunchProfileHandlerCannotBeLocated">

View file

@ -17,13 +17,15 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NETCore.App" Version="$(CLI_SharedFrameworkVersion)" /> <PackageReference Include="Microsoft.NETCore.App" Version="$(CLI_SharedFrameworkVersion)" />
<PackageReference Include="Microsoft.Build.Runtime" Version="$(CLI_MSBuild_Version)" />
<PackageReference Include="NuGet.Build.Tasks" Version="$(CLI_NuGet_Version)" /> <PackageReference Include="NuGet.Build.Tasks" Version="$(CLI_NuGet_Version)" />
<PackageReference Include="Microsoft.TestPlatform.CLI" Version="$(CLI_TestPlatform_Version)" /> <PackageReference Include="Microsoft.TestPlatform.CLI" Version="$(CLI_TestPlatform_Version)" />
<PackageReference Include="Microsoft.TestPlatform.Build" Version="$(CLI_TestPlatform_Version)" /> <PackageReference Include="Microsoft.TestPlatform.Build" Version="$(CLI_TestPlatform_Version)" />
<PackageReference Include="NuGet.ProjectModel" Version="$(CLI_NuGet_Version)" /> <PackageReference Include="NuGet.ProjectModel" Version="$(CLI_NuGet_Version)" />
<PackageReference Include="Microsoft.NETCore.Compilers" Version="$(CLI_Roslyn_Version)"> <!-- The project json migration commands depend on an older version of Roslyn.
<ExcludeAssets>All</ExcludeAssets> Lift the version here to match what tool_roslyn depends on (otherwise an older version will
</PackageReference> be added to the TPA when we crossgen and we won't be able to crossgen tool_roslyn -->
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(CLI_Roslyn_Version)" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -72,33 +74,9 @@
<Target Name="PublishRoslyn" <Target Name="PublishRoslyn"
BeforeTargets="Publish"> BeforeTargets="Publish">
<ItemGroup> <DotNetPublish ToolPath="$(Stage0Directory)"
<RoslynBits Include="$(NuGetPackagesDir)/microsoft.netcore.compilers/$(CLI_Roslyn_Version)/tools/**/*" />
</ItemGroup>
<Copy SourceFiles="@(RoslynBits)" DestinationFiles="@(RoslynBits->'$(RoslynDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(RoslynSatelliteBits)" DestinationFiles="@(RoslynSatelliteBits->'$(RoslynDirectory)/bincore/%(RecursiveDir)%(Filename)%(Extension)')" />
<ItemGroup>
<RoslynRuntimeConfigs Include="$(RoslynDirectory)/bincore/csc.runtimeconfig.json" />
<RoslynRuntimeConfigs Include="$(RoslynDirectory)/bincore/vbc.runtimeconfig.json" />
<RoslynDeps Include="$(RoslynDirectory)/bincore/csc.deps.json" />
<RoslynDeps Include="$(RoslynDirectory)/bincore/vbc.deps.json" />
<RoslynSatelliteDeps Include="$(RoslynDirectory)/bincore/tool_roslyn_satellites.deps.json" />
</ItemGroup>
<PropertyGroup>
<ReplacementPattern>"version": ".*"</ReplacementPattern>
<ReplacementString>"version": "$(CLI_SharedFrameworkVersion)"</ReplacementString>
</PropertyGroup>
<ReplaceFileContents
InputFile="%(RoslynRuntimeConfigs.Identity)"
DestinationFile="%(RoslynRuntimeConfigs.Identity)"
ReplacementPatterns="$(ReplacementPattern)"
ReplacementStrings="$(ReplacementString)" />
<DotNetPublish
ToolPath="$(Stage0Directory)"
Configuration="$(Configuration)" Configuration="$(Configuration)"
ProjectPath="$(SrcDirectory)/tool_roslyn_satellites/tool_roslyn_satellites.csproj" /> ProjectPath="$(SrcDirectory)/tool_roslyn/tool_roslyn.csproj" />
<AddToDeps TargetDeps="@(RoslynDeps)" AdditionalDeps="@(RoslynSatelliteDeps)" />
<Delete Files="@(RoslynSatelliteDeps)" />
</Target> </Target>
<Target Name="PublishFSharp" <Target Name="PublishFSharp"
@ -222,72 +200,41 @@
Condition=" '$(DISABLE_CROSSGEN)' == '' " Condition=" '$(DISABLE_CROSSGEN)' == '' "
AfterTargets="PublishMSBuildExtensions"> AfterTargets="PublishMSBuildExtensions">
<ItemGroup> <ItemGroup>
<RoslynFiles Include="$(PublishDir)Roslyn\bincore\**\*" />
<FSharpFiles Include="$(PublishDir)FSharp\**\*" Exclude="$(PublishDir)FSharp\FSharp.Build.dll" />
<RemainingFiles Include="$(PublishDir)**\*" Exclude="@(RoslynFiles);@(FSharpFiles)" />
<!-- Removing Full CLR built TestHost assemblies from getting Crossgen as it is throwing error --> <!-- Removing Full CLR built TestHost assemblies from getting Crossgen as it is throwing error -->
<RemainingFiles Remove="$(PublishDir)TestHost*\**\*" /> <SdkFiles Include="$(PublishDir)/**/*" Exclude="$(PublishDir)/TestHost*/**/*;$(PublishDir)/Sdks/**/*" />
<RemainingFiles Remove="$(PublishDir)Sdks\**\*" />
<!-- Don't try to CrossGen .NET Framework support assemblies for .NET Standard --> <!-- Don't try to CrossGen .NET Framework support assemblies for .NET Standard -->
<RemainingFiles Remove="$(PublishDir)Microsoft\Microsoft.NET.Build.Extensions\net*\**\*" /> <SdkFiles Remove="$(PublishDir)/Microsoft\Microsoft.NET.Build.Extensions\net*\**\*" />
<!-- Don't try to CrossGen tasks and supporting DLLs compiled for .NET Framework --> <!-- Don't try to CrossGen tasks and supporting DLLs compiled for .NET Framework -->
<RemainingFiles Remove="$(PublishDir)Microsoft\Microsoft.NET.Build.Extensions\tools\net*\**\*" /> <SdkFiles Remove="$(PublishDir)/Microsoft\Microsoft.NET.Build.Extensions\tools\net*\**\*" />
</ItemGroup> </ItemGroup>
<AddMetadataIsPE Items="@(RoslynFiles)"> <AddMetadataIsPE Items="@(SdkFiles)">
<Output TaskParameter="ResultItems" ItemName="RoslynFilesWithPEMarker" /> <Output TaskParameter="ResultItems" ItemName="SdkFilesWithPEMarker" />
</AddMetadataIsPE>
<AddMetadataIsPE Items="@(FSharpFiles)">
<Output TaskParameter="ResultItems" ItemName="FSharpFilesWithPEMarker" />
</AddMetadataIsPE>
<AddMetadataIsPE Items="@(RemainingFiles)">
<Output TaskParameter="ResultItems" ItemName="RemainingFilesWithPEMarker" />
</AddMetadataIsPE> </AddMetadataIsPE>
<ItemGroup> <ItemGroup>
<RoslynTargets Include="%(RoslynFilesWithPEMarker.FullPath)" Condition=" '%(RoslynFilesWithPEMarker.IsPE)' == 'True' " /> <CrossgenTargets Include="%(SdkFilesWithPEMarker.FullPath)" Condition=" '%(SdkFilesWithPEMarker.IsPE)' == 'True' " />
<FSharpTargets Include="%(FSharpFilesWithPEMarker.FullPath)" Condition=" '%(FSharpFilesWithPEMarker.IsPE)' == 'True' " />
<RemainingTargets Include="%(RemainingFilesWithPEMarker.FullPath)" Condition=" '%(RemainingFilesWithPEMarker.IsPE)' == 'True' " />
<RoslynFolders Include="@(RoslynTargets-&gt;DirectoryName()-&gt;Distinct())" />
<FSharpFolders Include="@(FSharpTargets-&gt;DirectoryName()-&gt;Distinct())" />
<RemainingFolders Include="@(RemainingTargets-&gt;DirectoryName()-&gt;Distinct())" />
<!-- FSharp.Build.dll causes the FSharp folder to be included. Remove it, as we don't want other FSharp dlls being included in the crossgen. -->
<RemainingFolders Remove="$(PublishDir)FSharp\**\*" />
</ItemGroup> </ItemGroup>
<RemoveDuplicates Inputs="@(SdkFiles->'%(RootDir)%(Directory)')">
<Output TaskParameter="Filtered" ItemName="PublishDirSubDirectories" />
</RemoveDuplicates>
<!-- Ensure crossgen tool is executable. See https://github.com/NuGet/Home/issues/4424 --> <!-- Ensure crossgen tool is executable. See https://github.com/NuGet/Home/issues/4424 -->
<Chmod Condition=" '$(OSName)' != 'win' " <Chmod Condition=" '$(OSName)' != 'win' "
Glob="$(CrossgenPath)" Glob="$(CrossgenPath)"
Mode="u+x" /> Mode="u+x" />
<Crossgen <Crossgen SourceAssembly="%(CrossgenTargets.FullPath)"
SourceAssembly="%(RoslynTargets.FullPath)" DestinationPath="%(CrossgenTargets.FullPath)"
DestinationPath="%(RoslynTargets.FullPath)"
JITPath="$(LibCLRJitPath)" JITPath="$(LibCLRJitPath)"
CrossgenPath="$(CrossgenPath)" CrossgenPath="$(CrossgenPath)"
ReadyToRun="True" ReadyToRun="True"
PlatformAssemblyPaths="@(PlatformAssemblies);@(RoslynFolders);$(SharedFrameworkNameVersionPath)" /> PlatformAssemblyPaths="@(PlatformAssemblies);
@(PublishDirSubDirectories);
<Crossgen $(SharedFrameworkNameVersionPath)" />
SourceAssembly="%(FSharpTargets.FullPath)"
DestinationPath="%(FSharpTargets.FullPath)"
JITPath="$(LibCLRJitPath)"
CrossgenPath="$(CrossgenPath)"
ReadyToRun="True"
PlatformAssemblyPaths="@(PlatformAssemblies);@(FSharpFolders);$(SharedFrameworkNameVersionPath)" />
<Crossgen
SourceAssembly="%(RemainingTargets.FullPath)"
DestinationPath="%(RemainingTargets.FullPath)"
JITPath="$(LibCLRJitPath)"
CrossgenPath="$(CrossgenPath)"
ReadyToRun="True"
PlatformAssemblyPaths="@(PlatformAssemblies);@(RemainingFolders);$(SharedFrameworkNameVersionPath)" />
</Target> </Target>
<Target Name="ChmodPublishDir" <Target Name="ChmodPublishDir"
@ -296,6 +243,8 @@
<Exec Command="find $(SdkOutputDirectory) -type d -exec chmod 755 {} \;" /> <Exec Command="find $(SdkOutputDirectory) -type d -exec chmod 755 {} \;" />
<Exec Command="find $(SdkOutputDirectory) -type f -exec chmod 644 {} \;" /> <Exec Command="find $(SdkOutputDirectory) -type f -exec chmod 644 {} \;" />
<Chmod Mode="755" Glob="$(SdkOutputDirectory)/Roslyn/RunCsc.sh" />
<Chmod Mode="755" Glob="$(SdkOutputDirectory)/Roslyn/RunVbc.sh" />
<Chmod Mode="755" Glob="$(SdkOutputDirectory)/FSharp/RunFsc.sh" /> <Chmod Mode="755" Glob="$(SdkOutputDirectory)/FSharp/RunFsc.sh" />
</Target> </Target>

View file

@ -0,0 +1,6 @@
@echo off
REM Copyright (c) .NET Foundation and contributors. All rights reserved.
REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
"%~dp0..\..\..\dotnet" "%~dp0csc.exe" %*

17
src/tool_roslyn/RunCsc.sh Executable file
View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
#
# 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.
#
set -e
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
"$DIR/../../../dotnet" "$DIR/csc.exe" "$@"

View file

@ -0,0 +1,6 @@
@echo off
REM Copyright (c) .NET Foundation and contributors. All rights reserved.
REM Licensed under the MIT license. See LICENSE file in the project root for full license information.
"%~dp0..\..\..\dotnet" "%~dp0vbc.exe" %*

17
src/tool_roslyn/RunVbc.sh Executable file
View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
#
# 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.
#
set -e
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
"$DIR/../../../dotnet" "$DIR/vbc.exe" "$@"

View file

@ -0,0 +1,68 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.tasks" />
<PropertyGroup>
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PublishDir>$(RoslynDirectory)</PublishDir>
<VersionSuffix>$(CommitCount)</VersionSuffix>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NetCore.App" Version="$(CLI_SharedFrameworkVersion)" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(CLI_Roslyn_Version)" />
<PackageReference Include="Microsoft.CodeAnalysis.Build.Tasks" Version="$(CLI_Roslyn_Version)" />
<PackageReference Include="Microsoft.Net.Compilers.netcore" Version="$(CLI_Roslyn_Version)" />
<PackageReference Include="Microsoft.DiaSymReader.Native" Version="$(CLI_DiaSymNative_Version)" Condition="'$(OSName)' == 'win'" />
<PackageReference Include="CliDeps.Satellites.Roslyn" Version="$(CLI_Roslyn_Satellites_Version)" />
</ItemGroup>
<ItemGroup>
<Content Include="RunCsc.sh;RunCsc.cmd;RunVbc.sh;RunVbc.cmd">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
</ItemGroup>
<Target Name="MakeCscAndVbcRunnableAndMoveToPublishDir"
AfterTargets="Publish"
BeforeTargets="RemoveFilesAfterPublish">
<ItemGroup>
<AssetsToRemoveFromDeps Include="runtimes/any/native/csc.dll"
SectionName="runtimeTargets" />
<AssetsToRemoveFromDeps Include="runtimes/any/native/vbc.dll"
SectionName="runtimeTargets" />
<AssetsToRemoveFromDeps Include="tool_roslyn.dll"
SectionName="runtime"/>
</ItemGroup>
<RemoveAssetFromDepsPackages DepsFile="$(PublishDir)/$(TargetName).deps.json"
SectionName="%(AssetsToRemoveFromDeps.SectionName)"
AssetPath="%(AssetsToRemoveFromDeps.Identity)" />
<Copy SourceFiles="$(PublishDir)/runtimes/any/native/csc.dll;
$(PublishDir)/$(TargetName).runtimeconfig.json;
$(PublishDir)/$(TargetName).deps.json;"
DestinationFiles="$(PublishDir)/csc.exe;
$(PublishDir)/csc.runtimeconfig.json;
$(PublishDir)/csc.deps.json;" />
<Copy SourceFiles="$(PublishDir)/runtimes/any/native/vbc.dll;
$(PublishDir)/$(TargetName).runtimeconfig.json;
$(PublishDir)/$(TargetName).deps.json;"
DestinationFiles="$(PublishDir)/vbc.exe;
$(PublishDir)/vbc.runtimeconfig.json;
$(PublishDir)/vbc.deps.json;" />
</Target>
<Target Name="RemoveFilesAfterPublish"
AfterTargets="Publish">
<Delete Files="$(PublishDir)/$(TargetName).dll" />
<Delete Files="$(PublishDir)/$(TargetName).pdb" />
<Delete Files="$(PublishDir)/$(TargetName).runtimeconfig.json" />
<Delete Files="$(PublishDir)/$(TargetName).deps.json" />
</Target>
</Project>

View file

@ -1,35 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.tasks" />
<PropertyGroup>
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
<TargetFramework>$(CliTargetFramework)</TargetFramework>
<RuntimeFrameworkVersion>$(CLI_SharedFrameworkVersion)</RuntimeFrameworkVersion>
<PublishDir>$(RoslynDirectory)/bincore</PublishDir>
<VersionSuffix>$(CommitCount)</VersionSuffix>
<GenerateRuntimeConfigurationFiles>false</GenerateRuntimeConfigurationFiles>
<CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory>
<CopyOutputSymbolsToPublishDirectory>false</CopyOutputSymbolsToPublishDirectory>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NetCore.App" Version="$(CLI_SharedFrameworkVersion)" />
<PackageReference Include="CliDeps.Satellites.Roslyn" Version="$(CLI_Roslyn_Satellites_Version)" />
</ItemGroup>
<Target Name="MoveBuildTasksSatellitesAndRemoveBuildOutputAsset"
AfterTargets="Publish">
<RemoveAssetFromDepsPackages DepsFile="$(PublishDir)/$(TargetName).deps.json"
SectionName="runtime"
AssetPath="$(TargetFileName)" />
<ItemGroup>
<BuildTaskSatellites Include="$(PublishDir)/**/Microsoft.Build.Tasks.CodeAnalysis.resources.dll" />
</ItemGroup>
<Move SourceFiles="@(BuildTaskSatellites)"
DestinationFiles="@(BuildTaskSatellites->'$(PublishDir)/../%(RecursiveDir)/%(Filename)%(Extension)')" />
</Target>
</Project>

View file

@ -266,14 +266,8 @@ namespace Microsoft.DotNet.Tests
var lockFile = new LockFileFormat().Read(lockFilePath); var lockFile = new LockFileFormat().Read(lockFilePath);
var depsJsonFile = Path.Combine( // NOTE: We must not use the real deps.json path here as it will interfere with tests running in parallel.
Path.GetDirectoryName(lockFilePath), var depsJsonFile = Path.GetTempFileName();
"dotnet-portable.deps.json");
if (File.Exists(depsJsonFile))
{
File.Delete(depsJsonFile);
}
File.WriteAllText(depsJsonFile, "temp"); File.WriteAllText(depsJsonFile, "temp");
var projectToolsCommandResolver = SetupProjectToolsCommandResolver(); var projectToolsCommandResolver = SetupProjectToolsCommandResolver();

View file

@ -31,6 +31,8 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
[Theory] [Theory]
[InlineData("MSBuildExtensionsPath")] [InlineData("MSBuildExtensionsPath")]
[InlineData("CscToolExe")]
[InlineData("VbcToolExe")]
[InlineData("MSBuildSDKsPath")] [InlineData("MSBuildSDKsPath")]
[InlineData("DOTNET_CLI_TELEMETRY_SESSIONID")] [InlineData("DOTNET_CLI_TELEMETRY_SESSIONID")]
public void ItSetsEnvironmentalVariables(string envVarName) public void ItSetsEnvironmentalVariables(string envVarName)
@ -64,6 +66,27 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
.Exist(); .Exist();
} }
[Fact]
public void ItSetsCscToolExePathToValidPath()
{
var msbuildPath = "<msbuildpath>";
var envVar = "CscToolExe";
new FileInfo(new MSBuildForwardingApp(new string[0], msbuildPath)
.GetProcessStartInfo()
.Environment[envVar])
.Should().NotBeNull("constructor will throw on invalid path");
}
[Fact]
public void ItSetsVbcToolExePathToValidPath()
{
var msbuildPath = "<msbuildpath>";
var envVar = "VbcToolExe";
new FileInfo(new MSBuildForwardingApp(new string[0], msbuildPath)
.GetProcessStartInfo()
.Environment[envVar])
.Should().NotBeNull("constructor will throw on invalid path");
}
[Fact] [Fact]
public void ItSetsOrIgnoresTelemetrySessionId() public void ItSetsOrIgnoresTelemetrySessionId()