Closed LittleCornerDev closed 4 years ago
Do you get same exception also without /p:CollectCoverage=true
?
Have your tried with collector integration? https://github.com/tonerdo/coverlet#vstest-integration-preferred-due-to-known-issue
I get the same error with collector integration
dotnet test --collect:"XPlat Code Coverage"
and with just dotnet test
.
It is an nunit C# project inside a Xamarin.Forms solution.
This issue and other reference errors I was having with my nUnit test project has led me to switching my nUnit project to one using .NET Core.
Dependency packages are now maintained via PackageReference in *.csproj
instead of via packages.config
, and dotnet test
is executing successfully now that it is no longer looking for frameworks.
For future reference of anyone else who comes across this... In Visual Studio Mac, I changed nUnit project from:
to:
and with just dotnet test.
Ok understood it's not an issue related to coverlet you should open an issue on repo https://github.com/microsoft/vstest/issues
I am attempting to use coverlet for a Xamarin.Forms project edited via VisualStudio on Mac.
When running
dotnet test /p:CollectCoverage=true
, I keep getting an error about missing .NETFramework references and a prompt to download.error MSB3644: The reference assemblies for .NETFramework,Version=v4.7 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
As the downloads are executables for Windows and not Mac, and since VisualStudio Mac uses Mono and .Net Core, I have found various references similar to this one about importing
netfx.props
to set paths accordingly.With debug messages, I see that I have:
I did an
ls -la
and verified that/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.7-api
exists and has content.However, I still get the same MSB3644 error about missing .NETFramework references. As I am new to all these technologies, any thoughts/advice/help would be appreciated!