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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:59:59+00:00 2026-05-13T05:59:59+00:00

I am working with an ASP.NET MVC project which was originally started from the

  • 0

I am working with an ASP.NET MVC project which was originally started from the CodeBetter.Canvas project – and I’m trying to move to ASP.NET MVC 2. I successfully upgraded my project using Eilon’s upgrade tool, moved to VS2010 (although not yet to .NET 4).

The issue I’m having currently is only occurring when using the spark view engine. Here is the relevant bit of code in my View.spark (strongly typed):

${Html.EditorFor(e => e)}

The same bit of code works just fine if I use an .aspx view:

<%= Html.EditorFor(e => e) %>

The major point here being “EditorFor” is new in ASP.NET MVC 2 and in my project I can use that helper in an ASPX view but not a Spark view.

I’ve tried upgrading Spark to use MVC 2 (as well as MvcContrib and Ninject), thinking maybe it was one of those that was freaking out – but so far no luck – I’m still seeing the same behavior.

Here is the full error message that is thrown from within Spark’s BatchCompiler class.

Dynamic view compilation failed.
(0,0): warning CS1701: Assuming
assembly reference ‘System.Web.Mvc,
Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35’
matches ‘System.Web.Mvc,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35’, you
may need to supply runtime policy
c:\inetpub\wwwroot[myproject]\CodeBetter.Canvas.Web\Views[MyEntity]\View.spark(9,16):
error CS1061:
‘System.Web.Mvc.HtmlHelper’ does not
contain a definition for ‘EditorFor’
and no extension method ‘EditorFor’
accepting a first argument of type
‘System.Web.Mvc.HtmlHelper’ could be
found (are you missing a using
directive or an assembly reference?)

Here is the Spark related code in my Global.asax:

var settings = new SparkSettings()
.AddNamespace("System")
.AddNamespace("System.Collections.Generic")
.AddNamespace("System.Web.Mvc")
.AddNamespace("System.Web.Mvc.Html")
.AddNamespace("MvcContrib.FluentHtml")
.AddNamespace("CodeBetter.Canvas")
.AddNamespace("CodeBetter.Canvas.Web")
.SetPageBaseType("ApplicationViewPage")
.SetAutomaticEncoding(true);

#if DEBUG
    settings.SetDebug(true);
#endif

var viewFactory = new SparkViewFactory(settings);
ViewEngines.Engines.Add(viewFactory);

Also, I am referencing System.Web.Mvc.Html in my spark view as mentioned in another SO answer.

<use namespace="System.Web.Mvc.Html" />
  • 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-13T05:59:59+00:00Added an answer on May 13, 2026 at 5:59 am

    The underlying issue is that a version 1.0.0 assembly is still being referenced somewhere in the project.

    Using reflector to examine each assemblies dependencies, I found (if you’re starting with CodeBetter.Canvas project) there are three dependent projects that need to be updated to use the 2.0.0 version of system.web.mvc.dll

    1. Spark. Download the latest version
      of spark from teamcity and use the
      spark.web.mvc2.dll (which references
      system.web.mvc.dll 2.0.0) Link to detailed instructions.

    2. MVCContrib. Download the latest version
      of MVCContrib (download release, download source) which references the
      system.web.mvc.dll 2.0.0.

    3. Ninject. Download the latest version of
      ninject
      and recompile the VS solution
      after updating the reference to the 2.0.0
      version of system.web.mvc.dll

    Now, replace these dependency’s assemblies in your project and update the project references if necessary. All should be well.

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

Sidebar

Related Questions

I'm working on an ASP.Net MVC 3 project, which needs localized error messages from
I'm working on an ASP.NET MVC project which uses the MarkdownDeep Editor to add
I'm working on an ASP.NET MVC 2 / .NET 3.5 project which includes SSRS
I am working on an ASP.NET MVC project which allows users to construct arbitrarily
When working with asp.net MVC 3, the default website which is installed from the
I am currently working on a ASP.NET MVC 3 project in which I have
I am currently working on a ASP.NET MVC 3 project in which I need
I am working on an ASP.NET MVC project and I am trying to get
I am working on a project which is a ASP.NET MVC project. Now I
I'm working on a Web project using Asp.Net MVC, which I'll have to deploy

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.