diff --git a/NuGet.Config b/NuGet.Config index 691898bcb..329dde57d 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -4,6 +4,7 @@ + diff --git a/README.md b/README.md index abfd0dcef..4fca8b7f8 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ If you are looking for the v1.0.1 release of the .NET Core tools (CLI, MSBuild a Found an issue? --------------- -You can consult the [known issues page](https://github.com/dotnet/core/blob/master/cli/known-issues.md) to find out the current issues and to see the workarounds. +You can consult the [Documents Index](Documentation/README.md) to find out the current issues and to see the workarounds. If you don't find your issue, please file one! However, given that this is a very high-frequency repo, we've setup some [basic guidelines](Documentation/project-docs/issue-filing-guide.md) to help you. Please consult those first. @@ -115,11 +115,11 @@ In order to download just the .NET Core runtime without the SDK, please visit ht [ubuntu-16.10-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-ubuntu.16.10-x64.deb [ubuntu-16.10-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-ubuntu.16.10-x64.deb.sha -[debian-8-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.0.0/dotnet-sdk-latest-debian-x64.deb -[debian-8-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.0.0/dotnet-sdk-latest-debian-x64.deb.sha +[debian-8-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-debian-x64.deb +[debian-8-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-debian-x64.deb.sha -[rhel-7-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.0.0/dotnet-sdk-latest-rhel-x64.rpm -[rhel-7-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/2.0.0/dotnet-sdk-latest-rhel-x64.rpm.sha +[rhel-7-installer]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-rhel-x64.rpm +[rhel-7-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-rhel-x64.rpm.sha # Debian daily feed diff --git a/build/Branding.props b/build/Branding.props index f04a371c6..07d273737 100644 --- a/build/Branding.props +++ b/build/Branding.props @@ -22,12 +22,14 @@ dotnet-sdk-internal dotnet-sdk-debug dotnet-sdk + $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-langpack $(ArtifactNameSdk)-$(SdkVersion)-$(ProductMonikerRid) $(ArtifactNameSdkDebug)-$(SdkVersion)-$(ProductMonikerRid) $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(ProductMonikerRid) + $(ArtifactNameSdkLanguagePack)-$(SdkVersion)-$(ProductMonikerRid) $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(HostMonikerRid) diff --git a/build/DependencyVersions.props b/build/DependencyVersions.props index f70e36923..ffd207bb1 100644 --- a/build/DependencyVersions.props +++ b/build/DependencyVersions.props @@ -1,11 +1,13 @@ - 2.0.0-preview3-25419-01 + 2.0.0-preview3-25426-01 15.3.0-preview-000400-01 2.3.0-beta3-61816-04 + 2.3.0-pre-20170624-6 1.6.0-beta2-25304 - 4.2.0-rc-170602-0 + 4.2.0-rc-170621-0 + 4.4.1-pre-20170624-6 - timestamped - 2.0.0-preview2-186 + notimestamp + 2.0.0-preview2-215 preview2 - 25661 + 25794 diff --git a/build/package/Archive.targets b/build/package/Archive.targets index 54352ae27..d0cd63ae1 100644 --- a/build/package/Archive.targets +++ b/build/package/Archive.targets @@ -20,13 +20,15 @@ Condition=" '$(OSName)' == 'win' " SourceDirectory="%(GenerateArchivesInputsOutputs.InputDirectory)" DestinationArchive="$(GenerateArchivesDestinationArchive)" - OverwriteDestination="true"/> + OverwriteDestination="true" + ExcludePatterns="%(GenerateArchivesInputsOutputs.ExcludePatterns)" /> + OverwriteDestination="true" + ExcludePatterns="%(GenerateArchivesInputsOutputs.ExcludePatterns)" /> @@ -42,6 +44,7 @@ $(ArchiveOutputDirectory)/%(LayoutDefinition.NameWithVersion)$(ArchiveExtension) $(LayoutDirectory)/%(LayoutDefinition.Name) %(LayoutDefinition.NameWithVersion) + %(LayoutDefinition.ExcludePatterns) diff --git a/build/package/Layout.targets b/build/package/Layout.targets index b9361c55d..6edb15076 100644 --- a/build/package/Layout.targets +++ b/build/package/Layout.targets @@ -3,6 +3,9 @@ $(LayoutDirectory)/$(ArtifactNameSdkDebug) $(LayoutDirectory)/$(ArtifactNameCombinedHostHostFxrFrameworkSdk) + $(LayoutDirectory)/$(ArtifactNameSdkLanguagePack) + *.resources.dll + .*.resources.dll @@ -11,6 +14,7 @@ + @@ -30,6 +34,11 @@ Path2="%(CombinedHostHostFxrFrameworkSdkInput.Identity)" > + + + @@ -52,6 +61,15 @@ @(CombinedHostHostFxrFrameworkSdkRelativeOutputFiles -> '$(CombinedHostHostFxrFrameworkSdkOutputDirectory)/%(Identity)') $(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk) $(ArtifactNameCombinedHostHostFxrFrameworkSdk) + $(WindowsSatelliteAssembliesRegEx) + $(SatelliteAssemblies) + + + + @(SdkLanguagePackInput) + @(SdkLanguagePackRelativeOutputFiles -> '$(SdkLanguagePackOutputDirectory)/%(Identity)') + $(ArtifactNameWithVersionSdkLanguagePack) + $(ArtifactNameSdkLanguagePack) diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index ee96ca435..451525269 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -346,7 +346,7 @@ get_latest_version_info() { version_file_url="$uncached_feed/Runtime/$channel/latest.version" else if [ "$coherent" = true ]; then - version_file_url="$uncached_feed/Runtime/$channel/latest.coherent.version" + version_file_url="$uncached_feed/Sdk/$channel/latest.coherent.version" else version_file_url="$uncached_feed/Sdk/$channel/latest.version" fi diff --git a/src/Microsoft.DotNet.Configurer/FirstTimeUseNoticeSentinel.cs b/src/Microsoft.DotNet.Configurer/FirstTimeUseNoticeSentinel.cs index 463b5bc4a..d7335dee5 100644 --- a/src/Microsoft.DotNet.Configurer/FirstTimeUseNoticeSentinel.cs +++ b/src/Microsoft.DotNet.Configurer/FirstTimeUseNoticeSentinel.cs @@ -13,19 +13,24 @@ namespace Microsoft.DotNet.Configurer public static readonly string SENTINEL = $"{Product.Version}.dotnetFirstUseSentinel"; private readonly IFile _file; + private readonly IDirectory _directory; private string _dotnetUserProfileFolderPath; private string SentinelPath => Path.Combine(_dotnetUserProfileFolderPath, SENTINEL); public FirstTimeUseNoticeSentinel(CliFallbackFolderPathCalculator cliFallbackFolderPathCalculator) : - this(cliFallbackFolderPathCalculator.DotnetUserProfileFolderPath, FileSystemWrapper.Default.File) + this( + cliFallbackFolderPathCalculator.DotnetUserProfileFolderPath, + FileSystemWrapper.Default.File, + FileSystemWrapper.Default.Directory) { } - internal FirstTimeUseNoticeSentinel(string dotnetUserProfileFolderPath, IFile file) + internal FirstTimeUseNoticeSentinel(string dotnetUserProfileFolderPath, IFile file, IDirectory directory) { _file = file; + _directory = directory; _dotnetUserProfileFolderPath = dotnetUserProfileFolderPath; } @@ -38,6 +43,11 @@ namespace Microsoft.DotNet.Configurer { if (!Exists()) { + if (!_directory.Exists(_dotnetUserProfileFolderPath)) + { + _directory.CreateDirectory(_dotnetUserProfileFolderPath); + } + _file.CreateEmptyFile(SentinelPath); } } diff --git a/src/tool_fsharp/tool_fsc.csproj b/src/tool_fsharp/tool_fsc.csproj index d4ab96210..dcd58965a 100644 --- a/src/tool_fsharp/tool_fsc.csproj +++ b/src/tool_fsharp/tool_fsc.csproj @@ -13,6 +13,7 @@ + diff --git a/src/tool_roslyn/tool_roslyn.csproj b/src/tool_roslyn/tool_roslyn.csproj index 217ef5d9b..bd702ca7c 100644 --- a/src/tool_roslyn/tool_roslyn.csproj +++ b/src/tool_roslyn/tool_roslyn.csproj @@ -17,6 +17,7 @@ + diff --git a/test/Microsoft.DotNet.Configurer.UnitTests/GivenAFirstTimeUseNoticeSentinel.cs b/test/Microsoft.DotNet.Configurer.UnitTests/GivenAFirstTimeUseNoticeSentinel.cs new file mode 100644 index 000000000..0957b162d --- /dev/null +++ b/test/Microsoft.DotNet.Configurer.UnitTests/GivenAFirstTimeUseNoticeSentinel.cs @@ -0,0 +1,175 @@ +// 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; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using FluentAssertions; +using Microsoft.DotNet.Cli.Utils; +using Microsoft.DotNet.Configurer; +using Microsoft.Extensions.DependencyModel.Tests; +using Microsoft.Extensions.EnvironmentAbstractions; +using Moq; +using Xunit; + +namespace Microsoft.DotNet.Configurer.UnitTests +{ + public class GivenAFirstTimeUseNoticeSentinel + { + private const string DOTNET_USER_PROFILE_FOLDER_PATH = "some path"; + + private FileSystemMockBuilder _fileSystemMockBuilder; + + public GivenAFirstTimeUseNoticeSentinel() + { + _fileSystemMockBuilder = FileSystemMockBuilder.Create(); + } + + [Fact] + public void TheSentinelHasTheCurrentVersionInItsName() + { + FirstTimeUseNoticeSentinel.SENTINEL.Should().Contain($"{Product.Version}"); + } + + [Fact] + public void ItReturnsTrueIfTheSentinelExists() + { + _fileSystemMockBuilder.AddFiles(DOTNET_USER_PROFILE_FOLDER_PATH, FirstTimeUseNoticeSentinel.SENTINEL); + + var fileSystemMock = _fileSystemMockBuilder.Build(); + + var firstTimeUseNoticeSentinel = + new FirstTimeUseNoticeSentinel( + DOTNET_USER_PROFILE_FOLDER_PATH, + fileSystemMock.File, + fileSystemMock.Directory); + + firstTimeUseNoticeSentinel.Exists().Should().BeTrue(); + } + + [Fact] + public void ItReturnsFalseIfTheSentinelDoesNotExist() + { + var fileSystemMock = _fileSystemMockBuilder.Build(); + + var firstTimeUseNoticeSentinel = + new FirstTimeUseNoticeSentinel( + DOTNET_USER_PROFILE_FOLDER_PATH, + fileSystemMock.File, + fileSystemMock.Directory); + + firstTimeUseNoticeSentinel.Exists().Should().BeFalse(); + } + + [Fact] + public void ItCreatesTheSentinelInTheDotnetUserProfileFolderPathIfItDoesNotExistAlready() + { + var fileSystemMock = _fileSystemMockBuilder.Build(); + var firstTimeUseNoticeSentinel = + new FirstTimeUseNoticeSentinel( + DOTNET_USER_PROFILE_FOLDER_PATH, + fileSystemMock.File, + fileSystemMock.Directory); + + firstTimeUseNoticeSentinel.Exists().Should().BeFalse(); + + firstTimeUseNoticeSentinel.CreateIfNotExists(); + + firstTimeUseNoticeSentinel.Exists().Should().BeTrue(); + } + + [Fact] + public void ItDoesNotCreateTheSentinelAgainIfItAlreadyExistsInTheDotnetUserProfileFolderPath() + { + const string contentToValidateSentinalWasNotReplaced = "some string"; + var sentinel = Path.Combine(DOTNET_USER_PROFILE_FOLDER_PATH, FirstTimeUseNoticeSentinel.SENTINEL); + _fileSystemMockBuilder.AddFile(sentinel, contentToValidateSentinalWasNotReplaced); + + var fileSystemMock = _fileSystemMockBuilder.Build(); + + var firstTimeUseNoticeSentinel = + new FirstTimeUseNoticeSentinel( + DOTNET_USER_PROFILE_FOLDER_PATH, + fileSystemMock.File, + fileSystemMock.Directory); + + firstTimeUseNoticeSentinel.Exists().Should().BeTrue(); + + firstTimeUseNoticeSentinel.CreateIfNotExists(); + + fileSystemMock.File.ReadAllText(sentinel).Should().Be(contentToValidateSentinalWasNotReplaced); + } + + [Fact] + public void ItCreatesTheDotnetUserProfileFolderIfItDoesNotExistAlreadyWhenCreatingTheSentinel() + { + var fileSystemMock = _fileSystemMockBuilder.Build(); + var directoryMock = new DirectoryMock(); + var firstTimeUseNoticeSentinel = + new FirstTimeUseNoticeSentinel( + DOTNET_USER_PROFILE_FOLDER_PATH, + fileSystemMock.File, + directoryMock); + + firstTimeUseNoticeSentinel.CreateIfNotExists(); + + directoryMock.Exists(DOTNET_USER_PROFILE_FOLDER_PATH).Should().BeTrue(); + directoryMock.CreateDirectoryInvoked.Should().BeTrue(); + } + + [Fact] + public void ItDoesNotAttemptToCreateTheDotnetUserProfileFolderIfItAlreadyExistsWhenCreatingTheSentinel() + { + var fileSystemMock = _fileSystemMockBuilder.Build(); + var directoryMock = new DirectoryMock(new List { DOTNET_USER_PROFILE_FOLDER_PATH }); + var firstTimeUseNoticeSentinel = + new FirstTimeUseNoticeSentinel( + DOTNET_USER_PROFILE_FOLDER_PATH, + fileSystemMock.File, + directoryMock); + + firstTimeUseNoticeSentinel.CreateIfNotExists(); + + directoryMock.CreateDirectoryInvoked.Should().BeFalse(); + } + + private class DirectoryMock : IDirectory + { + private IList _directories; + + public bool CreateDirectoryInvoked { get; set; } + + public DirectoryMock(IList directories = null) + { + _directories = directories ?? new List(); + } + + public bool Exists(string path) + { + return _directories.Any(d => d == path); + } + + public ITemporaryDirectory CreateTemporaryDirectory() + { + throw new NotImplementedException(); + } + + public IEnumerable GetFiles(string path, string searchPattern) + { + throw new NotImplementedException(); + } + + public string GetDirectoryFullName(string path) + { + throw new NotImplementedException(); + } + + public void CreateDirectory(string path) + { + _directories.Add(path); + CreateDirectoryInvoked = true; + } + } + } +} \ No newline at end of file diff --git a/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs b/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs index d6dc5a530..febd7a9b3 100644 --- a/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs +++ b/test/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs @@ -82,7 +82,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests .WithWorkingDirectory(testInstance.Root) .ExecuteWithCapturedOutput("--no-restore") .Should().Fail() - .And.HaveStdOutContaining("project.assets.json' not found.");; + .And.HaveStdOutContaining("project.assets.json"); } [Fact] diff --git a/test/dotnet-pack.Tests/PackTests.cs b/test/dotnet-pack.Tests/PackTests.cs index cceb09ec1..32b940a45 100644 --- a/test/dotnet-pack.Tests/PackTests.cs +++ b/test/dotnet-pack.Tests/PackTests.cs @@ -197,7 +197,7 @@ namespace Microsoft.DotNet.Tools.Pack.Tests .WithWorkingDirectory(testInstance.Root) .ExecuteWithCapturedOutput("--no-restore") .Should().Fail() - .And.HaveStdOutContaining("project.assets.json' not found.");; + .And.HaveStdOutContaining("project.assets.json"); } [Fact] diff --git a/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs b/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs index ddad9808c..2db2018fa 100644 --- a/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs +++ b/test/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs @@ -92,7 +92,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests .WithWorkingDirectory(testProjectDirectory) .ExecuteWithCapturedOutput("--framework netcoreapp2.0 --no-restore") .Should().Fail() - .And.HaveStdOutContaining("project.assets.json' not found.");; + .And.HaveStdOutContaining("project.assets.json"); } [Fact] diff --git a/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs b/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs index 88cc49dcf..36a0d3fde 100644 --- a/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs +++ b/test/dotnet-run.Tests/GivenDotnetRunRunsCsProj.cs @@ -87,7 +87,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests .WithWorkingDirectory(testProjectDirectory) .ExecuteWithCapturedOutput("--no-restore") .Should().Fail() - .And.HaveStdOutContaining("project.assets.json' not found.");; + .And.HaveStdOutContaining("project.assets.json"); } [Fact] diff --git a/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs b/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs index 8345159fe..807688463 100644 --- a/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs +++ b/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs @@ -73,7 +73,7 @@ namespace Microsoft.DotNet.Cli.Test.Tests .WithWorkingDirectory(testProjectDirectory) .ExecuteWithCapturedOutput($"{TestBase.ConsoleLoggerOutputNormal} --no-restore") .Should().Fail() - .And.HaveStdOutContaining("project.assets.json' not found.");; + .And.HaveStdOutContaining("project.assets.json"); } [Fact]