Skip to content

Commit c337fd2

Browse files
Copilotstephentoub
andcommitted
Fix analyzer reference and packaging - use SetTargetFramework to ensure proper build order and remove Configuration from packaging path
Co-authored-by: stephentoub <[email protected]>
1 parent 4c01569 commit c337fd2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/ModelContextProtocol.Core/ModelContextProtocol.Core.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,14 @@
5353
<ItemGroup>
5454
<ProjectReference Include="..\ModelContextProtocol.SourceGenerators\ModelContextProtocol.SourceGenerators.csproj"
5555
OutputItemType="Analyzer"
56-
ReferenceOutputAssembly="false" />
56+
ReferenceOutputAssembly="false"
57+
SetTargetFramework="TargetFramework=netstandard2.0" />
5758
</ItemGroup>
5859

5960
<!-- Package the analyzer DLL into the NuGet package -->
60-
<!-- The SourceGenerators project uses IsRoslynComponent which outputs to bin/Debug/netstandard2.0 without Configuration in the path -->
61+
<!-- When using SetTargetFramework, the SourceGenerators outputs to bin/netstandard2.0 without the Configuration folder -->
6162
<ItemGroup>
62-
<None Include="$(ArtifactsDir)bin\ModelContextProtocol.SourceGenerators\$(Configuration)\netstandard2.0\ModelContextProtocol.SourceGenerators.dll"
63+
<None Include="$(ArtifactsDir)bin\ModelContextProtocol.SourceGenerators\netstandard2.0\ModelContextProtocol.SourceGenerators.dll"
6364
Pack="true"
6465
PackagePath="analyzers/dotnet/cs"
6566
Visible="false" />

0 commit comments

Comments
 (0)