Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

.Net PackageReference, explicitly define version of dependent package

$
0
0

In one of my projects I use AutoFixture.AutoMoq package which depends on Moq package

<!-- project1.csproj -->
<PackageReference Include="AutoFixture.AutoMoq">
      <Version>4.11.0</Version>
</PackageReference>

enter image description here

and in another project I use Moq package directly, i.e.

<!-- project2.csproj -->
<PackageReference Include="Moq">
  <Version>4.13.1</Version>
</PackageReference>

The problem is that Visual Studio / MSBuild / Nuget during package version resolution always selects minimal dependency i.e. Moq 4.1.1308.2120 but I would like to use latest version of Moq 4.13.1.

How to tell Visual Studio / nuget to explicitly use requested version ?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>