diff --git a/build/Microsoft.DotNet.Cli.BuildDefaults.props b/build/Microsoft.DotNet.Cli.BuildDefaults.props
index 1bd2a7960..e04468c6f 100644
--- a/build/Microsoft.DotNet.Cli.BuildDefaults.props
+++ b/build/Microsoft.DotNet.Cli.BuildDefaults.props
@@ -2,5 +2,8 @@
Prepare;Compile;Test;Package;Publish
Debug
+ true
+ true
+ false
diff --git a/build/Microsoft.DotNet.Cli.Package.targets b/build/Microsoft.DotNet.Cli.Package.targets
index d930228db..2ff1ac420 100644
--- a/build/Microsoft.DotNet.Cli.Package.targets
+++ b/build/Microsoft.DotNet.Cli.Package.targets
@@ -7,7 +7,8 @@
-
-
+
preview
1.0.3
1.0.1
@@ -61,7 +61,7 @@
- https://dotnetcli.azureedge.net/dotnet/
+ https://dotnetcli.azureedge.net/dotnet/
$(CoreSetupBlobRootUrl)$(CoreSetupChannel)
$(CoreSetupBlobRootUrlWithChannel)/Binaries/$(SharedFrameworkVersion)
$(CoreSetupBlobRootUrlWithChannel)/Installers
@@ -78,21 +78,21 @@
<_DownloadAndExtractItem Include="DownloadedSharedFrameworkInstallerFile"
- Condition="!Exists('$(DownloadedSharedFrameworkInstallerFile)') And '$(InstallerExtension)' != ''">
+ Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedSharedFrameworkInstallerFile)') And '$(InstallerExtension)' != ''">
$(CoreSetupInstallerBlobRootUrl)/$(SharedFrameworkVersion)/$(DownloadedSharedFrameworkInstallerFileName)
$(DownloadedSharedFrameworkInstallerFile)
<_DownloadAndExtractItem Include="DownloadedSharedHostInstallerFile"
- Condition="!Exists('$(DownloadedSharedHostInstallerFile)') And '$(InstallerExtension)' != ''">
+ Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedSharedHostInstallerFile)') And '$(InstallerExtension)' != ''">
$(CoreSetupInstallerBlobRootUrl)/$(SharedHostVersion)/$(DownloadedSharedHostInstallerFileName)
$(DownloadedSharedHostInstallerFile)
<_DownloadAndExtractItem Include="DownloadedHostFxrInstallerFile"
- Condition="!Exists('$(DownloadedHostFxrInstallerFile)') And '$(InstallerExtension)' != ''">
+ Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedHostFxrInstallerFile)') And '$(InstallerExtension)' != ''">
$(CoreSetupInstallerBlobRootUrl)/$(HostFxrVersion)/$(DownloadedHostFxrInstallerFileName)
$(DownloadedHostFxrInstallerFile)
@@ -100,7 +100,7 @@
-
+
$(CoreSetupBlobRootUrl)$(AdditionalCoreSetupChannel)
$(AdditionalCoreSetupBlobRootUrlWithChannel)/Binaries/$(AdditionalSharedFrameworkVersion)
$(AdditionalCoreSetupBlobRootUrlWithChannel)/Installers
@@ -108,7 +108,7 @@
$(AdditionalCoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive
-
+
<_DownloadAndExtractItem Include="AdditionalCombinedSharedHostAndFrameworkArchive"
Condition="!Exists('$(AdditionalCombinedSharedHostAndFrameworkArchive)')">
$(AdditionalSharedFrameworkArchiveBlobRootUrl)/$(AdditionalCombinedFrameworkHostCompressedFileName)
@@ -119,21 +119,21 @@
<_DownloadAndExtractItem Include="AdditionalDownloadedSharedFrameworkInstallerFile"
- Condition="!Exists('$(AdditionalDownloadedSharedFrameworkInstallerFile)') And '$(InstallerExtension)' != ''">
+ Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(AdditionalDownloadedSharedFrameworkInstallerFile)') And '$(InstallerExtension)' != ''">
$(AdditionalCoreSetupInstallerBlobRootUrl)/$(AdditionalSharedFrameworkVersion)/$(AdditionalDownloadedSharedFrameworkInstallerFileName)
$(AdditionalDownloadedSharedFrameworkInstallerFile)
<_DownloadAndExtractItem Include="AdditionalDownloadedSharedHostInstallerFile"
- Condition="!Exists('$(AdditionalDownloadedSharedHostInstallerFile)') And '$(InstallerExtension)' != ''">
+ Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(AdditionalDownloadedSharedHostInstallerFile)') And '$(InstallerExtension)' != ''">
$(AdditionalCoreSetupInstallerBlobRootUrl)/$(AdditionalSharedHostVersion)/$(AdditionalDownloadedSharedHostInstallerFileName)
$(AdditionalDownloadedSharedHostInstallerFile)
<_DownloadAndExtractItem Include="AdditionalDownloadedHostFxrInstallerFile"
- Condition="!Exists('$(AdditionalDownloadedHostFxrInstallerFile)') And '$(InstallerExtension)' != ''">
+ Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(AdditionalDownloadedHostFxrInstallerFile)') And '$(InstallerExtension)' != ''">
$(AdditionalCoreSetupInstallerBlobRootUrl)/$(AdditionalHostFxrVersion)/$(AdditionalDownloadedHostFxrInstallerFileName)
$(AdditionalDownloadedHostFxrInstallerFile)
diff --git a/build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets b/build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets
index 03f45d35d..c90b117b6 100644
--- a/build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets
+++ b/build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets
@@ -6,7 +6,8 @@
GenerateNuGetPackagesArchive;
UploadNuGetPackagesArchiveToAzure"
Inputs="$(IntermediateArchive)"
- Outputs="$(FinalArchive)">
+ Outputs="$(FinalArchive)"
+ Condition=" '$(IncludeNuGetPackageArchive)' == 'true' ">
@@ -123,4 +124,4 @@
$(DotnetBlobRootUrl)/$(NugetPackagesArchiveRelativeBlobUrl)/$(NugetPackagesArchiveName)
-
\ No newline at end of file
+
diff --git a/build/package/Microsoft.DotNet.Cli.Archive.targets b/build/package/Microsoft.DotNet.Cli.Archive.targets
index ac24fe8c2..0148abe18 100644
--- a/build/package/Microsoft.DotNet.Cli.Archive.targets
+++ b/build/package/Microsoft.DotNet.Cli.Archive.targets
@@ -15,12 +15,14 @@
+ DestinationArchive="$(GenerateArchivesDestinationArchive)"
+ OverwriteDestination="true"/>
+ DestinationArchive="$(GenerateArchivesDestinationArchive)"
+ OverwriteDestination="true"/>
diff --git a/build_projects/dotnet-cli-build/DownloadFile.cs b/build_projects/dotnet-cli-build/DownloadFile.cs
index f207a75bf..16141e5da 100644
--- a/build_projects/dotnet-cli-build/DownloadFile.cs
+++ b/build_projects/dotnet-cli-build/DownloadFile.cs
@@ -28,23 +28,34 @@ namespace Microsoft.DotNet.Cli.Build
return true;
}
- Log.LogMessage($"Downloading '{Uri}' to '{DestinationPath}'");
+ const string FileUriProtocol = "file://";
- using (var httpClient = new HttpClient())
+ if (Uri.StartsWith(FileUriProtocol, StringComparison.Ordinal))
{
- var getTask = httpClient.GetStreamAsync(Uri);
+ var filePath = Uri.Substring(FileUriProtocol.Length);
+ Log.LogMessage($"Copying '{filePath}' to '{DestinationPath}'");
+ File.Copy(filePath, DestinationPath);
+ }
+ else
+ {
+ Log.LogMessage($"Downloading '{Uri}' to '{DestinationPath}'");
- try
+ using (var httpClient = new HttpClient())
{
- using (var outStream = File.Create(DestinationPath))
+ var getTask = httpClient.GetStreamAsync(Uri);
+
+ try
{
- getTask.Result.CopyTo(outStream);
+ using (var outStream = File.Create(DestinationPath))
+ {
+ getTask.Result.CopyTo(outStream);
+ }
+ }
+ catch (Exception)
+ {
+ File.Delete(DestinationPath);
+ throw;
}
- }
- catch (Exception)
- {
- File.Delete(DestinationPath);
- throw;
}
}