Skip to content

Commit

Permalink
Revert changes to make build targets transitive
Browse files Browse the repository at this point in the history
This is no longer needed now that we update NuGetizer package reference to always be PrivateAssets=all, to account for users not doing it (misconfig issue).

This also fixes the issue with multi-targeting projects referencing nugetizer now since we had the wrong path for importing targets in that case.
  • Loading branch information
kzu committed Mar 22, 2023
1 parent 970bd77 commit 250ecbb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
7 changes: 2 additions & 5 deletions src/CodeAnalysis/CodeAnalysis.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,11 @@
<PackageReference Include="ThisAssembly.AssemblyInfo" Version="1.1.3" PrivateAssets="all" />
<PackageReference Include="ThisAssembly.Strings" Version="1.1.3" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" Pack="false" />
<PackageReference Include="Devlooped.SponsorLink" Version="0.10.2" GeneratePathProperty="true" />
<PackageReference Include="Devlooped.SponsorLink" Version="0.10.2" />
</ItemGroup>

<ItemGroup>
<None Update="NuGetizer.CodeAnalysis.targets" PackFolder="buildTransitive" CopyToOutputDirectory="PreserveNewest" />
<None Include="$(PkgDevlooped_SponsorLink)\buildTransitive\Devlooped.SponsorLink.targets"
PackFolder="buildTransitive"
CopyToOutputDirectory="PreserveNewest" />
<None Update="NuGetizer.CodeAnalysis.targets" PackFolder="build" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

</Project>
5 changes: 0 additions & 5 deletions src/CodeAnalysis/NuGetizer.CodeAnalysis.targets
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,4 @@
<SponsorablePackageId Include="NuGetizer" />
</ItemGroup>

<!-- This ensures devlooped targets are imported transitively even if we are a dev dependency
and therefore don't propagate the SL dependency, which would otherwise cause a build error
due to analyzers being forcedly transitive even if the reference is private assets/dev dep.
-->
<Import Project="Devlooped.SponsorLink.targets" Condition="$(SponsorLinkImported) != true"/>
</Project>
2 changes: 1 addition & 1 deletion src/NuGetizer.Tasks/NuGetizer.Tasks.targets
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<Description>Simple, flexible and powerful NuGet packaging</Description>

<DevelopmentDependency>true</DevelopmentDependency>
<PackFolder>buildTransitive</PackFolder>
<PackFolder>build</PackFolder>

<PackOnBuild Condition="'$(PackOnBuild)' == '' And '$(Configuration)' == 'Release'">true</PackOnBuild>
<PackageOutputPath Condition="'$(PackageOutputPath)' == ''">..\..\bin</PackageOutputPath>
Expand Down

0 comments on commit 250ecbb

Please sign in to comment.