Merge branch 'release/2.1.4xx' into merges/release/2.1.3xx-to-release/2.1.4xx
This commit is contained in:
commit
355b08befd
8 changed files with 55 additions and 52 deletions
66
README.md
66
README.md
|
@ -9,7 +9,7 @@ Looking for V1 of the .NET Core tooling?
|
||||||
|
|
||||||
If you are looking for the v2.0 release of the .NET Core tools (CLI, MSBuild and the new csproj), head over to https://dot.net/core and download!
|
If you are looking for the v2.0 release of the .NET Core tools (CLI, MSBuild and the new csproj), head over to https://dot.net/core and download!
|
||||||
|
|
||||||
> **Note:** the release/2.1.3xx branch of the CLI repo is based on an upcoming update of the SDK and is considered pre-release. For production-level usage, please use the
|
> **Note:** the release/2.1.4xx branch of the CLI repo is based on an upcoming update of the SDK and is considered pre-release. For production-level usage, please use the
|
||||||
> released version of the tools available at https://dot.net/core
|
> released version of the tools available at https://dot.net/core
|
||||||
|
|
||||||
Found an issue?
|
Found an issue?
|
||||||
|
@ -65,7 +65,7 @@ To download the .NET Core runtime **without** the SDK, visit https://github.com/
|
||||||
> want to install the latest released versions, check out the [preceding section](#looking-for-v1-of-the-net-core-tooling).
|
> want to install the latest released versions, check out the [preceding section](#looking-for-v1-of-the-net-core-tooling).
|
||||||
> In order to be able to restore these pre-release packages, you may need to add a NuGet feed pointing to https://dotnet.myget.org/F/dotnet-core/api/v3/index.json. Other feeds may also be necessary depending on what kind of project you are working with.
|
> In order to be able to restore these pre-release packages, you may need to add a NuGet feed pointing to https://dotnet.myget.org/F/dotnet-core/api/v3/index.json. Other feeds may also be necessary depending on what kind of project you are working with.
|
||||||
|
|
||||||
| Platform | Latest Daily Build<br>*release/2.1.3xx*<br>[![][version-badge]][version] |
|
| Platform | Latest Daily Build<br>*release/2.1.4xx*<br>[![][version-badge]][version] |
|
||||||
| -------- | :-------------------------------------: |
|
| -------- | :-------------------------------------: |
|
||||||
| **Windows x64** | [Installer][win-x64-installer] - [Checksum][win-x64-installer-checksum]<br>[zip][win-x64-zip] - [Checksum][win-x64-zip-checksum] |
|
| **Windows x64** | [Installer][win-x64-installer] - [Checksum][win-x64-installer-checksum]<br>[zip][win-x64-zip] - [Checksum][win-x64-zip-checksum] |
|
||||||
| **Windows x86** | [Installer][win-x86-installer] - [Checksum][win-x86-installer-checksum]<br>[zip][win-x86-zip] - [Checksum][win-x86-zip-checksum] |
|
| **Windows x86** | [Installer][win-x86-installer] - [Checksum][win-x86-installer-checksum]<br>[zip][win-x86-zip] - [Checksum][win-x86-zip-checksum] |
|
||||||
|
@ -76,7 +76,7 @@ To download the .NET Core runtime **without** the SDK, visit https://github.com/
|
||||||
| **RHEL 6** | [tar.gz][rhel-6-targz] - [Checksum][rhel-6-targz-checksum] |
|
| **RHEL 6** | [tar.gz][rhel-6-targz] - [Checksum][rhel-6-targz-checksum] |
|
||||||
| **Alpine 3.6** | [tar.gz][alpine-3.6-targz] - [Checksum][alpine-3.6-targz-checksum] |
|
| **Alpine 3.6** | [tar.gz][alpine-3.6-targz] - [Checksum][alpine-3.6-targz-checksum] |
|
||||||
|
|
||||||
| Latest Coherent Build<sup>2</sup><br>*release/2.1.3xx* |
|
| Latest Coherent Build<sup>2</sup><br>*release/2.1.4xx* |
|
||||||
|:------:|
|
|:------:|
|
||||||
| [![][coherent-version-badge]][coherent-version] |
|
| [![][coherent-version-badge]][coherent-version] |
|
||||||
|
|
||||||
|
@ -84,47 +84,47 @@ Reference notes:
|
||||||
> **1**: *Our Debian packages are put together slightly differently than the other OS specific installers. Instead of combining everything, we have separate component packages that depend on each other. If you're installing these directly from the .deb files (via dpkg or similar), then you'll need to install the [corresponding Host, Host FX Resolver, and Shared Framework packages](https://github.com/dotnet/core-setup#daily-builds) before installing the Sdk package.*
|
> **1**: *Our Debian packages are put together slightly differently than the other OS specific installers. Instead of combining everything, we have separate component packages that depend on each other. If you're installing these directly from the .deb files (via dpkg or similar), then you'll need to install the [corresponding Host, Host FX Resolver, and Shared Framework packages](https://github.com/dotnet/core-setup#daily-builds) before installing the Sdk package.*
|
||||||
> <br><br>**2**: *A 'coherent' build is defined as a build where the Runtime version matches between the CLI and Asp.NET.*
|
> <br><br>**2**: *A 'coherent' build is defined as a build where the Runtime version matches between the CLI and Asp.NET.*
|
||||||
|
|
||||||
[version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/latest.version
|
[version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/latest.version
|
||||||
[coherent-version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/latest.coherent.version
|
[coherent-version]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/latest.coherent.version
|
||||||
[comment]: # (The latest versions are always the same across all platforms. Just need one to show, so picking win-x64's svg.)
|
[comment]: # (The latest versions are always the same across all platforms. Just need one to show, so picking win-x64's svg.)
|
||||||
[version-badge]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/win_x64_Release_version_badge.svg
|
[version-badge]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/win_x64_Release_version_badge.svg
|
||||||
[coherent-version-badge]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/win_x64_Release_coherent_badge.svg
|
[coherent-version-badge]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/win_x64_Release_coherent_badge.svg
|
||||||
|
|
||||||
[win-x64-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x64.exe
|
[win-x64-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-win-x64.exe
|
||||||
[win-x64-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x64.exe.sha
|
[win-x64-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-win-x64.exe.sha
|
||||||
[win-x64-zip]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x64.zip
|
[win-x64-zip]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-win-x64.zip
|
||||||
[win-x64-zip-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x64.zip.sha
|
[win-x64-zip-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-win-x64.zip.sha
|
||||||
|
|
||||||
[win-x86-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x86.exe
|
[win-x86-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-win-x86.exe
|
||||||
[win-x86-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x86.exe.sha
|
[win-x86-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-win-x86.exe.sha
|
||||||
[win-x86-zip]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x86.zip
|
[win-x86-zip]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-win-x86.zip
|
||||||
[win-x86-zip-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-win-x86.zip.sha
|
[win-x86-zip-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-win-x86.zip.sha
|
||||||
|
|
||||||
[osx-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-osx-x64.pkg
|
[osx-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-osx-x64.pkg
|
||||||
[osx-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-osx-x64.pkg.sha
|
[osx-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-osx-x64.pkg.sha
|
||||||
[osx-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-osx-x64.tar.gz
|
[osx-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-osx-x64.tar.gz
|
||||||
[osx-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-osx-x64.tar.gz.sha
|
[osx-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-osx-x64.tar.gz.sha
|
||||||
|
|
||||||
[linux-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-linux-x64.tar.gz
|
[linux-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-linux-x64.tar.gz
|
||||||
[linux-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-linux-x64.tar.gz.sha
|
[linux-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-linux-x64.tar.gz.sha
|
||||||
|
|
||||||
[linux-arm-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-linux-arm.tar.gz
|
[linux-arm-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-linux-arm.tar.gz
|
||||||
[linux-arm-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-linux-arm.tar.gz.sha
|
[linux-arm-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-linux-arm.tar.gz.sha
|
||||||
|
|
||||||
[linux-arm64-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-linux-arm64.tar.gz
|
[linux-arm64-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-linux-arm64.tar.gz
|
||||||
[linux-arm64-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-linux-arm64.tar.gz.sha
|
[linux-arm64-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-linux-arm64.tar.gz.sha
|
||||||
|
|
||||||
[linux-DEB-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-x64.deb
|
[linux-DEB-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-x64.deb
|
||||||
[linux-DEB-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-x64.deb.sha
|
[linux-DEB-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-x64.deb.sha
|
||||||
|
|
||||||
[linux-RPM-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-x64.rpm
|
[linux-RPM-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-x64.rpm
|
||||||
[linux-RPM-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-x64.rpm.sha
|
[linux-RPM-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-x64.rpm.sha
|
||||||
|
|
||||||
[rhel-6-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-rhel.6-x64.tar.gz
|
[rhel-6-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-rhel.6-x64.tar.gz
|
||||||
[rhel-6-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-rhel.6-x64.tar.gz.sha
|
[rhel-6-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-rhel.6-x64.tar.gz.sha
|
||||||
|
|
||||||
[alpine-3.6-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-alpine.3.6-x64.tar.gz
|
[alpine-3.6-targz]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-alpine.3.6-x64.tar.gz
|
||||||
[alpine-3.6-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.3xx/dotnet-sdk-latest-alpine.3.6-x64.tar.gz.sha
|
[alpine-3.6-targz-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.1.4xx/dotnet-sdk-latest-alpine.3.6-x64.tar.gz.sha
|
||||||
|
|
||||||
# Debian daily feed
|
# Debian daily feed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Channel>master</Channel>
|
<Channel>release/2.1.4xx</Channel>
|
||||||
<BranchName>master</BranchName>
|
<BranchName>release/2.1.4xx</BranchName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionMajor>2</VersionMajor>
|
<VersionMajor>2</VersionMajor>
|
||||||
<VersionMinor>1</VersionMinor>
|
<VersionMinor>1</VersionMinor>
|
||||||
<VersionPatch>300</VersionPatch>
|
<VersionPatch>400</VersionPatch>
|
||||||
<ReleaseSuffix Condition=" '$(ReleaseSuffix)' == '' ">rc1</ReleaseSuffix>
|
<ReleaseSuffix Condition=" '$(ReleaseSuffix)' == '' ">preview</ReleaseSuffix>
|
||||||
|
|
||||||
<CliVersionNoSuffix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</CliVersionNoSuffix>
|
<CliVersionNoSuffix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</CliVersionNoSuffix>
|
||||||
<CliVersionPrefix>$(CliVersionNoSuffix)-$(ReleaseSuffix)</CliVersionPrefix>
|
<CliVersionPrefix>$(CliVersionNoSuffix)-$(ReleaseSuffix)</CliVersionPrefix>
|
||||||
|
|
|
@ -9,7 +9,6 @@ namespace Microsoft.DotNet.ToolPackage
|
||||||
internal interface IProjectRestorer
|
internal interface IProjectRestorer
|
||||||
{
|
{
|
||||||
void Restore(FilePath project,
|
void Restore(FilePath project,
|
||||||
DirectoryPath assetJsonOutput,
|
|
||||||
FilePath? nugetConfig = null,
|
FilePath? nugetConfig = null,
|
||||||
string verbosity = null);
|
string verbosity = null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,7 @@ namespace Microsoft.DotNet.ToolPackage
|
||||||
versionRange: versionRange,
|
versionRange: versionRange,
|
||||||
targetFramework: targetFramework ?? BundledTargetFramework.GetTargetFrameworkMoniker(),
|
targetFramework: targetFramework ?? BundledTargetFramework.GetTargetFrameworkMoniker(),
|
||||||
restoreDirectory: stageDirectory,
|
restoreDirectory: stageDirectory,
|
||||||
|
assetJsonOutputDirectory: stageDirectory,
|
||||||
rootConfigDirectory: rootConfigDirectory,
|
rootConfigDirectory: rootConfigDirectory,
|
||||||
additionalFeeds: additionalFeeds);
|
additionalFeeds: additionalFeeds);
|
||||||
|
|
||||||
|
@ -61,7 +62,6 @@ namespace Microsoft.DotNet.ToolPackage
|
||||||
{
|
{
|
||||||
_projectRestorer.Restore(
|
_projectRestorer.Restore(
|
||||||
tempProject,
|
tempProject,
|
||||||
stageDirectory,
|
|
||||||
nugetConfig,
|
nugetConfig,
|
||||||
verbosity: verbosity);
|
verbosity: verbosity);
|
||||||
}
|
}
|
||||||
|
@ -116,6 +116,7 @@ namespace Microsoft.DotNet.ToolPackage
|
||||||
VersionRange versionRange,
|
VersionRange versionRange,
|
||||||
string targetFramework,
|
string targetFramework,
|
||||||
DirectoryPath restoreDirectory,
|
DirectoryPath restoreDirectory,
|
||||||
|
DirectoryPath assetJsonOutputDirectory,
|
||||||
DirectoryPath? rootConfigDirectory,
|
DirectoryPath? rootConfigDirectory,
|
||||||
string[] additionalFeeds)
|
string[] additionalFeeds)
|
||||||
{
|
{
|
||||||
|
@ -132,7 +133,11 @@ namespace Microsoft.DotNet.ToolPackage
|
||||||
|
|
||||||
var tempProjectContent = new XDocument(
|
var tempProjectContent = new XDocument(
|
||||||
new XElement("Project",
|
new XElement("Project",
|
||||||
new XAttribute("Sdk", "Microsoft.NET.Sdk"),
|
new XElement("PropertyGroup",
|
||||||
|
new XElement("MsBuildProjectExtensionsPath", assetJsonOutputDirectory.Value)), // change the output directory of asset.json
|
||||||
|
new XElement(("Import"),
|
||||||
|
new XAttribute("Project", "Sdk.props"),
|
||||||
|
new XAttribute("Sdk", "Microsoft.NET.Sdk")),
|
||||||
new XElement("PropertyGroup",
|
new XElement("PropertyGroup",
|
||||||
new XElement("TargetFramework", targetFramework),
|
new XElement("TargetFramework", targetFramework),
|
||||||
new XElement("RestorePackagesPath", restoreDirectory.Value),
|
new XElement("RestorePackagesPath", restoreDirectory.Value),
|
||||||
|
@ -148,9 +153,10 @@ namespace Microsoft.DotNet.ToolPackage
|
||||||
new XElement("PackageReference",
|
new XElement("PackageReference",
|
||||||
new XAttribute("Include", packageId.ToString()),
|
new XAttribute("Include", packageId.ToString()),
|
||||||
new XAttribute("Version",
|
new XAttribute("Version",
|
||||||
versionRange?.ToString("S", new VersionRangeFormatter()) ?? "*") // nuget will restore latest stable for *
|
versionRange?.ToString("S", new VersionRangeFormatter()) ?? "*"))), // nuget will restore latest stable for *
|
||||||
))
|
new XElement(("Import"),
|
||||||
));
|
new XAttribute("Project", "Sdk.targets"),
|
||||||
|
new XAttribute("Sdk", "Microsoft.NET.Sdk"))));
|
||||||
|
|
||||||
File.WriteAllText(tempProject.Value, tempProjectContent.ToString());
|
File.WriteAllText(tempProject.Value, tempProjectContent.ToString());
|
||||||
return tempProject;
|
return tempProject;
|
||||||
|
|
|
@ -27,7 +27,6 @@ namespace Microsoft.DotNet.Tools.Tool.Install
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Restore(FilePath project,
|
public void Restore(FilePath project,
|
||||||
DirectoryPath assetJsonOutput,
|
|
||||||
FilePath? nugetConfig = null,
|
FilePath? nugetConfig = null,
|
||||||
string verbosity = null)
|
string verbosity = null)
|
||||||
{
|
{
|
||||||
|
@ -43,8 +42,7 @@ namespace Microsoft.DotNet.Tools.Tool.Install
|
||||||
argsToPassToRestore.AddRange(new List<string>
|
argsToPassToRestore.AddRange(new List<string>
|
||||||
{
|
{
|
||||||
"--runtime",
|
"--runtime",
|
||||||
AnyRid,
|
AnyRid
|
||||||
$"-property:BaseIntermediateOutputPath={assetJsonOutput.ToXmlEncodeString()}"
|
|
||||||
});
|
});
|
||||||
|
|
||||||
argsToPassToRestore.Add($"-verbosity:{verbosity ?? "quiet"}");
|
argsToPassToRestore.Add($"-verbosity:{verbosity ?? "quiet"}");
|
||||||
|
|
|
@ -57,19 +57,19 @@ namespace Microsoft.DotNet.Tools.Tests.ComponentMocks
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Restore(FilePath project,
|
public void Restore(FilePath project,
|
||||||
DirectoryPath assetJsonOutput,
|
|
||||||
FilePath? nugetConfig = null,
|
FilePath? nugetConfig = null,
|
||||||
string verbosity = null)
|
string verbosity = null)
|
||||||
{
|
{
|
||||||
string packageId;
|
string packageId;
|
||||||
VersionRange versionRange;
|
VersionRange versionRange;
|
||||||
string targetFramework;
|
string targetFramework;
|
||||||
|
DirectoryPath assetJsonOutput;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// The mock installer wrote a mock project file containing id:version:framework
|
// The mock installer wrote a mock project file containing id;version;framework;stageDirectory
|
||||||
var contents = _fileSystem.File.ReadAllText(project.Value);
|
var contents = _fileSystem.File.ReadAllText(project.Value);
|
||||||
var tokens = contents.Split(':');
|
var tokens = contents.Split(';');
|
||||||
if (tokens.Length != 3)
|
if (tokens.Length != 4)
|
||||||
{
|
{
|
||||||
throw new ToolPackageException(LocalizableStrings.ToolInstallationRestoreFailed);
|
throw new ToolPackageException(LocalizableStrings.ToolInstallationRestoreFailed);
|
||||||
}
|
}
|
||||||
|
@ -77,6 +77,7 @@ namespace Microsoft.DotNet.Tools.Tests.ComponentMocks
|
||||||
packageId = tokens[0];
|
packageId = tokens[0];
|
||||||
versionRange = VersionRange.Parse(tokens[1]);
|
versionRange = VersionRange.Parse(tokens[1]);
|
||||||
targetFramework = tokens[2];
|
targetFramework = tokens[2];
|
||||||
|
assetJsonOutput = new DirectoryPath(tokens[3]);
|
||||||
}
|
}
|
||||||
catch (IOException)
|
catch (IOException)
|
||||||
{
|
{
|
||||||
|
|
|
@ -63,12 +63,11 @@ namespace Microsoft.DotNet.Tools.Tests.ComponentMocks
|
||||||
// Write a fake project with the requested package id, version, and framework
|
// Write a fake project with the requested package id, version, and framework
|
||||||
_fileSystem.File.WriteAllText(
|
_fileSystem.File.WriteAllText(
|
||||||
tempProject.Value,
|
tempProject.Value,
|
||||||
$"{packageId}:{versionRange?.ToString("S", new VersionRangeFormatter()) ?? "*"}:{targetFramework}");
|
$"{packageId};{versionRange?.ToString("S", new VersionRangeFormatter()) ?? "*"};{targetFramework};{stageDirectory.Value}");
|
||||||
|
|
||||||
// Perform a restore on the fake project
|
// Perform a restore on the fake project
|
||||||
_projectRestorer.Restore(
|
_projectRestorer.Restore(
|
||||||
tempProject,
|
tempProject,
|
||||||
stageDirectory,
|
|
||||||
nugetConfig,
|
nugetConfig,
|
||||||
verbosity);
|
verbosity);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue