Merge branch 'rel/1.1.0' into merge_rel_110

* rel/1.1.0: (41 commits)
  Updating the Sdk to one that includes the error surfacing work.
  Update NuGet to 4.3.0-preview2-4082
  Update NuGet to 4.3.0-preview1-4081 and SDK to corresponding 1.1.0 based version
  Updating MSBuild to 15.3.0-preview-000246-05 to match VS.
  Updating the global.json creation to use the IFile interface and adding a unit test to cover it.
  Making restore use a config file so that it does not use fallback folders that may exist in the machine.
  Dropping a global.json when running the first run experience with a version that matches the version of the CLI being used in the command that triggered the first run.
  Updating the websdk version for 1.0
  Trying to fix the opensuse42 test failure, where we tried to invoke a tool that target 1.0.4 where the 1.0 runtime is not available.
  Pinning the stage0 to the last build out of rel/1.0.1 and adding a project to download 1.0 dependencies for test assets.
  Updating the branding to rel/1.1.0
  Dummy commit.
  Adding the access token to the lzma url.
  Dummy change to force a build.
  Reverting the msbuild version to the release version.
  Adding the web feed to nuget.config, as some packages failed to mirror and we need a build ASAP.
  Updating the msbuild, SDK and Web SDK versions.
  Dummy commit to kick off the build.
  the FSharp.NET.Sdk version `-bundled` contains only the Sdk dir
  bump f# sdk package version
  ...
This commit is contained in:
Livar Cunha 2017-06-01 09:43:31 -07:00
commit f4bb13acaa
13 changed files with 39 additions and 6 deletions

View file

@ -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.

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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)

View file

@ -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 "$@"

View file

@ -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;

View file

@ -40,5 +40,10 @@ namespace Microsoft.Extensions.EnvironmentAbstractions
{
}
}
public void WriteAllText(string path, string content)
{
File.WriteAllText(path, content);
}
}
}

View file

@ -22,5 +22,7 @@ namespace Microsoft.Extensions.EnvironmentAbstractions
FileOptions fileOptions);
void CreateEmptyFile(string path);
void WriteAllText(string path, string content);
}
}

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
</PropertyGroup>
</Project>