Skip to content

Commit 4569a5b

Browse files
Skip EnsureCodeFixesProjectBuilt target when NoBuild=true
dotnet pack --no-build sets NoBuild=true, which prohibits invoking the Build target. The custom EnsureCodeFixesProjectBuilt target was doing exactly that, triggering NETSDK1085. Adding the condition makes the target a no-op when the caller has already asserted everything is built.
1 parent e5419ea commit 4569a5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

IntelliTect.Analyzer/IntelliTect.Analyzer/IntelliTect.Analyzer.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<EmbeddedResource Update="Resources.resx" Generator="ResXFileCodeGenerator" LastGenOutput="Resources.Designer.cs" />
3737
</ItemGroup>
3838

39-
<Target Name="EnsureCodeFixesProjectBuilt" BeforeTargets="GenerateNuspec">
39+
<Target Name="EnsureCodeFixesProjectBuilt" BeforeTargets="GenerateNuspec" Condition="'$(NoBuild)' != 'true'">
4040
<MSBuild Projects="..\IntelliTect.Analyzer.CodeFixes\IntelliTect.Analyzer.CodeFixes.csproj" Targets="Build" Properties="Configuration=$(Configuration)" />
4141
</Target>
4242

0 commit comments

Comments
 (0)