Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8724683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:52:52+00:00 2026-06-13T07:52:52+00:00

I am trying to test a Windows Phone 7.1 class library with NUnit and

  • 0

I am trying to test a Windows Phone 7.1 class library with NUnit and the standard console (GUI or not GUI) runner.

After my problem, related below I have found this one:
http://dotneteers.net/blogs/vbandi/archive/2012/08/08/using-nunit-to-test-windows-phone-7-applications-part-1.aspx

So I am almost sure this is a silly problem at my own.

Every time I try to load my assembly testing I get this error:

System.TypeLoadException: Cannot load type
‘System.Runtime.Versioning.TargetFrameworkAttribute’ from
assembly’mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089′.

For futher information, use the Exception Details menu item.

* Here ‘Details’ *

System.TypeLoadException…

Server stack trace: en System.ModuleHandle.ResolveType(Int32
typeToken, RuntimeTypeHandle* typeInstArgs, Int32 typeInstCount,
RuntimeTypeHandle* methodInstArgs, Int32 methodInstCount) en
System.ModuleHandle.ResolveTypeHandle(Int32 typeToken,
RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[]
methodInstantiationContext) en
System.Reflection.Module.ResolveType(Int32 metadataToken, Type[]
genericTypeArguments, Type[] genericMethodArguments) en
System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord
caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, Module
decoratedModule, MetadataToken decoratedToken, RuntimeType
attributeFilterType, Boolean mustBeInheritable, Object[] attributes,
IList derivedAttributes, RuntimeType& attributeType,
RuntimeMethodHandle& ctor, Boolean& ctorHasParameters, Boolean&
isVarArg) en
System.Reflection.CustomAttribute.GetCustomAttributes(Module
decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount,
RuntimeType attributeFilterType, Boolean mustBeInheritable, IList
derivedAttributes) en
System.Reflection.CustomAttribute.GetCustomAttributes(Assembly
assembly, RuntimeType caType) en
System.Reflection.Assembly.GetCustomAttributes(Type attributeType,
Boolean inherit) en
NUnit.Core.ActionsHelper.GetActionsFromAttributeProvider(ICustomAttributeProvider
attributeProvider) en NUnit.Core.TestAssembly..ctor(Assembly
assembly, String path) en
NUnit.Core.Builders.TestAssemblyBuilder.BuildTestAssembly(Assembly
assembly, String assemblyName, IList fixtures, Boolean autoSuites)
en NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName,
Boolean autoSuites) en
NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName,
String testName, Boolean autoSuites) en
NUnit.Core.TestSuiteBuilder.BuildSingleAssembly(TestPackage package)
en NUnit.Core.TestSuiteBuilder.Build(TestPackage package) en
NUnit.Core.SimpleTestRunner.Load(TestPackage package) en
NUnit.Core.ProxyTestRunner.Load(TestPackage package) en
NUnit.Core.ProxyTestRunner.Load(TestPackage package) en
NUnit.Core.RemoteTestRunner.Load(TestPackage package) en
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr
md, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInContext, Object[]& outArgs) en
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle
md, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInContext, Object[]& outArgs) en
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage
msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]: en
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg) en
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type) en NUnit.Core.TestRunner.Load(TestPackage
package) en NUnit.Util.TestDomain.Load(TestPackage package) en
NUnit.Util.TestLoader.LoadTest(String testName)

Somebody know what is the problem I’m not be able to find ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T07:52:53+00:00Added an answer on June 13, 2026 at 7:52 am

    I have found (in a very easy to explain way) what is the problem and what is the solution (or better said the alternative).

    The problem is that NUnit Console Runner (or GUI runner), execute under a different environment. I mean a Console Application or a Winforms application and then they try to load a Windows Phone library and that is the problem.

    The solution is execute the tests with Re-Sharper, NCrunch, Visual NUnit or something similar and NOT use NUnit default runners.

    I’m using Visual NUnit. http://visualstudiogallery.msdn.microsoft.com/c8164c71-0836-4471-80ce-633383031099

    🙂

    Regards and thanks to all people reading my question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to test a mobile website I'm building using Windows Phone 7, but
I'm trying to test a library that I've done (Calculus), in QTCreator for Windows.
I m trying to make one test app in windows phone 7.1 And I
In my windows form application, I'm trying to test the user's ability to access
I'm trying to show test run log (text file in a windows server) to
Im trying to test my successfully creates a new user after login (using authlogic).
I'm trying to connect to my phone from my Windows 7 PC using PySerial
I am trying to draw a rectangle on a windows mobile phone. Draw the
I'm trying out PhoneGap 1.4 on Windows Phone 7.5 using jQuery mobile (1.0.1.). Basic
I am currently trying to implement a serial port reader class using Windows (already

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.