Merge pull request #7008 from dotnet/merges/release/2.0.0-to-master-20170627-070029
Merge release/2.0.0 to master
This commit is contained in:
commit
55198d7199
16 changed files with 239 additions and 26 deletions
|
@ -4,6 +4,7 @@
|
||||||
<!--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="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="preview2-verification-feed" value="https://dotnet.myget.org/F/dotnet-2-0-0-preview2-final/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-final" value="https://dotnet.myget.org/F/aspnetcore-2-0-0-preview1-no-timestamp/api/v3/index.json" />
|
<add key="aspnet-final" value="https://dotnet.myget.org/F/aspnetcore-2-0-0-preview1-no-timestamp/api/v3/index.json" />
|
||||||
<add key="aspnet-release" value="https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json" />
|
<add key="aspnet-release" value="https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json" />
|
||||||
|
|
10
README.md
10
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?
|
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.
|
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]: 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
|
[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]: 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/release/2.0.0/dotnet-sdk-latest-debian-x64.deb.sha
|
[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]: 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/release/2.0.0/dotnet-sdk-latest-rhel-x64.rpm.sha
|
[rhel-7-installer-checksum]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-rhel-x64.rpm.sha
|
||||||
|
|
||||||
# Debian daily feed
|
# Debian daily feed
|
||||||
|
|
||||||
|
|
|
@ -22,12 +22,14 @@
|
||||||
<ArtifactNameSdk>dotnet-sdk-internal</ArtifactNameSdk>
|
<ArtifactNameSdk>dotnet-sdk-internal</ArtifactNameSdk>
|
||||||
<ArtifactNameSdkDebug>dotnet-sdk-debug</ArtifactNameSdkDebug>
|
<ArtifactNameSdkDebug>dotnet-sdk-debug</ArtifactNameSdkDebug>
|
||||||
<ArtifactNameCombinedHostHostFxrFrameworkSdk>dotnet-sdk</ArtifactNameCombinedHostHostFxrFrameworkSdk>
|
<ArtifactNameCombinedHostHostFxrFrameworkSdk>dotnet-sdk</ArtifactNameCombinedHostHostFxrFrameworkSdk>
|
||||||
|
<ArtifactNameSdkLanguagePack>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-langpack</ArtifactNameSdkLanguagePack>
|
||||||
|
|
||||||
<ArtifactNameWithVersionSdk>$(ArtifactNameSdk)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdk>
|
<ArtifactNameWithVersionSdk>$(ArtifactNameSdk)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdk>
|
||||||
|
|
||||||
|
|
||||||
<ArtifactNameWithVersionSdkDebug>$(ArtifactNameSdkDebug)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdkDebug>
|
<ArtifactNameWithVersionSdkDebug>$(ArtifactNameSdkDebug)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdkDebug>
|
||||||
<ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
|
<ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
|
||||||
|
<ArtifactNameWithVersionSdkLanguagePack>$(ArtifactNameSdkLanguagePack)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdkLanguagePack>
|
||||||
<DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(HostMonikerRid)</DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
|
<DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(HostMonikerRid)</DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<CLI_SharedFrameworkVersion>2.0.0-preview3-25419-01</CLI_SharedFrameworkVersion>
|
<CLI_SharedFrameworkVersion>2.0.0-preview3-25426-01</CLI_SharedFrameworkVersion>
|
||||||
<CLI_MSBuild_Version>15.3.0-preview-000400-01</CLI_MSBuild_Version>
|
<CLI_MSBuild_Version>15.3.0-preview-000400-01</CLI_MSBuild_Version>
|
||||||
<CLI_Roslyn_Version>2.3.0-beta3-61816-04</CLI_Roslyn_Version>
|
<CLI_Roslyn_Version>2.3.0-beta3-61816-04</CLI_Roslyn_Version>
|
||||||
|
<CLI_Roslyn_Satellites_Version>2.3.0-pre-20170624-6</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-rc-170602-0</CLI_FSharp_Version>
|
<CLI_FSharp_Version>4.2.0-rc-170621-0</CLI_FSharp_Version>
|
||||||
|
<CLI_FSharp_Satellites_Version>4.4.1-pre-20170624-6</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
|
||||||
|
@ -20,22 +22,22 @@
|
||||||
<SharedFrameworkVersion>$(CLI_SharedFrameworkVersion)</SharedFrameworkVersion>
|
<SharedFrameworkVersion>$(CLI_SharedFrameworkVersion)</SharedFrameworkVersion>
|
||||||
<SharedHostVersion>$(CLI_SharedFrameworkVersion)</SharedHostVersion>
|
<SharedHostVersion>$(CLI_SharedFrameworkVersion)</SharedHostVersion>
|
||||||
<HostFxrVersion>$(CLI_SharedFrameworkVersion)</HostFxrVersion>
|
<HostFxrVersion>$(CLI_SharedFrameworkVersion)</HostFxrVersion>
|
||||||
<TemplateEngineVersion>1.0.0-beta2-20170608-254</TemplateEngineVersion>
|
<TemplateEngineVersion>1.0.0-beta2-20170614-260</TemplateEngineVersion>
|
||||||
<TemplateEngineTemplateVersion>1.0.0-beta2-20170612-258</TemplateEngineTemplateVersion>
|
<TemplateEngineTemplateVersion>1.0.0-beta2-20170620-266</TemplateEngineTemplateVersion>
|
||||||
<TemplateEngineTemplate2_0Version>1.0.0-beta2-20170612-258</TemplateEngineTemplate2_0Version>
|
<TemplateEngineTemplate2_0Version>1.0.0-beta2-20170620-266</TemplateEngineTemplate2_0Version>
|
||||||
<PlatformAbstractionsVersion>2.0.0-preview3-25419-01</PlatformAbstractionsVersion>
|
<PlatformAbstractionsVersion>2.0.0-preview3-25426-01</PlatformAbstractionsVersion>
|
||||||
<DependencyModelVersion>2.0.0-preview3-25419-01</DependencyModelVersion>
|
<DependencyModelVersion>2.0.0-preview3-25426-01</DependencyModelVersion>
|
||||||
<CliCommandLineParserVersion>0.1.0-alpha-142</CliCommandLineParserVersion>
|
<CliCommandLineParserVersion>0.1.0-alpha-142</CliCommandLineParserVersion>
|
||||||
<CliMigrateVersion>1.2.1-alpha-002133</CliMigrateVersion>
|
<CliMigrateVersion>1.2.1-alpha-002133</CliMigrateVersion>
|
||||||
<MicroBuildVersion>0.2.0</MicroBuildVersion>
|
<MicroBuildVersion>0.2.0</MicroBuildVersion>
|
||||||
<SpaTemplateVersion>1.0.0-preview-000297</SpaTemplateVersion>
|
<SpaTemplateVersion>1.0.0-preview-000321</SpaTemplateVersion>
|
||||||
<XliffTasksVersion>0.2.0-beta-000042</XliffTasksVersion>
|
<XliffTasksVersion>0.2.0-beta-000042</XliffTasksVersion>
|
||||||
|
|
||||||
<!-- This should either be timestamped or notimestamp as appropriate -->
|
<!-- This should either be timestamped or notimestamp as appropriate -->
|
||||||
<AspNetCoreRuntimePackageFlavor>timestamped</AspNetCoreRuntimePackageFlavor>
|
<AspNetCoreRuntimePackageFlavor>notimestamp</AspNetCoreRuntimePackageFlavor>
|
||||||
<AspNetCoreRuntimeVersion>2.0.0-preview2-186</AspNetCoreRuntimeVersion>
|
<AspNetCoreRuntimeVersion>2.0.0-preview2-215</AspNetCoreRuntimeVersion>
|
||||||
<AspNetCoherenceLabel>preview2</AspNetCoherenceLabel>
|
<AspNetCoherenceLabel>preview2</AspNetCoherenceLabel>
|
||||||
<AspNetCoreCoherenceTimestamp>25661</AspNetCoreCoherenceTimestamp>
|
<AspNetCoreCoherenceTimestamp>25794</AspNetCoreCoherenceTimestamp>
|
||||||
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
@ -20,13 +20,15 @@
|
||||||
Condition=" '$(OSName)' == 'win' "
|
Condition=" '$(OSName)' == 'win' "
|
||||||
SourceDirectory="%(GenerateArchivesInputsOutputs.InputDirectory)"
|
SourceDirectory="%(GenerateArchivesInputsOutputs.InputDirectory)"
|
||||||
DestinationArchive="$(GenerateArchivesDestinationArchive)"
|
DestinationArchive="$(GenerateArchivesDestinationArchive)"
|
||||||
OverwriteDestination="true"/>
|
OverwriteDestination="true"
|
||||||
|
ExcludePatterns="%(GenerateArchivesInputsOutputs.ExcludePatterns)" />
|
||||||
|
|
||||||
<TarGzFileCreateFromDirectory
|
<TarGzFileCreateFromDirectory
|
||||||
Condition=" '$(OSName)' != 'win' "
|
Condition=" '$(OSName)' != 'win' "
|
||||||
SourceDirectory="%(GenerateArchivesInputsOutputs.InputDirectory)"
|
SourceDirectory="%(GenerateArchivesInputsOutputs.InputDirectory)"
|
||||||
DestinationArchive="$(GenerateArchivesDestinationArchive)"
|
DestinationArchive="$(GenerateArchivesDestinationArchive)"
|
||||||
OverwriteDestination="true"/>
|
OverwriteDestination="true"
|
||||||
|
ExcludePatterns="%(GenerateArchivesInputsOutputs.ExcludePatterns)" />
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Archives Include="$(GenerateArchivesDestinationArchive)" />
|
<Archives Include="$(GenerateArchivesDestinationArchive)" />
|
||||||
|
@ -42,6 +44,7 @@
|
||||||
<Outputs>$(ArchiveOutputDirectory)/%(LayoutDefinition.NameWithVersion)$(ArchiveExtension)</Outputs>
|
<Outputs>$(ArchiveOutputDirectory)/%(LayoutDefinition.NameWithVersion)$(ArchiveExtension)</Outputs>
|
||||||
<InputDirectory>$(LayoutDirectory)/%(LayoutDefinition.Name)</InputDirectory>
|
<InputDirectory>$(LayoutDirectory)/%(LayoutDefinition.Name)</InputDirectory>
|
||||||
<OutFileName>%(LayoutDefinition.NameWithVersion)</OutFileName>
|
<OutFileName>%(LayoutDefinition.NameWithVersion)</OutFileName>
|
||||||
|
<ExcludePatterns>%(LayoutDefinition.ExcludePatterns)</ExcludePatterns>
|
||||||
</GenerateArchivesInputsOutputs>
|
</GenerateArchivesInputsOutputs>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<SdkDebugLayoutOutputDirectory>$(LayoutDirectory)/$(ArtifactNameSdkDebug)</SdkDebugLayoutOutputDirectory>
|
<SdkDebugLayoutOutputDirectory>$(LayoutDirectory)/$(ArtifactNameSdkDebug)</SdkDebugLayoutOutputDirectory>
|
||||||
<CombinedHostHostFxrFrameworkSdkOutputDirectory>$(LayoutDirectory)/$(ArtifactNameCombinedHostHostFxrFrameworkSdk)</CombinedHostHostFxrFrameworkSdkOutputDirectory>
|
<CombinedHostHostFxrFrameworkSdkOutputDirectory>$(LayoutDirectory)/$(ArtifactNameCombinedHostHostFxrFrameworkSdk)</CombinedHostHostFxrFrameworkSdkOutputDirectory>
|
||||||
|
<SdkLanguagePackOutputDirectory>$(LayoutDirectory)/$(ArtifactNameSdkLanguagePack)</SdkLanguagePackOutputDirectory>
|
||||||
|
<SatelliteAssemblies>*.resources.dll</SatelliteAssemblies>
|
||||||
|
<WindowsSatelliteAssembliesRegEx>.*.resources.dll</WindowsSatelliteAssembliesRegEx>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Target DependsOnTargets="Init" Name="SetupLayoutInputsOutputs" >
|
<Target DependsOnTargets="Init" Name="SetupLayoutInputsOutputs" >
|
||||||
|
@ -11,6 +14,7 @@
|
||||||
<SdkLayoutInput Include="$(OutputDirectory)/sdk/**/*" />
|
<SdkLayoutInput Include="$(OutputDirectory)/sdk/**/*" />
|
||||||
<SdkDebugLayoutInput Include="$(SymbolsDirectory)/sdk/**/*" />
|
<SdkDebugLayoutInput Include="$(SymbolsDirectory)/sdk/**/*" />
|
||||||
<CombinedHostHostFxrFrameworkSdkInput Include="$(OutputDirectory)/**/*" />
|
<CombinedHostHostFxrFrameworkSdkInput Include="$(OutputDirectory)/**/*" />
|
||||||
|
<SdkLanguagePackInput Include="$(OutputDirectory)/sdk/**/$(SatelliteAssemblies)" />
|
||||||
|
|
||||||
<AspNetRuntimeFilesInput Include="$(AspNetRuntimePackageStorePublishDirectory)/**/*" />
|
<AspNetRuntimeFilesInput Include="$(AspNetRuntimePackageStorePublishDirectory)/**/*" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -30,6 +34,11 @@
|
||||||
Path2="%(CombinedHostHostFxrFrameworkSdkInput.Identity)" >
|
Path2="%(CombinedHostHostFxrFrameworkSdkInput.Identity)" >
|
||||||
<Output TaskParameter="RelativePath" ItemName="CombinedHostHostFxrFrameworkSdkRelativeOutputFiles" />
|
<Output TaskParameter="RelativePath" ItemName="CombinedHostHostFxrFrameworkSdkRelativeOutputFiles" />
|
||||||
</MakeRelative>
|
</MakeRelative>
|
||||||
|
<MakeRelative
|
||||||
|
Path1="$(OutputDirectory)/"
|
||||||
|
Path2="%(SdkLanguagePackInput.Identity)" >
|
||||||
|
<Output TaskParameter="RelativePath" ItemName="SdkLanguagePackRelativeOutputFiles" />
|
||||||
|
</MakeRelative>
|
||||||
|
|
||||||
<!-- Set up Items Defining Layouts for easy change -->
|
<!-- Set up Items Defining Layouts for easy change -->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -52,6 +61,15 @@
|
||||||
<OutputFiles>@(CombinedHostHostFxrFrameworkSdkRelativeOutputFiles -> '$(CombinedHostHostFxrFrameworkSdkOutputDirectory)/%(Identity)')</OutputFiles>
|
<OutputFiles>@(CombinedHostHostFxrFrameworkSdkRelativeOutputFiles -> '$(CombinedHostHostFxrFrameworkSdkOutputDirectory)/%(Identity)')</OutputFiles>
|
||||||
<NameWithVersion>$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)</NameWithVersion>
|
<NameWithVersion>$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)</NameWithVersion>
|
||||||
<Name>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)</Name>
|
<Name>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)</Name>
|
||||||
|
<ExcludePatterns Condition=" '$(OSName)' == 'win' ">$(WindowsSatelliteAssembliesRegEx)</ExcludePatterns>
|
||||||
|
<ExcludePatterns Condition=" '$(OSName)' != 'win' ">$(SatelliteAssemblies)</ExcludePatterns>
|
||||||
|
</LayoutDefinition>
|
||||||
|
|
||||||
|
<LayoutDefinition Include="SdkLanguagePack">
|
||||||
|
<InputFiles>@(SdkLanguagePackInput)</InputFiles>
|
||||||
|
<OutputFiles>@(SdkLanguagePackRelativeOutputFiles -> '$(SdkLanguagePackOutputDirectory)/%(Identity)')</OutputFiles>
|
||||||
|
<NameWithVersion>$(ArtifactNameWithVersionSdkLanguagePack)</NameWithVersion>
|
||||||
|
<Name>$(ArtifactNameSdkLanguagePack)</Name>
|
||||||
</LayoutDefinition>
|
</LayoutDefinition>
|
||||||
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
2
scripts/obtain/dotnet-install.sh
vendored
2
scripts/obtain/dotnet-install.sh
vendored
|
@ -346,7 +346,7 @@ get_latest_version_info() {
|
||||||
version_file_url="$uncached_feed/Runtime/$channel/latest.version"
|
version_file_url="$uncached_feed/Runtime/$channel/latest.version"
|
||||||
else
|
else
|
||||||
if [ "$coherent" = true ]; then
|
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
|
else
|
||||||
version_file_url="$uncached_feed/Sdk/$channel/latest.version"
|
version_file_url="$uncached_feed/Sdk/$channel/latest.version"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -13,19 +13,24 @@ namespace Microsoft.DotNet.Configurer
|
||||||
public static readonly string SENTINEL = $"{Product.Version}.dotnetFirstUseSentinel";
|
public static readonly string SENTINEL = $"{Product.Version}.dotnetFirstUseSentinel";
|
||||||
|
|
||||||
private readonly IFile _file;
|
private readonly IFile _file;
|
||||||
|
private readonly IDirectory _directory;
|
||||||
|
|
||||||
private string _dotnetUserProfileFolderPath;
|
private string _dotnetUserProfileFolderPath;
|
||||||
|
|
||||||
private string SentinelPath => Path.Combine(_dotnetUserProfileFolderPath, SENTINEL);
|
private string SentinelPath => Path.Combine(_dotnetUserProfileFolderPath, SENTINEL);
|
||||||
|
|
||||||
public FirstTimeUseNoticeSentinel(CliFallbackFolderPathCalculator cliFallbackFolderPathCalculator) :
|
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;
|
_file = file;
|
||||||
|
_directory = directory;
|
||||||
_dotnetUserProfileFolderPath = dotnetUserProfileFolderPath;
|
_dotnetUserProfileFolderPath = dotnetUserProfileFolderPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +43,11 @@ namespace Microsoft.DotNet.Configurer
|
||||||
{
|
{
|
||||||
if (!Exists())
|
if (!Exists())
|
||||||
{
|
{
|
||||||
|
if (!_directory.Exists(_dotnetUserProfileFolderPath))
|
||||||
|
{
|
||||||
|
_directory.CreateDirectory(_dotnetUserProfileFolderPath);
|
||||||
|
}
|
||||||
|
|
||||||
_file.CreateEmptyFile(SentinelPath);
|
_file.CreateEmptyFile(SentinelPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NetCore.App" Version="$(CLI_SharedFrameworkVersion)" />
|
<PackageReference Include="Microsoft.NetCore.App" Version="$(CLI_SharedFrameworkVersion)" />
|
||||||
<PackageReference Include="Microsoft.FSharp.Compiler" Version="$(CLI_FSharp_Version)" />
|
<PackageReference Include="Microsoft.FSharp.Compiler" Version="$(CLI_FSharp_Version)" />
|
||||||
|
<PackageReference Include="CliDeps.Satellites.FSharp" Version="$(CLI_FSharp_Satellites_Version)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.Build.Tasks" 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.Net.Compilers.netcore" Version="$(CLI_Roslyn_Version)" />
|
||||||
<PackageReference Include="Microsoft.DiaSymReader.Native" Version="$(CLI_DiaSymNative_Version)" Condition="'$(OSName)' == 'win'" />
|
<PackageReference Include="Microsoft.DiaSymReader.Native" Version="$(CLI_DiaSymNative_Version)" Condition="'$(OSName)' == 'win'" />
|
||||||
|
<PackageReference Include="CliDeps.Satellites.Roslyn" Version="$(CLI_Roslyn_Satellites_Version)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -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<string> { 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<string> _directories;
|
||||||
|
|
||||||
|
public bool CreateDirectoryInvoked { get; set; }
|
||||||
|
|
||||||
|
public DirectoryMock(IList<string> directories = null)
|
||||||
|
{
|
||||||
|
_directories = directories ?? new List<string>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Exists(string path)
|
||||||
|
{
|
||||||
|
return _directories.Any(d => d == path);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ITemporaryDirectory CreateTemporaryDirectory()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<string> 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -82,7 +82,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests
|
||||||
.WithWorkingDirectory(testInstance.Root)
|
.WithWorkingDirectory(testInstance.Root)
|
||||||
.ExecuteWithCapturedOutput("--no-restore")
|
.ExecuteWithCapturedOutput("--no-restore")
|
||||||
.Should().Fail()
|
.Should().Fail()
|
||||||
.And.HaveStdOutContaining("project.assets.json' not found.");;
|
.And.HaveStdOutContaining("project.assets.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
|
@ -197,7 +197,7 @@ namespace Microsoft.DotNet.Tools.Pack.Tests
|
||||||
.WithWorkingDirectory(testInstance.Root)
|
.WithWorkingDirectory(testInstance.Root)
|
||||||
.ExecuteWithCapturedOutput("--no-restore")
|
.ExecuteWithCapturedOutput("--no-restore")
|
||||||
.Should().Fail()
|
.Should().Fail()
|
||||||
.And.HaveStdOutContaining("project.assets.json' not found.");;
|
.And.HaveStdOutContaining("project.assets.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
|
@ -92,7 +92,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
||||||
.WithWorkingDirectory(testProjectDirectory)
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
.ExecuteWithCapturedOutput("--framework netcoreapp2.0 --no-restore")
|
.ExecuteWithCapturedOutput("--framework netcoreapp2.0 --no-restore")
|
||||||
.Should().Fail()
|
.Should().Fail()
|
||||||
.And.HaveStdOutContaining("project.assets.json' not found.");;
|
.And.HaveStdOutContaining("project.assets.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
|
@ -87,7 +87,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests
|
||||||
.WithWorkingDirectory(testProjectDirectory)
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
.ExecuteWithCapturedOutput("--no-restore")
|
.ExecuteWithCapturedOutput("--no-restore")
|
||||||
.Should().Fail()
|
.Should().Fail()
|
||||||
.And.HaveStdOutContaining("project.assets.json' not found.");;
|
.And.HaveStdOutContaining("project.assets.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
|
@ -73,7 +73,7 @@ namespace Microsoft.DotNet.Cli.Test.Tests
|
||||||
.WithWorkingDirectory(testProjectDirectory)
|
.WithWorkingDirectory(testProjectDirectory)
|
||||||
.ExecuteWithCapturedOutput($"{TestBase.ConsoleLoggerOutputNormal} --no-restore")
|
.ExecuteWithCapturedOutput($"{TestBase.ConsoleLoggerOutputNormal} --no-restore")
|
||||||
.Should().Fail()
|
.Should().Fail()
|
||||||
.And.HaveStdOutContaining("project.assets.json' not found.");;
|
.And.HaveStdOutContaining("project.assets.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
Loading…
Reference in a new issue