Enable SpecFlowSingleFileGenerator Custom Tool option in Visual Studio extension settingsIn the settings of the SpecFlow Visual Studio extension (Tools -> Options -> SpecFlow), we set Enabled SpecFlowSingleFileGenerator CustomTool to False after migrating to SpecFlow 3.
However, after every Visual Studio update, this setting reverts to its default value True.
Enabled SpecFlowSingleFileGenerator CustomTool to False.True.Hi @rik-smeets, I think the cause of your issue is the same as in #1513. I can reproduce it on my machine. This is the reason we did not advertise this option that much in the past. Sadly, we did not have enough time to discover the root cause of it yet 馃槙
Looks like it might have the same cause, but I can't be entirely sure. Do you want this issue closed as duplicate or keep it open until we know for sure it has been resolved later?
I would let this issue open, because two different actions trigger the reset of the setting.
I can confirm the bug.
Can the "Enabled SpecFlowSingleFileGenerator CustomTool" be initialized with False, since this is the new default behavior.
I agree with @zplan, if the root cause is hard to discover, setting the default value for this setting to true is a fine workaround since it's the new default anyway. @SabotageAndi @david1995 How do you feel about that?
We know the root cause of this. The attributes at https://github.com/techtalk/SpecFlow.VisualStudio/blob/master/TechTalk.SpecFlow.VSIXShared/SpecFlowSingleFileGenerator.cs#L20 generate this lines in the pkgdef
[$RootKey$\Generators\{164B10B9-B200-11D0-8C61-00A0C91E29D5}\SpecFlowSingleFileGenerator]
@="VB.NET SpecFlow Generator"
"CLSID"="{44f8c2e2-18a9-4b97-b830-6bcd0caa161c}"
"GeneratesDesignTimeSource"=dword:00000001
[$RootKey$\Generators\{164B10B9-B200-11D0-8C61-00A0C91E29D5}\.feature]
@="SpecFlowSingleFileGenerator"
[$RootKey$\Generators\{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\SpecFlowSingleFileGenerator]
@="C# SpecFlow Generator"
"CLSID"="{44f8c2e2-18a9-4b97-b830-6bcd0caa161c}"
"GeneratesDesignTimeSource"=dword:00000001
[$RootKey$\Generators\{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\.feature]
@="SpecFlowSingleFileGenerator"
[$RootKey$\Generators\{FAE04EC1-301F-11D3-BF4B-00C04F79EFBC}\SpecFlowSingleFileGenerator]
@="C# SpecFlow Generator"
"CLSID"="{44f8c2e2-18a9-4b97-b830-6bcd0caa161c}"
"GeneratesDesignTimeSource"=dword:00000001
[$RootKey$\Generators\{FAE04EC1-301F-11D3-BF4B-00C04F79EFBC}\.feature]
@="SpecFlowSingleFileGenerator"
Because of this entries in the file, the registry keys for the CustomTool registration are restored at VS upgrade or Extension upgrade.
When you change the value in VS, we delete or create the registry keys with https://github.com/techtalk/SpecFlow.VisualStudio/blob/master/TechTalk.SpecFlow.VsIntegration.Implementation/SingleFileGenerator/CustomToolSwitch.cs
The value we display in the options dialog checks for the registry keys.
What needed to do is:
@SabotageAndi Great to hear the root cause is identified. Is applying the fix on your backlog?
It is, but you probably don't like the priority. We had other issues in the last weeks to look at.
@SabotageAndi I'll give this one a shot too. Doesn't seem to hard. The only thing I'm wondering about: why was this options saved in a different way compared to all other options beforehand?
I didn't wanted to safe the value separate from the registry keys. I feared they would not sync always.
We recognized the reset of the registry keys only after the version was already on the marketplace. I wasn't aware of this behaviour from VS updates and extension updates.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
I would let this issue open, because two different actions trigger the reset of the setting.