Skip to content

Commit 466656a

Browse files
committed
Adjusts local package version override
Updates the `VersionOverride` for the `Moq.AutoMock` package reference from `*` to `*-*`. This improves matching for both stable and prerelease versions (e.g., `3.6.2-ci0123`) when consuming a locally-built package in CI and local development environments. Fixes #406
1 parent 28727cb commit 466656a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@
3232
The CI pipeline will set the LocalNuGetSource property to the directory containing
3333
the packed .nupkg files.
3434
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.
36-
Using * to match any version (including prerelease with -ci suffix in CI).
35+
since we're using a locally-built package.
36+
Using *-* to match any version including prerelease (e.g., 3.6.2-ci0123 in CI)
37+
and stable releases. The NuGet.config package source mapping ensures only the
38+
local source is used for Moq.AutoMock.
3739
-->
3840
<ItemGroup Condition="'$(LocalNuGetSource)' != ''">
39-
<PackageReference Include="Moq.AutoMock" VersionOverride="*" />
41+
<PackageReference Include="Moq.AutoMock" VersionOverride="*-*" />
4042
</ItemGroup>
4143

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

0 commit comments

Comments
 (0)