Skip to content

Commit

Permalink
Fix build on .NET SDK 9
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolayPianikov committed Nov 12, 2024
1 parent e23b214 commit 50886c4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Pure.DI/Pure.DI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<PackageReadmeFile>README.md</PackageReadmeFile>
<AvoidCycleErrorOnSelfReference>true</AvoidCycleErrorOnSelfReference>
</PropertyGroup>

<!--<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
Expand All @@ -25,4 +26,20 @@
<None Include="$(OutDir)\*.dll" Pack="true" PackagePath="analyzers/dotnet/roslyn$(AnalyzerRoslynVersion)/cs" Visible="false"/>
</ItemGroup>

<Choose>
<When Condition="$(AvoidCycleErrorOnSelfReference) == 'true'">
<PropertyGroup>
<PackageId Condition="'$(PackageId)' == ''">$(MSBuildProjectName)</PackageId>
<PackageIdTemp>$(PackageId)</PackageIdTemp>
<PackageId>$(PackageId)_temp</PackageId>
</PropertyGroup>
</When>
</Choose>

<Target Name="_UpdatePackageId" BeforeTargets="$(PackDependsOn)" Condition="$(AvoidCycleErrorOnSelfReference) == 'true'" >
<PropertyGroup>
<PackageId>$(PackageIdTemp)</PackageId>
</PropertyGroup>
</Target>

</Project>

0 comments on commit 50886c4

Please sign in to comment.