Merge pull request #6731 from livarcocc/merge_rel_110
Merge rel/1.1.0 into release/2.0.0
This commit is contained in:
commit
413fa23eee
15 changed files with 40 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
|||
.NET CLI preview 3 is coming, and with it comes the .csproj project file format and msbuild engine. The team has put a lot of focus on making the transition as seamless as possible, but as with any change of this magnitude there are some gotcha's to keep in mind. This issue explains how to use the .NET CLI during this transitional period.
|
||||
.NET CLI preview 3 is here, and with it comes the .csproj project file format and msbuild engine. The team has put a lot of focus on making the transition as seamless as possible, but as with any change of this magnitude there are some gotcha's to keep in mind. This issue explains how to use the .NET CLI during this transitional period.
|
||||
|
||||
# Overview
|
||||
Starting with @coolcsh's great post [Changes to Project.json](https://blogs.msdn.microsoft.com/dotnet/2016/05/23/changes-to-project-json/) the team has been hard at work moving the .NET command line story from project.json to msbuild. Our plan was fairly straightforward:
|
||||
|
@ -60,3 +60,4 @@ When `preview2` shipped the Visual Studio new project templates included both a
|
|||
We included this file by default as a future-proofing tactic. When the CLI launches it looks for this file in the current directory, or the nearest parent directory, and tries to find a matching version of itself. If an exact match is found then it is used. Otherwise, `dotnet.exe` picks the latest installed CLI. When there is no exact match AND preview3 is installed then we get into trouble because preview3 cannot reason about project.json files.
|
||||
|
||||
When working with `preview2` and `preview3` on the same machine we need to be sure that `preview2` projects have a global.json present and that the `version` property is set to an installed preview2 version. This will typically be `1.0.0-preview2-003121` or `1.0.0-preview2-003131`. You can check what is installed by looking in `%PROGRAM FILES%\dotnet\sdk` and checking the folder names.
|
||||
|
||||
|
|
|
@ -15,5 +15,7 @@
|
|||
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="vstest" value="https://dotnet.myget.org/F/vstest/api/v3/index.json" />
|
||||
<add key="build_tools" value="https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json" />
|
||||
<add key="AspNetCurrent" value="https://dotnet.myget.org/F/aspnet-feb2017-patch/api/v3/index.json" />
|
||||
<add key="web-api" value="https://dotnet.myget.org/F/dotnet-web/api/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
|
|
|
@ -17,9 +17,6 @@
|
|||
<Copy SourceFiles="@(SdkContent)"
|
||||
DestinationFiles="@(SdkContent->'$(SdkLayoutDirectory)/%(RecursiveDir)%(FileName)%(Extension)')" />
|
||||
|
||||
<!-- Remove unused directories for FSharp.NET.Sdk, just Sdk directory is needed -->
|
||||
<RemoveDir Condition=" '$([System.IO.Path]::GetFileName($(SdkLayoutDirectory)))' == 'FSharp.NET.Sdk' " Directories="$(SdkLayoutDirectory)/build;$(SdkLayoutDirectory)/buildCrossTargeting" />
|
||||
|
||||
<Message Text="Copied Sdk $(SdkPackageName) from $(SdkNuPkgPath) to $(SdkLayoutDirectory)."
|
||||
Importance="High" />
|
||||
</Target>
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
<BundledSdk Include="Microsoft.NET.Sdk.Web" Version="$(CLI_WEBSDK_Version)" />
|
||||
<BundledSdk Include="Microsoft.NET.Sdk.Publish" Version="$(CLI_WEBSDK_Version)" />
|
||||
<BundledSdk Include="Microsoft.NET.Sdk.Web.ProjectSystem" Version="$(CLI_WEBSDK_Version)" />
|
||||
<BundledSdk Include="FSharp.NET.Sdk" Version="1.0.0-beta-040011" />
|
||||
<BundledSdk Include="FSharp.NET.Sdk" Version="1.0.4-bundled-0100" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<CLI_DiaSymNative_Version>1.6.0-beta2-25304</CLI_DiaSymNative_Version>
|
||||
<CLI_FSharp_Version>1.0.0-rc-170511-0</CLI_FSharp_Version>
|
||||
<CLI_NETSDK_Version>2.0.0-preview2-20170531-2</CLI_NETSDK_Version>
|
||||
<CLI_NuGet_Version>4.3.0-preview1-2500</CLI_NuGet_Version>
|
||||
<CLI_NuGet_Version>4.3.0-preview2-4082</CLI_NuGet_Version>
|
||||
<CLI_WEBSDK_Version>2.0.0-rel-20170518-512</CLI_WEBSDK_Version>
|
||||
<CLI_TestPlatform_Version>15.3.0-preview-20170601-03</CLI_TestPlatform_Version>
|
||||
<SharedFrameworkVersion>$(CLI_SharedFrameworkVersion)</SharedFrameworkVersion>
|
||||
|
|
|
@ -88,7 +88,6 @@ if ($LastExitCode -ne 0)
|
|||
exit $LastExitCode
|
||||
}
|
||||
|
||||
|
||||
Write-Output "$dotnetInstallPath -Channel ""master"" -InstallDir $env:DOTNET_INSTALL_DIR_PJ -Architecture ""$Architecture"" -Version 1.0.0-preview2-1-003177"
|
||||
Invoke-Expression "$dotnetInstallPath -Channel ""master"" -InstallDir $env:DOTNET_INSTALL_DIR_PJ -Architecture ""$Architecture"" -Version 1.0.0-preview2-1-003177"
|
||||
if ($LastExitCode -ne 0)
|
||||
|
|
|
@ -136,5 +136,12 @@ docker run $INTERACTIVE -t --rm --sig-proxy=true \
|
|||
-e COMMITCOUNT \
|
||||
-e DROPSUFFIX \
|
||||
-e RELEASESUFFIX \
|
||||
-e COREFXAZURECONTAINER \
|
||||
-e AZUREACCOUNTNAME \
|
||||
-e AZUREACCESSTOKEN \
|
||||
-e VSOPASSWORD \
|
||||
-e RELEASETOOLSGITURL \
|
||||
-e CORESETUPBLOBROOTURL \
|
||||
-e CORESETUPBLOBACCESSTOKEN \
|
||||
$DOTNET_BUILD_CONTAINER_TAG \
|
||||
$BUILD_COMMAND "$@"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// 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.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
|
|
|
@ -40,5 +40,10 @@ namespace Microsoft.Extensions.EnvironmentAbstractions
|
|||
{
|
||||
}
|
||||
}
|
||||
|
||||
public void WriteAllText(string path, string content)
|
||||
{
|
||||
File.WriteAllText(path, content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,5 +22,7 @@ namespace Microsoft.Extensions.EnvironmentAbstractions
|
|||
FileOptions fileOptions);
|
||||
|
||||
void CreateEmptyFile(string path);
|
||||
|
||||
void WriteAllText(string path, string content);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
<PackageReference Include="NuGet.Build.Tasks" Version="$(CLI_NuGet_Version)" />
|
||||
<PackageReference Include="Microsoft.TestPlatform.CLI" Version="$(CLI_TestPlatform_Version)" />
|
||||
<PackageReference Include="Microsoft.TestPlatform.Build" Version="$(CLI_TestPlatform_Version)" />
|
||||
<PackageReference Include="NuGet.Packaging.Core.Types" Version="$(CLI_NuGet_Version)" />
|
||||
<PackageReference Include="NuGet.ProjectModel" Version="$(CLI_NuGet_Version)" />
|
||||
<!-- The project json migration commands depend on an older version of Roslyn.
|
||||
Lift the version here to match what tool_roslyn depends on (otherwise an older version will
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using FluentAssertions;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
using Microsoft.DotNet.Tools.Test.Utilities.Mock;
|
||||
|
|
|
@ -175,6 +175,11 @@ namespace Microsoft.DotNet.Configurer.UnitTests
|
|||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void WriteAllText(string path, string content)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
private class MockStream : MemoryStream
|
||||
|
|
|
@ -60,6 +60,7 @@ namespace Microsoft.Extensions.DependencyModel.Tests
|
|||
private class FileMock : IFile
|
||||
{
|
||||
private Dictionary<string, string> _files;
|
||||
|
||||
public FileMock(Dictionary<string, string> files)
|
||||
{
|
||||
_files = files;
|
||||
|
@ -100,6 +101,11 @@ namespace Microsoft.Extensions.DependencyModel.Tests
|
|||
{
|
||||
_files.Add(path, string.Empty);
|
||||
}
|
||||
|
||||
public void WriteAllText(string path, string content)
|
||||
{
|
||||
_files[path] = content;
|
||||
}
|
||||
}
|
||||
|
||||
private class DirectoryMock : IDirectory
|
||||
|
|
7
tools/TestAssetsDependencies/TestAssetsDependencies.csproj
Executable file
7
tools/TestAssetsDependencies/TestAssetsDependencies.csproj
Executable file
|
@ -0,0 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
Loading…
Reference in a new issue