tmauldin / mb-unit

Automatically exported from code.google.com/p/mb-unit
0 stars 0 forks source link

Test run failure under VS 2010 #849

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create an assembly targeting .Net 4 framework
2. Create a second assembly targeting .Net 4 framework referencing the first 
one and create a test inside
3. Launch test through Icarus GUI Test Runner

What is the expected output? What do you see instead?

[error] An exception was thrown while exploring tests.
    Location: MyTest.cs(104)
    Details: System.IO.FileNotFoundException: Could not resolve: MyAssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
   at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name)
   at Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name)
   at Mono.Cecil.MetadataResolver.Resolve(IAssemblyResolver resolver, TypeReference type)
   at Mono.Cecil.TypeReference.Resolve()
   at Mono.Cecil.Mixin.CheckedResolve(TypeReference self)
   at Mono.Cecil.SignatureReader.ReadCustomAttributeEnum(TypeReference enum_type)
   at Mono.Cecil.SignatureReader.ReadCustomAttributeElementValue(TypeReference type)
   at Mono.Cecil.SignatureReader.ReadCustomAttributeElement(TypeReference type)
   at Mono.Cecil.SignatureReader.ReadCustomAttributeElement(TypeReference type)
   at Mono.Cecil.SignatureReader.ReadCustomAttributeFixedArrayArgument(ArrayType type)
   at Mono.Cecil.SignatureReader.ReadCustomAttributeFixedArgument(TypeReference type)
   at Mono.Cecil.SignatureReader.ReadCustomAttributeConstructorArguments(CustomAttribute attribute, Collection`1 parameters)
   at Mono.Cecil.MetadataReader.ReadCustomAttributeSignature(CustomAttribute attribute)
   at Mono.Cecil.CustomAttribute.<Resolve>b__2(CustomAttribute attribute, MetadataReader reader)
   at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
   at Mono.Cecil.CustomAttribute.Resolve()
   at Mono.Cecil.CustomAttribute.get_ConstructorArguments()
   at Gallio.Common.Reflection.Impl.CecilReflectionPolicy.GetAttributeConstructorArguments(StaticAttributeWrapper attribute) in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Common\Reflection\Impl\CecilReflectionPolicy.cs:line 248
   at Gallio.Common.Reflection.Impl.StaticAttributeWrapper.get_InitializedArgumentValues() in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Common\Reflection\Impl\StaticAttributeWrapper.cs:line 98
   at Gallio.Common.Reflection.Impl.ReflectorAttributeUtils.CreateAttribute(IAttributeInfo attribute, Boolean throwOnError) in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Common\Reflection\Impl\ReflectorAttributeUtils.cs:line 54
   at Gallio.Common.Reflection.Impl.StaticAttributeWrapper.<>c__DisplayClass10.<Resolve>b__f() in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Common\Reflection\Impl\StaticAttributeWrapper.cs:line 143
   at Gallio.Common.KeyedMemoizer`2.Memoize(TKey key, Func`1 populator) in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Common\KeyedMemoizer.cs:line 91
   at Gallio.Common.Reflection.Impl.StaticAttributeWrapper.Resolve(Boolean throwOnError) in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Common\Reflection\Impl\StaticAttributeWrapper.cs:line 142
   at Gallio.Common.Reflection.AttributeUtils.<ResolveAttributes>d__c.MoveNext() in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Common\Reflection\AttributeUtils.cs:line 132
   at Gallio.Common.Reflection.AttributeUtils.<GetAttributes>d__0`1.MoveNext() in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Common\Reflection\AttributeUtils.cs:line 50
   at Gallio.Framework.Pattern.DeclarativePatternResolver.<GetPatterns>d__0.MoveNext() in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Framework\Pattern\DeclarativePatternResolver.cs:line 43
   at Gallio.Framework.Pattern.DefaultPatternEvaluator.GetPrimaryPattern(ICodeElementInfo codeElement) in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Framework\Pattern\DefaultPatternEvaluator.cs:line 183
   at Gallio.Framework.Pattern.DefaultPatternEvaluator.Consume(IPatternScope containingScope, ICodeElementInfo codeElement, Boolean skipChildren, IPattern defaultPrimaryPattern) in c:\Server\Projects\MbUnit v3.2\Work\src\Gallio\Gallio\Framework\Pattern\DefaultPatternEvaluator.cs:line 127

What version of the product are you using? On what operating system?

Gallio 3.2.3 64bits / Windows 7 Pro 64 bits

Please provide any additional information below.

Original issue reported on code.google.com by ZeRi...@gmail.com on 25 Jun 2011 at 2:06

GoogleCodeExporter commented 9 years ago
Gallio fully supports VS2010 and .NET 4. It also runs perfectly on Win7x64.

The exception you get indicates that a file could not be found 
(MyAssemblyName). 
Have you correctly referenced your projects? Maybe you have copied the output 
test assembly somewhere without copying its dependencies.

Original comment by Yann.Tre...@gmail.com on 27 Jun 2011 at 1:35

GoogleCodeExporter commented 9 years ago
I have two projects in my solution the main project which produce 
MyAssemblyName.exe and the test project where i try to run my tests which 
reference the first one. I tried to run the tests from the test project output 
folder, all assemblies are available in this folder. I tried also to run the 
test from resharper and i have the same issue. 

Original comment by ZeRi...@gmail.com on 29 Jun 2011 at 1:18

GoogleCodeExporter commented 9 years ago
"all assemblies are available in this folder."
Including MyAssemblyName.exe?

Original comment by Yann.Tre...@gmail.com on 29 Jun 2011 at 1:33

GoogleCodeExporter commented 9 years ago
In the "References" folder of your test project. Right-click on 
"MyAssemblyName" and select "Properties". Ensure that "Copy Local" of is set to 
true.

Original comment by Yann.Tre...@gmail.com on 29 Jun 2011 at 1:35

GoogleCodeExporter commented 9 years ago
Yes, i check, all assemblies are in target folder, i can run MS Test for 
exemple but not mbunit ones.

Original comment by ZeRi...@gmail.com on 30 Jun 2011 at 8:24

GoogleCodeExporter commented 9 years ago
Have there been updates to this in the last 5 months? I'm having this same 
problem now as well.

Original comment by defensel...@gmail.com on 7 Nov 2011 at 10:53