Skip to content

Commit

Permalink
Remove dependency on Internal.AspNetCore.BuildTasks (#33449)
Browse files Browse the repository at this point in the history
* Remove dependency on Internal.AspNetCore.BuildTasks

* Wip

* Remove explicit reference

* Update PrepareForTest.targets

* Try again?
  • Loading branch information
John Luo authored Jun 11, 2021
1 parent 1048a02 commit 9fd548f
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 8 deletions.
4 changes: 4 additions & 0 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,10 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>85a65ea1fca1d0867f699fed44d191358270bf6a</Sha>
</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">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>85a65ea1fca1d0867f699fed44d191358270bf6a</Sha>
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
<MicrosoftEntityFrameworkCoreDesignVersion>6.0.0-preview.6.21309.9</MicrosoftEntityFrameworkCoreDesignVersion>
<!-- Packages from dotnet/arcade -->
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21304.1</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>6.0.0-beta.21310.4</MicrosoftDotNetBuildTasksTemplatingVersion>
</PropertyGroup>
<!--
Expand All @@ -160,7 +161,6 @@
<!-- DiagnosticAdapter package pinned temporarily until migrated/deprecated -->
<MicrosoftExtensionsDiagnosticAdapterVersion>5.0.0-preview.4.20180.4</MicrosoftExtensionsDiagnosticAdapterVersion>
<!-- Build tool dependencies -->
<InternalAspNetCoreBuildTasksVersion>3.0.0-build-20190530.3</InternalAspNetCoreBuildTasksVersion>
<MicrosoftVSSDKBuildToolsVersion>15.9.3032</MicrosoftVSSDKBuildToolsVersion>
<!-- Stable dotnet/corefx packages no longer updated for .NET Core 3 -->
<MicrosoftCSharpVersion>4.7.0</MicrosoftCSharpVersion>
Expand Down
5 changes: 0 additions & 5 deletions eng/Workarounds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -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. -->
<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. -->
<ItemGroup>
<KnownFrameworkReference Update="NETStandard.Library">
Expand Down
4 changes: 4 additions & 0 deletions eng/tools/GenerateFiles/GenerateFiles.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Templating" PrivateAssets="All" Version="$(MicrosoftDotNetBuildTasksTemplatingVersion)" IsImplicitlyDefined="true" />
</ItemGroup>

<!-- Update artifacts/bin/GenerateFiles/Directory.Build.* files. -->
<Target Name="GenerateDirectoryBuildFiles">
<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
<ItemGroup>
<Reference Include="Microsoft.AspNetCore" />
<Reference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" />

<PackageReference Include="Microsoft.DotNet.Build.Tasks.Templating" PrivateAssets="All" Version="$(MicrosoftDotNetBuildTasksTemplatingVersion)" IsImplicitlyDefined="true" AllowExplicitReference="true" />
</ItemGroup>

<!-- We include this here to ensure that the shared framework is built before we leverage it when running
Expand Down
4 changes: 4 additions & 0 deletions src/Installers/Debian/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
</DebBuildDependsOn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Templating" Version="$(MicrosoftDotNetBuildTasksTemplatingVersion)" AllowExplicitReference="true" PrivateAssets="All" IsImplicitlyDefined="true" />
</ItemGroup>

<Target Name="PrepareForBuild">
<MakeDir Directories="$(IntermediateOutputPath);$(OutputPath)" />

Expand Down
4 changes: 4 additions & 0 deletions src/Installers/Rpm/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
<RpmPackageInstallRoot Condition="'$(RpmPackageInstallRoot)' != '' AND !HasTrailingSlash('$(RpmPackageInstallRoot)')">$(RpmPackageInstallRoot)/</RpmPackageInstallRoot>
</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="PrepareForBuild">
Expand Down
8 changes: 6 additions & 2 deletions src/ProjectTemplates/GenerateContent.targets
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
</GeneratedContentProperties>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Templating" Version="$(MicrosoftDotNetBuildTasksTemplatingVersion)" AllowExplicitReference="true" PrivateAssets="All" IsImplicitlyDefined="true" />
</ItemGroup>

<!--
Generates content using MSBuild variables.
-->
Expand Down Expand Up @@ -47,8 +51,8 @@
Properties="$(GeneratedContentProperties);%(GeneratedContent.AdditionalProperties)"
OutputPath="%(GeneratedContent.OutputPath)">

<Output TaskParameter="OutputPath" ItemName="FileWrites" />
<Output TaskParameter="OutputPath" ItemName="Content" />
<Output TaskParameter="ResolvedOutputPath" ItemName="FileWrites" />
<Output TaskParameter="ResolvedOutputPath" ItemName="Content" />
</GenerateFileFromTemplate>
</Target>
</Project>

0 comments on commit 9fd548f

Please sign in to comment.