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 8401965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:56:14+00:00 2026-06-09T21:56:14+00:00

Just like this guy , I didn’t create a unit test project for my

  • 0

Just like this guy, I didn’t create a unit test project for my MVC 4 project when it was first created. Now I want to go back and add one.

To that end, I created a new Unit Test Project.

Now, I right-click on a private method in one of my controllers, select Create Unit Tests, and get a popup dialog asserting:

Unit Test Generation Error: The following error was encountered while reading module
‘My.Project’: Could not resolve the type reference: [System.Web.Mvc, Version 3.0.0.0,
Culture=neutral, PublicKeyToken={why doesn’t MS support cut and
paste??}]System.Web.Mvc.AllowAnonymousAttribute.

AllowAnonymousAttribute is new to MVC 4. Why is the Unit Test Generator trying to resolve against the MVC 3 assembly though?

My.Project compiles and runs just fine, AllowAnonymousAttribute and all, and clearly is reverencing System.Web.Mvc, Version 4.0.0.0.

UPDATE

MyMvc.csproj contains

<Reference Include="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
  <Private>True</Private>
  <HintPath>..\packages\AspNetMvc.4.0.20126.16343\lib\net40\System.Web.Mvc.dll</HintPath>
</Reference>

The DLL at HintPath is confirmed to be version 4.0.0.0

MyMvc.Test.csproj contains

<Reference Include="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
  • 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-09T21:56:15+00:00Added an answer on June 9, 2026 at 9:56 pm

    This is no longer an issue in VS2012.

    VS2012 no longer supports the add unit test wizard. Manually added unit tests work fine.

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

Sidebar

Related Questions

My HTML text is just like this: <p>abcdefghijklmnopqrstuvwxyz</p> What I want is to display
Ok, so this has me completely stumped just like the guy here with the
I make a call just like this: value = ./simulated_annealing Which is a C
I have a CSV file formatted just like this: name,color,tasty,qty apple,red,true,3 orange,orange,false,4 pear,greenish-yellowish,true,1 As
I am developing an UI(Home screen) just like this screen given in this link
I'm creating a stacked bar chart just like this one . Notice that the
Is there anything like this outside of the application delegate? I would just like
Just like in this topic , I have a performance issue in dev mode
I'd just like to change this cc211_AMBER_13062012i.II cc211_GROMOS_13062012i.II cc211_CHARM_13062012i.II cc211_OPLS_13062012i.II to cc211_AMBER_15062012i.II cc211_GROMOS_15062012i.II cc211_CHARM_15062012i.II
I would like copy just file.xml without folder structure using overlays like this: <overlays>

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.