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

  • SEARCH
  • Home
  • 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 6188897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:18:51+00:00 2026-05-24T02:18:51+00:00

When I try using unit tests (Microsoft vs2010-embedded testing framework) with MVC3, all unit

  • 0

When I try using unit tests (Microsoft vs2010-embedded testing framework) with MVC3, all unit tests that instantiate a controller throw the following error:

Test method CleanTestMVC.Tests.Controllers.HomeControllerTest.About threw exception: 
System.Security.VerificationException: Operation could destabilize the runtime.

It seems to be not project-specific: I have created a new MVC3 project with an internet application template and the default auto-generated tests for it and those don’t run as well. I’ve tried recreating the problem on a colleague’s machine (identical settings) and his machine seem to create same issues.

No references or external libraries were added for those projects, but both computers do have TypeMock installed, although not referenced and disabled in the options (I’ve heard people blaming it for similar issues).

Could anybody please suggest something? A workaround and/or a potential cause? It is the first time I use MVC3 with unit testing and nobody around have ever worked with MVC3 and this is a “guinea-pig” project for it.

Thanks for the help!

Update: After trying it at my home PC everything works there even though I also have TypeMock (trial) installed.

Update 2: The stack trace for the problem:
System.Web.Mvc.Controller..ctor()
CleanTestMVC.Controllers.HomeController..ctor()
CleanTestMVC.Tests.Controllers.HomeControllerTest.About()

  • 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-05-24T02:18:52+00:00Added an answer on May 24, 2026 at 2:18 am

    Ok so in the end it turned out that the company had an older version of Typemock installed, which was incompatible with MVC3. Disabling Typemock through the Typemock->Disable Typemock didn’t actually “fully” disable it, it had to be unchecked in “tools/Addin Manager”. After updating Typemock to the latest version the problem is solved.

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

Sidebar

Related Questions

when i try to create unit tests using the unit test wizzard in visual
I'm developing a documentation testing framework -- basically unit tests for PDFs. Tests are
I am trying to run unit tests in Pydev using IronPython. When I try
We are using SQL 2005 and the try-catch functionality to handle all of our
I've begun using ASPUnit to unit test my classic ASP code. This is all
I am struggling to run unit tests using the Django Client class on the
I am trying to test a web service. My first try was using unit
I have been using MSpec to write my unit tests and really prefer the
I'm using Moq to write the unit tests for a project, and one of
I want to write some unit tests for an interceptor that intercepts the Loggable

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.