Skip to content

Conversation

@Code-Grump
Copy link
Contributor

🤔 What's changed?

Reconfigure project packing to handle more complex scenarios required for:

  • Reqnroll.CustomPlugin
  • Reqnroll.SpecFlowCompatability

⚡️ What's your motivation?

Fixes #972 and #970

🏷️ What kind of change is this?

  • 🐛 Bug fix (non-breaking change which fixes a defect)

This text was originally taken from the template of the Cucumber project, then edited by hand. You can modify the template here.

@304NotModified
Copy link
Member

304NotModified commented Dec 23, 2025

(I know this is a draft, so FYI)

I had difficulties to get the symbol package (snupkg) working with the custom plugin. See also the validate nuget packages job:

    {
          "ErrorCode": 111,
          "Message": "Symbol file not found",
          "HelpText": null,
          "FileName": "lib/netstandard2.0/Reqnroll.Utils.dll"
        },
        {
          "ErrorCode": 111,
          "Message": "Symbol file not found",
          "HelpText": null,
          "FileName": "lib/netstandard2.0/Reqnroll.Parser.dll"
        },
        {
          "ErrorCode": 111,
          "Message": "Symbol file not found",
          "HelpText": null,
          "FileName": "lib/netstandard2.0/Reqnroll.Generator.dll"
        },

@Code-Grump
Copy link
Contributor Author

The custom plugin package breaks every convention around .NET projects. It doesn't even include its own assembly as package content, which breaks the support for including debug symbols.

@Code-Grump
Copy link
Contributor Author

I have fudged a solution which includes an extra empty .pdb in the symbols package and I don't think we're going to get better than that without a lot more work. The Reqnroll.CustomPlugin project is a real oddity that we might want to have a longer look at and consider ways to bring it more into alignment with the .NET build system.

@Code-Grump Code-Grump marked this pull request as ready for review December 30, 2025 19:28
@304NotModified
Copy link
Member

304NotModified commented Dec 31, 2025

I have fudged a solution which includes an extra empty .pdb in the symbols package and I don't think we're going to get better than that without a lot more work. The Reqnroll.CustomPlugin project is a real oddity that we might want to have a longer look at and consider ways to bring it more into alignment with the .NET build system.

Agree on this. I had the same experience.

Maybe we should move back to a nuspec file for this until we refactored the project? (V4 or V5)

@Code-Grump
Copy link
Contributor Author

I did consider returning to using a nuspec file for this project, but it would also require restoring a lot of property-propagation that was otherwise redundant. I also haven't yet found a way to create a symbols package using a spec file (though I feel like such a thing must exist)

@304NotModified
Copy link
Member

What kind of property-propagation do you mean?

@Code-Grump
Copy link
Contributor Author

What kind of property-propagation do you mean?

There was logic which passed MSBuild properties into the NuSpec file so that it would have correct values for things like author and repository URL.

@304NotModified
Copy link
Member

So an option is to hardcode them (temporary) in the nuspec file I think?

@Code-Grump
Copy link
Contributor Author

Absolutely a viable alternative to what I've built. I encourage a robust examination of the packages being produced and the custom targets that twist our projects into the desired shape.

@gasparnagy
Copy link
Contributor

gasparnagy commented Jan 6, 2026

I did some detail comparison between the package contents. @Code-Grump Please comment if these changes are OK/intended.

For the first look, all of these seem to be OK for me, except 15. I will continue with exploratory testing.

It's not a problem, but inconsistency: the main package has the 3rd party licenses in root, but the "CustomPlugin" has it in a "Licenses" subfolder. (I don't think we need the licenses in "CustomPlugin" at all, as it depends on the main package anyway.)

Main package

  1. The "lib/netstandard2.0" folder does not contain Reqnroll.Utils.pdb anymore (was present in v3.0.0)

Comparing to v2.4.1:

  1. The "lib/netstandard2.0" folder now contains Reqnroll.Utils.dll (was missing in v2.4.1)
  2. The "lib/netstandard2.0" folder does not contain Reqnroll.pdb anymore (was present in v2.4.1)
  3. The "LICENSE" file has been removed (was present in v2.4.1)
  4. The 3rd party licenses are now moved to the root folder from a Licenses subfolder
  5. The package has two additional dependencies: <dependency id="Microsoft.Bcl.AsyncInterfaces" version="9.0.6" exclude="Build,Analyzers" /> and <dependency id="System.Threading.Channels" version="9.0.6" exclude="Build,Analyzers" />

