.NET MAUI PackageVersion was expected to have a single value across all target frameworks
I have a .NET MAUI app that I want to run unit tests against. I already have some MsTest tests but never could get the MsTest project to build. Enter Gerald versluis’ fine video on how to do that here and a working sample using xUnit (here) [https://stackoverflow.com)https://github.com/jfversluis/MauixUnitTestSample.git]. Basically he just adds a Net8 target to the original project and goes on from there. Problem is when the project has a version other than 1.0 Nuget restore fails with “…The property PackageVersion was expected to have a single value across all target frameworks, but instead had the following values: 1.0.0, 2.0” (I took Gerald’s original code set the version to 2.0 in my test). I’m guessing PackageVersion is normally inherited from Version, but I’m at a bit of a loss as to how it should be fixed. My workaround is to add a couple of lines to my csproj file as follows:
Dotnet Restore Fails “PackageSourceMapping is enabled, the following source(s) were not considered:” On Build Agent
I have a private nuget feed that I use to host some packages for my app, I’m using Azure Pipelines for builds and I have noticed a restore issue with PackageSourceMappings
, I believe I have followed the guidance accordingly.
How to hide types of a NuGet package
I developed a .NET 8 NuGet package “A”, which uses a 3rd party NuGet packages “B”, in turn uses the Json.Net
(Newtonsoft.Json) package.
Why Nuget upgrade of SSH.NET to 2024.0 caused downgrade of System.Runtime.CompilerServices.Unsafe?
We upgraded SSH.NET from version 2016.0 to 2024.0, and in doing so Nuget downgraded System.Runtime.CompilerServices.Unsafe from 4.0.5.0 to 4.0.4.1.