More on this:
When I add [TestFixture] attribute onto my test class in test dll, I get an error from Unity when trying to import the test dll.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: ‘System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’
at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x000f7] in :0
at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00007] in :0
at Mono.Cecil.DefaultAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00025] in :0
at Mono.Cecil.MetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x00040] in :0
at Mono.Cecil.ModuleDefinition.Resolve (Mono.Cecil.TypeReference type) [0x00006] in :0
at Mono.Cecil.TypeReference.Resolve () [0x00006] in :0
at Mono.Cecil.Mixin.CheckedResolve (Mono.Cecil.TypeReference self) [0x00000] in :0
at Mono.Cecil.SignatureReader.ReadCustomAttributeEnum (Mono.Cecil.TypeReference enum_type) [0x00000] in :0
at Mono.Cecil.SignatureReader.ReadCustomAttributeElementValue (Mono.Cecil.TypeReference type) [0x0002f] in :0
at Mono.Cecil.SignatureReader.ReadCustomAttributeElement (Mono.Cecil.TypeReference type) [0x00015] in :0
at Mono.Cecil.SignatureReader.ReadCustomAttributeFixedArgument (Mono.Cecil.TypeReference type) [0x00015] in :0
at Mono.Cecil.SignatureReader.ReadCustomAttributeConstructorArguments (Mono.Cecil.CustomAttribute attribute, Mono.Collections.Generic.Collection`1[T] parameters) [0x0002e] in :0
at Mono.Cecil.MetadataReader.ReadCustomAttributeSignature (Mono.Cecil.CustomAttribute attribute) [0x0003c] in :0
at Mono.Cecil.CustomAttribute.b__35_0 (Mono.Cecil.CustomAttribute attribute, Mono.Cecil.MetadataReader reader) [0x00000] in :0
at Mono.Cecil.ModuleDefinition.Read[TItem,TRet] (TItem item, System.Func`3[T1,T2,TResult] read) [0x00029] in :0
at Mono.Cecil.CustomAttribute.Resolve () [0x00017] in :0
at Mono.Cecil.CustomAttribute.get_ConstructorArguments () [0x00000] in :0
at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.CustomAttribute customAttribute, Unity.Cecil.Visitor.Context context) [0x0003e] in :0
at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.MethodDefinition methodDefinition, Unity.Cecil.Visitor.Context context) [0x00037] in :0
at APIUpdater.Framework.Configuration.ConfigurationCollector.Visit (Mono.Cecil.MethodDefinition methodDefinition, Unity.Cecil.Visitor.Context context) [0x00001] in :0
at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.TypeDefinition typeDefinition, Unity.Cecil.Visitor.Context context) [0x001b1] in :0
at APIUpdater.Framework.Configuration.ConfigurationCollector.Visit (Mono.Cecil.TypeDefinition typeDefinition, Unity.Cecil.Visitor.Context context) [0x00001] in :0
at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.ModuleDefinition moduleDefinition, Unity.Cecil.Visitor.Context context) [0x00024] in :0
at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.AssemblyDefinition assemblyDefinition, Unity.Cecil.Visitor.Context context) [0x00024] in :0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[ ],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) [0x00038] in :0
— End of inner exception stack trace —
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) [0x00053] in :0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[ ] parameters) [0x00000] in :0
at Unity.Cecil.Visitor.Visitor.Visit[T] (T node, Unity.Cecil.Visitor.Context context) [0x00038] in :0
at Unity.Cecil.Visitor.Extensions.DoAccept[T] (T definition, Unity.Cecil.Visitor.Visitor visitor) [0x0001e] in :0
at Unity.Cecil.Visitor.Extensions.Accept (Mono.Cecil.AssemblyDefinition assemblyDefinition, Unity.Cecil.Visitor.Visitor visitor) [0x00001] in :0
at APIUpdater.Framework.Configuration.ObsoleteAttributeBasedConfigurationFactory.CollectConfigurationFrom (Mono.Cecil.AssemblyDefinition assembly) [0x0000e] in :0
at APIUpdater.Framework.Configuration.ObsoleteAttributeBasedConfigurationFactory…ctor (System.String pathToAssemblyWithAttr, System.String[ ] references) [0x00084] in :0
at APIUpdater.Framework.Util.IEnumerableExtensions.ComputeConfigurationProvider (System.Collections.Generic.IEnumerable`1[T] assemblyPaths, APIUpdater.Framework.Configuration.IConfigurationProvider provider) [0x00017] in :0
at AssemblyUpdater.Application.Program.ConfigurationProviderFrom (System.Collections.Generic.IEnumerable`1[T] configurationAssemblies) [0x00020] in :0
at AssemblyUpdater.Application.Program.CheckForObsoleteAPIUsage (AssemblyUpdater.Application.CommandLineSpec config) [0x0007a] in :0
at AssemblyUpdater.Application.Program.Main (System.String[ ] args) [0x00057] in :0
UnityEditor.Scripting.APIUpdaterHelper:smile:oesAssemblyRequireUpgrade(String)