Plugin packages (tested: MsTest, TUnit)

  1. The "build/netstandard2.0" folder contains a "deps.json" file in the PR (was missing in v3.0.0)

Comparing to v2.4.1:

  1. The "build/netstandard2.0" folder contains a "deps.json" file in the PR (was missing in v2.4.1)
  2. The .pdb files are removed (were present in v2.4.1)
  3. The props and target files in "build" folder has been changed more significantly

SpecFlowCompatibility

  1. the package now contains "build/net462" and "build/netstandard2.0" folders (was missing in v3.0.0)
  2. the package now contains "lib/net462/Reqnroll.SpecFlowCompatibility.dll" and "lib/netstandard2.0/Reqnroll.SpecFlowCompatibility.dll" files (was missing in v3.0.0)

Comparing to v2.4.1:

  1. The "build/netstandard2.0" folder contains a "deps.json" file in the PR (was missing in v2.4.1)
  2. The .pdb files are removed (were present in v2.4.1)
  3. The assembly Reqnroll.SpecFlowCompatibility.ReqnrollPlugin.dll has been renamed to Reqnroll.SpecFlowCompatibility.dll The shared part between runtime and generator plugin has been extracted to Reqnroll.SpecFlowCompatibility.dll, that is included in "build/" (instead of the Reqnroll.SpecFlowCompatibility.ReqnrollPlugin.dll) and also in "lib/".
  4. The System.ValueType.dll is now included in "build/net462"
  5. Minor changes in props and target files in "build" folder
  6. The "LICENSE" file has been removed (was present in v2.4.1)
  7. The Reqnroll dependency now has an exclude="Build,Analyzers" setting

CustomPlugin

  1. the package does not contain anymore "build/netstandard2.0" folders (was present in v3.0.0, but not in 2.4.1)
  2. the package now contains "lib/netstandard2.0" folder (was missing in v3.0.0, but was present in v2.4.1)
  3. the package now contains "Licenses" folder (was missing in v3.0.0, but was present in v2.4.1)
  4. the package now declares a dependency <dependency id="System.CodeDom" version="8.0.0" exclude="Build,Analyzers" /> (was missing in v3.0.0, but was present in v2.4.1)

Comparing to v2.4.1:

  1. The .pdb files are removed (were present in v2.4.1)
  2. The "LICENSE" file has been removed (was present in v2.4.1)
  3. The Gherkin.dll is not anymore in "lib/netstandard2.0" (was present in v2.4.1)
  4. The Reqnroll and System.CodeDom dependency now has an exclude="Build,Analyzers" setting

@gasparnagy
Copy link
Contributor

exploratory tests passed

Copy link
Contributor

@gasparnagy gasparnagy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a bit more testing and it seems to work. Thx!

@gasparnagy gasparnagy merged commit a68b99e into main Jan 6, 2026
8 checks passed
@gasparnagy gasparnagy deleted the bugfix/correct-support-packages branch January 6, 2026 18:04
@Code-Grump
Copy link
Contributor Author

Thanks for the review @gasparnagy ; the feedback is appreciated.

One of my goals was to recreate the CustomPlugin package as closely as possible to its existing form. As mentioned earlier, it doesn't really follow .NET conventions at all, so it didn't seem wrong to include all the content as before. Removing those Licenses to keep the package size down would be as simple as removing an include from the definition.

Let me try to address the differences as best that I can.

Main package

  1. The "lib/netstandard2.0" folder does not contain Reqnroll.Utils.pdb anymore (was present in v3.0.0)

PDBs are generally moved into the accompanying symbols package (snupkg) - the IDE will download them independently when debug symbols are being loaded.

  1. The "lib/netstandard2.0" folder now contains Reqnroll.Utils.dll (was missing in v2.4.1)

This file should have been present as there's a dependency here.

  1. The "lib/netstandard2.0" folder does not contain Reqnroll.pdb anymore (was present in v2.4.1)

PDB moved to symbols package

  1. The "LICENSE" file has been removed (was present in v2.4.1)

Now using the built-in NuGet licenses format, further cutting down on shipped package sizes.

  1. The 3rd party licenses are now moved to the root folder from a Licenses subfolder

This is following general NuGet package conventions.

  1. The package has two additional dependencies: <dependency id="Microsoft.Bcl.AsyncInterfaces" version="9.0.6" exclude="Build,Analyzers" /> and <dependency id="System.Threading.Channels" version="9.0.6" exclude="Build,Analyzers" />

