Skip to content

Commit a6ff5a1

Browse files
committed
Bypasses CPM for local Moq.AutoMock reference
Uses `VersionOverride` for the local `Moq.AutoMock` package reference to bypass Central Package Management. This ensures that locally-built packages, especially those with CI version suffixes, are correctly resolved in the test project without interference from CPM. Fixes #406
1 parent 7e0e562 commit a6ff5a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

GeneratorTests/Moq.AutoMock.Generator.DisableTests/Moq.AutoMock.Generator.DisableTests.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@
3131
This project references the Moq.AutoMock NuGet package from a local source.
3232
The CI pipeline will set the LocalNuGetSource property to the directory containing
3333
the packed .nupkg files.
34+
We use VersionOverride to bypass Central Package Management for this package
35+
since we're using a locally-built package with a CI version suffix.
3436
-->
3537
<ItemGroup Condition="'$(LocalNuGetSource)' != ''">
36-
<PackageReference Include="Moq.AutoMock" Version="*-*" />
38+
<PackageReference Include="Moq.AutoMock" VersionOverride="*-*" />
3739
</ItemGroup>
3840

3941
<!-- For local development, use project reference -->

0 commit comments

Comments
 (0)