{"action":"opened","issue":{"url":"https://api.github.com/repos/techtalk/SpecFlow/issues/1305","repository_url":"https://api.github.com/repos/techtalk/SpecFlow","labels_url":"https://api.github.com/repos/techtalk/SpecFlow/issues/1305/labels{/name}","comments_url":"https://api.github.com/repos/techtalk/SpecFlow/issues/1305/comments","events_url":"https://api.github.com/repos/techtalk/SpecFlow/issues/1305/events","html_url":"https://github.com/techtalk/SpecFlow/issues/1305","id":373188838,"node_id":"MDU6SXNzdWUzNzMxODg4Mzg=","number":1305,"title":"Missing [assembly:GeneratorPlugin] attribute error with SpecFlow 3.0","user":{"login":"jmezach","id":1225489,"node_id":"MDQ6VXNlcjEyMjU0ODk=","avatar_url":"https://avatars3.githubusercontent.com/u/1225489?v=4","gravatar_id":"","url":"https://api.github.com/users/jmezach","html_url":"https://github.com/jmezach","followers_url":"https://api.github.com/users/jmezach/followers","following_url":"https://api.github.com/users/jmezach/following{/other_user}","gists_url":"https://api.github.com/users/jmezach/gists{/gist_id}","starred_url":"https://api.github.com/users/jmezach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmezach/subscriptions","organizations_url":"https://api.github.com/users/jmezach/orgs","repos_url":"https://api.github.com/users/jmezach/repos","events_url":"https://api.github.com/users/jmezach/events{/privacy}","received_events_url":"https://api.github.com/users/jmezach/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-23T20:32:41Z","updated_at":"2018-10-23T20:32:41Z","closed_at":null,"author_association":"NONE","body":"First of all, I'm very much aware of the fact that Specflow 3.0 isn't released yet, I just wanted to give the beta packages from the MyGet feed a try to see how far I could get with these on .NET Core now that #649 has been merged. Unfortunately I didn't get very far just yet because I'm getting this error:\r\n\r\n```\r\n  Restore completed in 31.85 ms for /Users/jmezach/Projects/demos/SpecflowDotNetCore/SpecflowDotNetCore.csproj./usr/local/share/dotnet/sdk/2.2.100-preview3-009430/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets(143,5): message NETSDK1057: You are using a preview version of .NET Core. See: https://aka.ms/dotnet-core-preview [/Users/jmezach/Projects/demos/SpecflowDotNetCore/SpecflowDotNetCore.csproj]\r\n  SpecFlowFeatureFiles: Features/MyFirstFeature.feature/Users/jmezach/.nuget/packages/specflow.tools.msbuild.generation/3.0.125-beta/build/SpecFlow.Tools.MsBuild.Generation.targets(73,5): error : [SpecFlow] TechTalk.SpecFlow.S\r\npecFlowException: Missing [assembly:GeneratorPlugin] attribute in /Users/jmezach/.nuget/packages/specflow.mstest/3.0.125-beta/build/netstandard2.0/TechTalk.SpecFlow.MSTest\r\n.Generator.SpecFlowPlugin.dll [/Users/jmezach/Projects/demos/SpecflowDotNetCore/SpecflowDotNetCore.csproj]\r\n/Users/jmezach/.nuget/packages/specflow.tools.msbuild.generation/3.0.125-beta/build/SpecFlow.Tools.MsBuild.Generation.targets(73,5): error :    at IGeneratorPlugin TechTal\r\nk.SpecFlow.Generator.Plugins.GeneratorPluginLoader.LoadPlugin(PluginDescriptor pluginDescriptor) [/Users/jmezach/Projects/demos/SpecflowDotNetCore/SpecflowDotNetCore.cspro\r\nj]\r\n/Users/jmezach/.nuget/packages/specflow.tools.msbuild.generation/3.0.125-beta/build/SpecFlow.Tools.MsBuild.Generation.targets(73,5): error :    at void TechTalk.SpecFlow.G\r\nenerator.GeneratorContainerBuilder.LoadPlugin(PluginDescriptor pluginDescriptor, IGeneratorPluginLoader pluginLoader, GeneratorPluginEvents generatorPluginEvents, UnitTest\r\nProviderConfiguration unitTestProviderConfigration) [/Users/jmezach/Projects/demos/SpecflowDotNetCore/SpecflowDotNetCore.csproj]\r\n/Users/jmezach/.nuget/packages/specflow.tools.msbuild.generation/3.0.125-beta/build/SpecFlow.Tools.MsBuild.Generation.targets(73,5): error :    at void TechTalk.SpecFlow.G\r\nenerator.GeneratorContainerBuilder.LoadPlugins(ObjectContainer container, IGeneratorConfigurationProvider configurationProvider, SpecFlowConfigurationHolder configurationH\r\nolder, GeneratorPluginEvents generatorPluginEvents, SpecFlowProjectConfiguration specFlowConfiguration, UnitTestProviderConfiguration unitTestProviderConfigration, IEnumerable<string> generatorPlugins) [/Users/jmezach/Projects/demos/SpecflowDotNetCore/SpecflowDotNetCore.csproj]\r\n/Users/jmezach/.nuget/packages/specflow.tools.msbuild.generation/3.0.125-beta/build/SpecFlow.Tools.MsBuild.Generation.targets(73,5): error :    at IObjectContainer TechTalk.SpecFlow.Generator.GeneratorContainerBuilder.CreateContainer(SpecFlowConfigurationHolder configurationHolder, ProjectSettings projectSettings, IEnumerable<string> generatorPlugins) [/Users/jmezach/Projects/demos/SpecflowDotNetCore/SpecflowDotNetCore.csproj]\r\n/Users/jmezach/.nuget/packages/specflow.tools.msbuild.generation/3.0.125-beta/build/SpecFlow.Tools.MsBuild.Generation.targets(73,5): error :    at ITestGenerator TechTalk.SpecFlow.Generator.TestGeneratorFactory.CreateGenerator(ProjectSettings projectSettings, IEnumerable<string> generatorPlugins) [/Users/jmezach/Projects/demos/SpecflowDotNetCore/SpecflowDotNetCore.csproj]\r\n/Users/jmezach/.nuget/packages/specflow.tools.msbuild.generation/3.0.125-beta/build/SpecFlow.Tools.MsBuild.Generation.targets(73,5): error :    at void SpecFlow.Tools.MsBuild.Generation.FeatureCodeBehindGenerator.InitializeProject(string projectPath, string rootNamespace, IEnumerable<string> generatorPlugins) [/Users/jmezach/Projects/demos/SpecflowDotNetCore/SpecflowDotNetCore.csproj]\r\n/Users/jmezach/.nuget/packages/specflow.tools.msbuild.generation/3.0.125-beta/build/SpecFlow.Tools.MsBuild.Generation.targets(73,5): error :    at IEnumerable<string> SpecFlow.Tools.MsBuild.Generation.FeatureFileCodeBehindGenerator.GenerateFilesForProject(string projectPath, string rootNamespace, List<string> featureFiles, List<string> generatorPlugins, string projectFolder, string outputPath)+MoveNext() [/Users/jmezach/Projects/demos/SpecflowDotNetCore/SpecflowDotNetCore.csproj]\r\n/Users/jmezach/.nuget/packages/specflow.tools.msbuild.generation/3.0.125-beta/build/SpecFlow.Tools.MsBuild.Generation.targets(73,5): error :    at bool SpecFlow.Tools.MsBuild.Generation.GenerateFeatureFileCodeBehindTask.Execute() [/Users/jmezach/Projects/demos/SpecflowDotNetCore/SpecflowDotNetCore.csproj]\r\n\r\nBuild FAILED.\r\n```\r\nI have seen a couple of other issues related to this error message, such as #1247 and #1149, but they seem to be caused by an incorrect combination of Specflow packages and the Visual Studio integration. They all suggest moving to the MSBuild integrated way of generating the code behind, which is what I'm doing in my project. I have the following package references:\r\n\r\n```xml\r\n  <ItemGroup>\r\n    <PackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"15.9.0\" />\r\n    <PackageReference Include=\"MSTest.TestAdapter\" Version=\"1.3.2\" />\r\n    <PackageReference Include=\"MSTest.TestFramework\" Version=\"1.3.2\" />\r\n    <PackageReference Include=\"Specflow\" Version=\"3.0.125-beta\" />\r\n    <PackageReference Include=\"SpecFlow.MsTest\" Version=\"3.0.125-beta\" />\r\n    <PackageReference Include=\"SpecFlow.Tools.MsBuild.Generation\" Version=\"3.0.125-beta\" />\r\n  </ItemGroup>\r\n```\r\n\r\nI've tried to look into what's going wrong here by having a look at the assemblies I'm using with ILSpy. So far I couldn't find anything wrong with it. The assembly containing the generator plugin actually has an assembly level attribute. The only thing I can think of is that there are actually two definitions of the same attribute somehow."}}
{"actor":{"display_login":"jmezach"}}