reqnroll / Reqnroll

Open-source Cucumber-style BDD test automation framework for .NET.
https://reqnroll.net
BSD 3-Clause "New" or "Revised" License
332 stars 37 forks source link

Unable to generate files #21

Closed DomZZ closed 6 months ago

DomZZ commented 6 months ago

Reqnroll Version

1.0

Which test runner are you using?

NUnit

Test Runner Version Number

4.0.1

.NET Implementation

.NET 7.0

Test Execution Method

Visual Studio Test Explorer

Content of reqnroll.json configuration file

{ "$schema": "https://schemas.reqnroll.net/reqnroll-config-latest.json", "generator": { "addNonParallelizableMarkerForTags": [ "nonparallelizable" ] }, "runtime": { "missingOrPendingStepsOutcome": "Error" }, "trace": { "traceSuccessfulSteps": true, "traceTimings": false, "minTracedDuration": "0:0:0.0", "stepDefinitionSkeletonStyle": "RegexAttribute" } }

Issue Description

When I compile my solution, there is an error when feature files are compiled : Severity Code Description Project File Line Suppression State Error MSB4018 The "GenerateFeatureFileCodeBehindTask" task failed unexpectedly. System.IO.FileNotFoundException: Could not load file or assembly 'Reqnroll, Version=1.0.0.0, Culture=neutral, PublicKeyToken=611ce36403091019' or one of its dependencies. Le fichier spécifié est introuvable. File name: 'Reqnroll, Version=1.0.0.0, Culture=neutral, PublicKeyToken=611ce36403091019' at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) at System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit) at System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit) at TechTalk.SpecFlow.Generator.Plugins.GeneratorPluginLoader.LoadPlugin(PluginDescriptor pluginDescriptor) at TechTalk.SpecFlow.Generator.GeneratorContainerBuilder.LoadPlugins(ObjectContainer container, GeneratorPluginEvents generatorPluginEvents, UnitTestProviderConfiguration unitTestProviderConfiguration, IEnumerable1 generatorPlugins) at TechTalk.SpecFlow.Generator.GeneratorContainerBuilder.CreateContainer(SpecFlowConfigurationHolder configurationHolder, ProjectSettings projectSettings, IEnumerable1 generatorPluginInfos, IObjectContainer parentObjectContainer) at SpecFlow.Tools.MsBuild.Generation.WrappedGeneratorContainerBuilder.BuildGeneratorContainer(SpecFlowConfigurationHolder specFlowConfigurationHolder, ProjectSettings projectSettings, IReadOnlyCollection1 generatorPluginInfos, IObjectContainer rootObjectContainer) at SpecFlow.Tools.MsBuild.Generation.GenerateFeatureFileCodeBehindTaskExecutor.Execute() at SpecFlow.Tools.MsBuild.Generation.GenerateFeatureFileCodeBehindTask.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()

AVT : la journalisation de liaison d'assembly est désactivée. Pour activer la journalisation des échecs de liaison d'assembly, attribuez la valeur 1 à la valeur de Registre [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD). Remarque : une certaine perte de performance est associée à l'enregistrement dans le journal des échecs de liaison d'assembly. Pour désactiver cette fonctionnalité, supprimez la valeur de Registre [HKLM\Software\Microsoft\Fusion!EnableLog]. ALOP C:\Users\dominique.boyer.nuget\packages\reqnroll.tools.msbuild.generation\1.0.0\build\Reqnroll.Tools.MsBuild.Generation.targets 93
`

Steps to Reproduce

This issue has occured after migrating my Specflow projects using this guide : https://docs.reqnroll.net/latest/guides/migrating-from-specflow.html#with-namespace-changes

Link to Repro Project

No response

DomZZ commented 6 months ago

After some cleanup, it compiles !

gasparnagy commented 6 months ago

Thanks @DomZZ for the info. Would you have time to add a sentence about this to the migration guide? https://github.com/reqnroll/Reqnroll/blob/main/docs/guides/migrating-from-specflow.md