These dependencies are declared by the project and should be present in the package definition.


Appreciate this PR has been merged, so if there's anything unsatisfactory here, I'm still happy to open a PR to fix.

Plugin packages (tested: MsTest, TUnit)

  1. The "build/netstandard2.0" folder contains a "deps.json" file in the PR (was missing in v3.0.0)
  2. The "build/netstandard2.0" folder contains a "deps.json" file in the PR (was missing in v2.4.1)

This files need to be present for modern MSBuild to resolve dependencies properly.

  1. The .pdb files are removed (were present in v2.4.1)

All PDBs have been moved to the symbols package where appropriate.

  1. The props and target files in "build" folder has been changed more significantly

I can look into this further, but I believe these files are still sensible.

SpecFlowCompatibility

  1. the package now contains "build/net462" and "build/netstandard2.0" folders (was missing in v3.0.0)

These files were totally missed in the switch to project-based packing. They have been restored to their pre-upgrade structure.

  1. the package now contains "lib/net462/Reqnroll.SpecFlowCompatibility.dll" and "lib/netstandard2.0/Reqnroll.SpecFlowCompatibility.dll" files (was missing in v3.0.0)

This, I discovered, is a dependency of our compatibility layer that wraps up some legacy configuration-handling. It looks like this feature will not have worked in prior versions of the package due to this missing dependency. I chose to include it in as it was resolved by the updated build system.

  1. The "build/netstandard2.0" folder contains a "deps.json" file in the PR (was missing in v2.4.1)

Dependencies file included for modern MSBuild support.

  1. The .pdb files are removed (were present in v2.4.1)

Symbols moved to symbols package.

  1. The assembly Reqnroll.SpecFlowCompatibility.ReqnrollPlugin.dll has been renamed to Reqnroll.SpecFlowCompatibility.dll The shared part between runtime and generator plugin has been extracted to Reqnroll.SpecFlowCompatibility.dll, that is included in "build/" (instead of the Reqnroll.SpecFlowCompatibility.ReqnrollPlugin.dll) and also in "lib/".

The analysis tool might have made a mistake here: no file has been renamed, but the additional dependency has been included.

  1. The System.ValueType.dll is now included in "build/net462"

This is another declared dependency that wasn't present in the package. If it isn't actually required, we should track down where it's coming from and prune it.

  1. Minor changes in props and target files in "build" folder

I believe these changes are as expected, but I can look into it further if desired.

  1. The "LICENSE" file has been removed (was present in v2.4.1)

Switched to NuGet built-in licenses support.

  1. The Reqnroll dependency now has an exclude="Build,Analyzers" setting

We don't want to include analyzers transitively.

CustomPlugin

  1. the package does not contain anymore "build/netstandard2.0" folders (was present in v3.0.0, but not in 2.4.1)

Switched back to the previous package structure.

  1. the package now contains "lib/netstandard2.0" folder (was missing in v3.0.0, but was present in v2.4.1)

Restored all the bundled dependencies that were missed by the migration.

  1. the package now contains "Licenses" folder (was missing in v3.0.0, but was present in v2.4.1)

This follows the previous version of the package layout.

  1. the package now declares a dependency <dependency id="System.CodeDom" version="8.0.0" exclude="Build,Analyzers" /> (was missing in v3.0.0, but was present in v2.4.1)

Restored dependency that had been dropped in the migration.

  1. The .pdb files are removed (were present in v2.4.1)

Moved symbols to the symbols package.

  1. The "LICENSE" file has been removed (was present in v2.4.1)

Switched to NuGet built-in licenses support.

  1. The Gherkin.dll is not anymore in "lib/netstandard2.0" (was present in v2.4.1)

This dependency made little sense, as the Reqnroll dependency provides it.

  1. The Reqnroll and System.CodeDom dependency now has an exclude="Build,Analyzers" setting

We don't want to include analyzers transitively.

@Code-Grump
Copy link
Contributor Author

Appreciate this PR has been merged, so if there's anything unsatisfactory, let's open an issue and I'll do further work.

@gasparnagy
Copy link
Contributor

Appreciate this PR has been merged, so if there's anything unsatisfactory, let's open an issue and I'll do further work.

No this is all good I think. I have created #989 for removing the Licenses folder from the CustomPlugin package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IGeneratorPlugin interface could not be found after upgrading to the Reqnroll 3.3.0 (NuGet package Reqnroll.CustomPlugin issue)

4 participants