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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:03:49+00:00 2026-05-24T06:03:49+00:00

We have an existing MVC application that we’re building using TeamCity and things were

  • 0

We have an existing MVC application that we’re building using TeamCity and things were going great until we needed to start building a different MVC 3 application on the same build server…

After installing MVC 3, the first build error we starting receiving in the MVC 2 project was:

T4MVC.cs(112, 11): error CS0012: The type 'System.Web.WebPages.Razor.WebRazorHostFactory' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
T4MVC.cs(112, 11): error CS0012: The type 'System.Web.WebPages.StartPage' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

OK, no problem. I added these assemblies as references, and then received a different error:

CustomViewEngine.cs(44,9): error CS1502: The best overloaded method match for 'System.Web.Mvc.WebFormView.WebFormView(System.Web.Mvc.ControllerContext, string)' has some invalid arguments

So at this point, I think I’m on the stairway to heck, and I’ve reverted my changes. The underlying problem seems to be T4 noticing that MVC 3 is available, and is using MVC 3 instead of MVC 2. Could this be the case? If so, how do I fix this? There doesn’t seem to be a way to specify MVC 2 in the T4 settings file.

I’m not the developer who usually mucks around in T4, so I’m feeling a bit lost a this point!

Of course, everything is building fine locally on my workstation.

Any advice would be greatly appreciated!

  • 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-24T06:03:50+00:00Added an answer on May 24, 2026 at 6:03 am

    OK, I found the problem.

    In the MVC 2 project, the reference to System.Web.Mvc had ‘Specific Version’ set to false. This is a little unsettling since the default value for Specific Version is true for an MVC 2 project. I’m sure Mercurial will help me point the finger at someone determine the source of this error.

    Apologies all around to any T4 gurus who looked at this question because I included the T4 tag originally!

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

Sidebar

Related Questions

First some brief background: I have an existing ASP.NET MVC 1 application using Entity
I have an existing asp.net web application that I'm updating to include some MVC
I have an existing ASP.NET web application that I'm converting to MVC 1.0. The
I have an ASP.NET MVC 4 application that needs to use an existing API
I have an existing ASP.NET MVC 2 application that I've been asked to extend.
Curious what recommendations anyone has. I have an existing asp.net forms application that does
I have an existing ASP.NET MVC application with some sample data in the SQL
I have an ASP.NET MVC web application that implements a custom membership provider. The
I have an existing asp.net mvc website that uses basic forms authentication. The site
I'm new to DDD. I have an existing ASP.NET application (not MVC) and I

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.