Create a configuration for generating a NuGet package #64
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I am planning to distribute this adapter internally as a nuget package. It doesn't seem you had nuget support configured in this repository, so I set it up. It took quite a lot of head banging to figure out how to convince nuget to install a package consisting of managed assemblies to a native project, so I thought I'd share my configuration in case you want to set up official nuget packages some day.
.TestAdapter
to make VS recognize it from a nuget package.Catch2TestAdapter.nuspec
to configure the nuget package. I tried embedding the nuget metadata in the project, but could not get it to support the exotic combination of having .NET assemblies that are meant to be installed in a native project.See https://github.com/microsoft/vstest/blob/main/docs/RFCs/0004-Adapter-Extensibility.md
Command to generate the package:
nuget pack Catch2.TestAdapter.nuspec -Version 1.8.0 -p Configuration=Debug
PS. For
.vcxproj
s VS only finds adapters mentioned in packages.config, not inPackageReference
s, unless you apply extra invocations.