Publish Microsoft.Dotnet.Build.Bundle package (dotnet/core-setup#5537)
authorSwaroop Sridhar <Swaroop.Sridhar@microsoft.com>
Sat, 23 Mar 2019 00:42:24 +0000 (17:42 -0700)
committerGitHub <noreply@github.com>
Sat, 23 Mar 2019 00:42:24 +0000 (17:42 -0700)
This change publishes the Bundle tool as a package for consumption in the toolset/sdk repos.

The changes are:

Enable package publishing for the Bundler
Add a property in sdk.props so help find the tool easily from the MSBuild tooling
(similar to https://github.com/mono/linker/pull/487/files)

Commit migrated from https://github.com/dotnet/core-setup/commit/dfe2a49a40ebde28481454573f4d8a8c460a0b6b

src/installer/managed/CommonManaged.props
src/installer/managed/Microsoft.DotNet.Build.Bundle/FileEntry.cs
src/installer/managed/Microsoft.DotNet.Build.Bundle/Microsoft.DotNet.Build.Bundle.csproj
src/installer/managed/Microsoft.DotNet.Build.Bundle/Sdk.props [new file with mode: 0644]
src/installer/pkg/packaging/dir.proj

index dd6366f..15bab0c 100644 (file)
@@ -24,7 +24,7 @@
     <PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
   </PropertyGroup>
 
-  <PropertyGroup Condition=" '$(TargetFramework)' != 'netstandard2.0' ">
+  <PropertyGroup Condition=" '$(TargetFramework)' != 'netstandard2.0' And '$(TargetFramework)' != 'netcoreapp2.0' ">
     <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
   </PropertyGroup>
 
@@ -51,4 +51,4 @@
   </ItemGroup>
 
   <Import Condition="Exists('$(ToolsDir)versioning.props')" Project="$(ToolsDir)versioning.props" />
-</Project>
\ No newline at end of file
+</Project>
index 15b79a6..4d9c8ae 100644 (file)
@@ -14,7 +14,7 @@ namespace Microsoft.DotNet.Build.Bundle
     /// file embedded in the bundle:
     /// * Type       (1 byte)
     /// * NameLength (7-bit extension encoding, typically 1 byte)
-    /// * Name       (<NameLength> Bytes)
+    /// * Name       ("NameLength" Bytes)
     /// * Offset     (Int64)
     /// * Size       (Int64)
     /// </summary>
index 2884eaa..a0909ed 100644 (file)
@@ -1,9 +1,20 @@
 <Project Sdk="Microsoft.NET.Sdk">
+
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.0</TargetFramework>
+    <Description>.Net Core Single File Bundler</Description>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
-    <DefineConstants>DEBUG</DefineConstants>
-  </PropertyGroup>
+
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), CommonManaged.props))\CommonManaged.props" />
+
+  <ItemGroup>
+    <Content Include="Sdk.props">
+      <Pack>true</Pack>
+      <PackagePath>Sdk</PackagePath>
+    </Content>
+  </ItemGroup>
+
 </Project>
+
+
diff --git a/src/installer/managed/Microsoft.DotNet.Build.Bundle/Sdk.props b/src/installer/managed/Microsoft.DotNet.Build.Bundle/Sdk.props
new file mode 100644 (file)
index 0000000..b109666
--- /dev/null
@@ -0,0 +1,18 @@
+<!--
+***********************************************************************************************
+Sdk.props
+
+WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
+          created a backup copy.  Incorrect changes to this file will make it
+          impossible to load or build your projects from the command-line or the IDE.
+
+Copyright (c) .NET Foundation. All rights reserved.
+***********************************************************************************************
+-->
+<Project ToolsVersion="14.0">
+
+  <PropertyGroup>
+    <MicrosoftDotnetBundle>$(MSBuildThisFileDirectory)..\lib\netcoreapp2.0\Microsoft.DotNet.Build.Bundle.dll</MicrosoftDotnetBundle>
+  </PropertyGroup>
+
+</Project>
\ No newline at end of file
index 6141233..abb8040 100644 (file)
       <!-- The list of packages we are servicing -->
       <PackageProjects Include="$(ProjectDir)src\managed\Microsoft.DotNet.PlatformAbstractions\Microsoft.DotNet.PlatformAbstractions.csproj" />
       <PackageProjects Include="$(ProjectDir)src\managed\Microsoft.Extensions.DependencyModel\Microsoft.Extensions.DependencyModel.csproj" />
+      <PackageProjects Include="$(ProjectDir)src\managed\Microsoft.DotNet.Build.Bundle\Microsoft.DotNet.Build.Bundle.csproj" />
     </ItemGroup>
 
     <ItemGroup Condition="'$(BuildAllPackages)' == 'true'">