Skip to content

Commit 3b88559

Browse files
committed
Pinned NuGet dependencies to specific versions since our native dependencies do not expose a stable interface.
1 parent 0606ae3 commit 3b88559

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

ClangSharp.Pathogen/ClangSharp.Pathogen.csproj

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
<IncludeSymbols>true</IncludeSymbols>
1515
</PropertyGroup>
1616
<ItemGroup>
17-
<PackageReference Include="ClangSharp" Version="10.0.0-beta" />
17+
<!-- This is pinned to a specific version since ClangSharp.Pathogen.Runtime includes libClangSharp -->
18+
<PackageReference Include="ClangSharp" Version="[10.0.0-beta]" />
1819
</ItemGroup>
1920
<ItemGroup>
2021
<!--
@@ -26,4 +27,20 @@
2627
<ItemGroup>
2728
<None Include="..\LICENSE.txt" Pack="true" PackagePath="" Visible="false" />
2829
</ItemGroup>
30+
31+
<!--
32+
This ensures only the exact matching version of ClangSharp.Pathogen.Runtime is used
33+
This target is taken from https://github.com/NuGet/Home/issues/5556#issuecomment-585482714
34+
-->
35+
<Target Name="UseExactProjectReferenvePackageVersions" AfterTargets="_GetProjectReferenceVersions">
36+
<ItemGroup>
37+
<_ProjectReferencesWithExactVersions Include="@(_ProjectReferencesWithVersions)">
38+
<ProjectVersion>[%(_ProjectReferencesWithVersions.ProjectVersion)]</ProjectVersion>
39+
</_ProjectReferencesWithExactVersions>
40+
</ItemGroup>
41+
<ItemGroup>
42+
<_ProjectReferencesWithVersions Remove="@(_ProjectReferencesWithVersions)" />
43+
<_ProjectReferencesWithVersions Include="@(_ProjectReferencesWithExactVersions)" />
44+
</ItemGroup>
45+
</Target>
2946
</Project>

0 commit comments

Comments
 (0)