jediwhale / fitsharp

Functional testing tools for .NET
http://fitsharp.github.io
Other
152 stars 73 forks source link

Using .Net Core DLLs as fixtures #153

Closed capstonecinc closed 6 years ago

capstonecinc commented 6 years ago

When trying to use .net core dll's in a fixture I get the following error when running my tests. I've tried the workaround listed for the .net standard issue but no dice. Is .net core in your roadmap? Is there another workaround try?

Thank you,

-Jamie

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.BadImageFormatException: Could not load file or assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. An attempt was made to load a program with an incorrect format. at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes) at System.Reflection.RuntimeAssembly.GetExportedTypes() at fitSharp.Machine.Engine.CurrentDomain.LoadAssembly(String assemblyPath) at fitSharp.Machine.Engine.ApplicationUnderTest.Assemblies.AddAssembly(String assemblyName) at fitSharp.Machine.Engine.ApplicationUnderTest.AddAssembly(String assemblyName) --- End of inner exception stack trace --- at fitSharp.Machine.Model.TypedValue.ThrowExceptionIfNotValid() at fitSharp.Machine.Application.SuiteConfiguration.LoadNode(String typeName, XmlNode methodNode) at fitSharp.Machine.Application.SuiteConfiguration.LoadXml(String configurationXml) at fitSharp.Machine.Application.ShellArguments.<>c__DisplayClass5_0.b__1(String value) at fitSharp.Machine.Application.ArgumentParser.InvokeArgumentHandler(String switch, String argumentValue) at fitSharp.Machine.Application.ArgumentParser.Parse(IList`1 commandLineArguments) at fitSharp.Machine.Application.ShellArguments.LoadMemory() at fitSharp.Machine.Application.Shell.Run()

capstonecinc commented 6 years ago

In the interim, I've cloned the source and now have it working with dotnet core.

jediwhale commented 6 years ago

I'm working on a .net core version. Probably will be a couple of months.

On 2018-06-13 09:28, Jamie Wallingford - Capstone wrote:

When trying to use .net core dll's as a fixture I get the following error when running my tests. I've tried the workaround listed for the .net standard issue but no dice. Is .net core in your roadmap? is there another workaround try?

Thank you,

-Jamie

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.BadImageFormatException: Could not load file or assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. An attempt was made to load a program with an incorrect format. at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes) at System.Reflection.RuntimeAssembly.GetExportedTypes() at fitSharp.Machine.Engine.CurrentDomain.LoadAssembly(String assemblyPath) at fitSharp.Machine.Engine.ApplicationUnderTest.Assemblies.AddAssembly(String assemblyName) at fitSharp.Machine.Engine.ApplicationUnderTest.AddAssembly(String assemblyName) --- End of inner exception stack trace --- at fitSharp.Machine.Model.TypedValue.ThrowExceptionIfNotValid() at fitSharp.Machine.Application.SuiteConfiguration.LoadNode(String typeName, XmlNode methodNode) at fitSharp.Machine.Application.SuiteConfiguration.LoadXml(String configurationXml) at fitSharp.Machine.Application.ShellArguments.<>c__DisplayClass5_0.b__1(String value) at fitSharp.Machine.Application.ArgumentParser.InvokeArgumentHandler(String switch, String argumentValue) at fitSharp.Machine.Application.ArgumentParser.Parse(IList`1 commandLineArguments) at fitSharp.Machine.Application.ShellArguments.LoadMemory() at fitSharp.Machine.Application.Shell.Run()

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jediwhale/fitsharp/issues/153, or mute the thread https://github.com/notifications/unsubscribe-auth/AACXY9wcXUr6gDHFPqsCQZWhCr28R7D_ks5t8S-kgaJpZM4UmbcJ.

jediwhale commented 6 years ago

That's good news. Looks like it will be easier than I thought.

On 2018-06-13 13:38, Jamie Wallingford - Capstone wrote:

In the interim, I've cloned the source and now have it working with dotnet core.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jediwhale/fitsharp/issues/153#issuecomment-397059977, or mute the thread https://github.com/notifications/unsubscribe-auth/AACXY8Z1gwaCNQcxceKJhIF2blee3P7jks5t8WomgaJpZM4UmbcJ.

capstonecinc commented 6 years ago

I've commented out some of the missing pieces, as they are not needed for my usage. But the Runner, fit, and fitSharp are very easy to get working. Appreciate the work you've put into this. Thank you.

CumpsD commented 6 years ago

@jediwhale out of curiosity, does this support .net core right now?

jediwhale commented 6 years ago

.net core 2.0 is now supported

CumpsD commented 6 years ago

thanks!