-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile Reqnroll.Tools.MsBuild.Generation only with netstandard2.0 #392
base: main
Are you sure you want to change the base?
Conversation
This would simplify the things a lot and maybe this is the way to go. |
384c6a2
to
f39a980
Compare
@obligaron I have played with this solution and many things work fine, including the nasty VS 17.8.2 build, but... I have a plugin that I use for a work project that shows a special issue (the plugin loading is added to our external plugin test suite to get a compatibility indication, this is why the build fails now for this PR). So the plugin is a simple generator plugin (has a class (
With this PR, once the compilation is done through MsBuild (or done from Visual Studio), the .NET Framework 4.* will be used to perform the generation. With the PR, this uses out .NET Standard build, but we load the I don't really understand why it is a problem, because essentially the execution is on .NET Framework 4, but somehow if this happens it fails with strange errors, like it could not find the method implementing the interface method.
My plugin has no .NET 4 specific stuff and when I switch it to simple compilation to .NET Standard only, it would work again. I could make this fix, but this shows a more generic issue. Based on that my understanding is the following:
So basically the question is whether we should move on with the PR and say that only .NET Standard compatible generator plugins should be allowed or drop the PR. What do you think? (CC @Code-Grump @ajeckmans) |
What's the motivation for targeting the .NET 4 runtime specifically in the first place? As you stated already: anything compiled for .NET Standard would run there. This specific error smells like binary incompatibility, like an interface changed in one assembly and the version being shipped alongside your assembly doesn't match. We'd need to grab all the binaries as they sit on the server (very hard based on context clues) to know what was actually being loaded, or otherwise dump out all the module information. |
This might be the result of a dependency chain issue. I can imagine two scenarios:
The concrete example is not that interesting, because that could be simply recompiled to .NET Standard. But just to answer the question: it is exactly the same simple code that is compiled to .NET Fw and .NET Standard and the interface that is in the error is one of the Reqnroll interfaces that is sitting in a .NET Standard dll - so there is no obvious reason for it. |
# Conflicts: # Plugins/Reqnroll.Verify/Reqnroll.Verify.ReqnrollPlugin.IntegrationTest/Reqnroll.Verify.ReqnrollPlugin.IntegrationTest.csproj
🤔 What's changed?
Change Reqnroll.Tools.MsBuild.Generation to only compile to netstandard2.0 and droped compiling to .net462.
⚡️ What's your motivation?
In #373 we got compilation errors because our netstandard2.0 projects reference assemblies with other versions then the one compiled .net462. This also simplifies the logic.
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
📋 Checklist:
This text was originally taken from the template of the Cucumber project, then edited by hand. You can modify the template here.