Ver código fonte

Remove dependency on Internal.AspNetCore.BuildTasks (#33449)

* Remove dependency on Internal.AspNetCore.BuildTasks

* Wip

* Remove explicit reference

* Update PrepareForTest.targets

* Try again?
John Luo 4 anos atrás
pai
commit
9fd548ff70

+ 4 - 0
eng/Version.Details.xml

@@ -297,6 +297,10 @@
       <Uri>https://github.com/dotnet/arcade</Uri>
       <Uri>https://github.com/dotnet/arcade</Uri>
       <Sha>85a65ea1fca1d0867f699fed44d191358270bf6a</Sha>
       <Sha>85a65ea1fca1d0867f699fed44d191358270bf6a</Sha>
     </Dependency>
     </Dependency>
+    <Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="6.0.0-beta.21310.4">
+      <Uri>https://github.com/dotnet/arcade</Uri>
+      <Sha>a565e0c890d0a325775882542cff7e775db8f8e6</Sha>
+    </Dependency>
     <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21304.1">
     <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21304.1">
       <Uri>https://github.com/dotnet/arcade</Uri>
       <Uri>https://github.com/dotnet/arcade</Uri>
       <Sha>85a65ea1fca1d0867f699fed44d191358270bf6a</Sha>
       <Sha>85a65ea1fca1d0867f699fed44d191358270bf6a</Sha>

+ 1 - 1
eng/Versions.props

@@ -137,6 +137,7 @@
     <MicrosoftEntityFrameworkCoreDesignVersion>6.0.0-preview.6.21309.9</MicrosoftEntityFrameworkCoreDesignVersion>
     <MicrosoftEntityFrameworkCoreDesignVersion>6.0.0-preview.6.21309.9</MicrosoftEntityFrameworkCoreDesignVersion>
     <!-- Packages from dotnet/arcade -->
     <!-- Packages from dotnet/arcade -->
     <MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21304.1</MicrosoftDotNetBuildTasksInstallersVersion>
     <MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21304.1</MicrosoftDotNetBuildTasksInstallersVersion>
+    <MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.21310.4</MicrosoftDotNetBuildTasksTemplatingVersion>
   </PropertyGroup>
   </PropertyGroup>
   <!--
   <!--
 
 
@@ -160,7 +161,6 @@
     <!-- DiagnosticAdapter package pinned temporarily until migrated/deprecated -->
     <!-- DiagnosticAdapter package pinned temporarily until migrated/deprecated -->
     <MicrosoftExtensionsDiagnosticAdapterVersion>5.0.0-preview.4.20180.4</MicrosoftExtensionsDiagnosticAdapterVersion>
     <MicrosoftExtensionsDiagnosticAdapterVersion>5.0.0-preview.4.20180.4</MicrosoftExtensionsDiagnosticAdapterVersion>
     <!-- Build tool dependencies -->
     <!-- Build tool dependencies -->
-    <InternalAspNetCoreBuildTasksVersion>3.0.0-build-20190530.3</InternalAspNetCoreBuildTasksVersion>
     <MicrosoftVSSDKBuildToolsVersion>15.9.3032</MicrosoftVSSDKBuildToolsVersion>
     <MicrosoftVSSDKBuildToolsVersion>15.9.3032</MicrosoftVSSDKBuildToolsVersion>
     <!-- Stable dotnet/corefx packages no longer updated for .NET Core 3 -->
     <!-- Stable dotnet/corefx packages no longer updated for .NET Core 3 -->
     <MicrosoftCSharpVersion>4.7.0</MicrosoftCSharpVersion>
     <MicrosoftCSharpVersion>4.7.0</MicrosoftCSharpVersion>

+ 0 - 5
eng/Workarounds.targets

@@ -35,11 +35,6 @@
   <!-- Workaround https://github.com/dotnet/source-build/issues/1112. Source link is currently disabled in source build so define this dummy target which is required for pack. -->
   <!-- Workaround https://github.com/dotnet/source-build/issues/1112. Source link is currently disabled in source build so define this dummy target which is required for pack. -->
   <Import Condition="'$(DotNetBuildFromSource)' == 'true'" Project="WorkaroundsImported.targets" />
   <Import Condition="'$(DotNetBuildFromSource)' == 'true'" Project="WorkaroundsImported.targets" />
 
 
-  <!-- Workaround for https://github.com/dotnet/arcade/issues/204, not needed in source build -->
-  <ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
-    <PackageReference Include="Internal.AspNetCore.BuildTasks" PrivateAssets="All" Version="$(InternalAspNetCoreBuildTasksVersion)" IsImplicitlyDefined="true" />
-  </ItemGroup>
-
   <!-- Workaround for netstandard2.1 projects until we can get a preview 8 SDK containing https://github.com/dotnet/sdk/pull/3463 fix. -->
   <!-- Workaround for netstandard2.1 projects until we can get a preview 8 SDK containing https://github.com/dotnet/sdk/pull/3463 fix. -->
   <ItemGroup>
   <ItemGroup>
     <KnownFrameworkReference Update="NETStandard.Library">
     <KnownFrameworkReference Update="NETStandard.Library">

+ 4 - 0
eng/tools/GenerateFiles/GenerateFiles.csproj

@@ -4,6 +4,10 @@
     <TargetFramework>net5.0</TargetFramework>
     <TargetFramework>net5.0</TargetFramework>
   </PropertyGroup>
   </PropertyGroup>
 
 
+  <ItemGroup>
+    <PackageReference Include="Microsoft.DotNet.Build.Tasks.Templating" PrivateAssets="All" Version="$(MicrosoftDotNetBuildTasksTemplatingVersion)" IsImplicitlyDefined="true" />
+  </ItemGroup>
+
   <!-- Update artifacts/bin/GenerateFiles/Directory.Build.* files. -->
   <!-- Update artifacts/bin/GenerateFiles/Directory.Build.* files. -->
   <Target Name="GenerateDirectoryBuildFiles">
   <Target Name="GenerateDirectoryBuildFiles">
     <PropertyGroup>
     <PropertyGroup>

+ 2 - 0
src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj

@@ -21,6 +21,8 @@
   <ItemGroup>
   <ItemGroup>
     <Reference Include="Microsoft.AspNetCore" />
     <Reference Include="Microsoft.AspNetCore" />
     <Reference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" />
     <Reference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" />
+
+    <PackageReference Include="Microsoft.DotNet.Build.Tasks.Templating" PrivateAssets="All" Version="$(MicrosoftDotNetBuildTasksTemplatingVersion)" IsImplicitlyDefined="true" AllowExplicitReference="true" />
   </ItemGroup>
   </ItemGroup>
 
 
   <!--  We include this here to ensure that the shared framework is built before we leverage it when running
   <!--  We include this here to ensure that the shared framework is built before we leverage it when running

+ 4 - 0
src/Installers/Debian/Directory.Build.targets

@@ -11,6 +11,10 @@
     </DebBuildDependsOn>
     </DebBuildDependsOn>
   </PropertyGroup>
   </PropertyGroup>
 
 
+  <ItemGroup>
+    <PackageReference Include="Microsoft.DotNet.Build.Tasks.Templating" Version="$(MicrosoftDotNetBuildTasksTemplatingVersion)" AllowExplicitReference="true" PrivateAssets="All" IsImplicitlyDefined="true" />
+  </ItemGroup>
+
   <Target Name="PrepareForBuild">
   <Target Name="PrepareForBuild">
     <MakeDir Directories="$(IntermediateOutputPath);$(OutputPath)" />
     <MakeDir Directories="$(IntermediateOutputPath);$(OutputPath)" />
 
 

+ 4 - 0
src/Installers/Rpm/Directory.Build.targets

@@ -9,6 +9,10 @@
     <RpmPackageInstallRoot Condition="'$(RpmPackageInstallRoot)' != '' AND !HasTrailingSlash('$(RpmPackageInstallRoot)')">$(RpmPackageInstallRoot)/</RpmPackageInstallRoot>
     <RpmPackageInstallRoot Condition="'$(RpmPackageInstallRoot)' != '' AND !HasTrailingSlash('$(RpmPackageInstallRoot)')">$(RpmPackageInstallRoot)/</RpmPackageInstallRoot>
   </PropertyGroup>
   </PropertyGroup>
 
 
+  <ItemGroup>
+    <PackageReference Include="Microsoft.DotNet.Build.Tasks.Templating" Version="$(MicrosoftDotNetBuildTasksTemplatingVersion)" AllowExplicitReference="true" PrivateAssets="All" IsImplicitlyDefined="true" />
+  </ItemGroup>
+
   <Target Name="GetTargetPath" Returns="$(TargetPath)" />
   <Target Name="GetTargetPath" Returns="$(TargetPath)" />
 
 
   <Target Name="PrepareForBuild">
   <Target Name="PrepareForBuild">

+ 6 - 2
src/ProjectTemplates/GenerateContent.targets

@@ -12,6 +12,10 @@
     </GeneratedContentProperties>
     </GeneratedContentProperties>
   </PropertyGroup>
   </PropertyGroup>
 
 
+  <ItemGroup>
+    <PackageReference Include="Microsoft.DotNet.Build.Tasks.Templating" Version="$(MicrosoftDotNetBuildTasksTemplatingVersion)" AllowExplicitReference="true" PrivateAssets="All" IsImplicitlyDefined="true" />
+  </ItemGroup>
+
   <!--
   <!--
     Generates content using MSBuild variables.
     Generates content using MSBuild variables.
   -->
   -->
@@ -47,8 +51,8 @@
       Properties="$(GeneratedContentProperties);%(GeneratedContent.AdditionalProperties)"
       Properties="$(GeneratedContentProperties);%(GeneratedContent.AdditionalProperties)"
       OutputPath="%(GeneratedContent.OutputPath)">
       OutputPath="%(GeneratedContent.OutputPath)">
 
 
-      <Output TaskParameter="OutputPath" ItemName="FileWrites" />
-      <Output TaskParameter="OutputPath" ItemName="Content" />
+      <Output TaskParameter="ResolvedOutputPath" ItemName="FileWrites" />
+      <Output TaskParameter="ResolvedOutputPath" ItemName="Content" />
     </GenerateFileFromTemplate>
     </GenerateFileFromTemplate>
   </Target>
   </Target>
 </Project>
 </Project>