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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:30:04+00:00 2026-05-24T07:30:04+00:00

I’ve started using MvcContrib’s Portable Areas and everything works fine for the very simple

  • 0

I’ve started using MvcContrib’s Portable Areas and everything works fine for the very simple views, but when I want to use a custom model in my view i get the error saying the namespace doesn’t exist.

The view is set to be embedded as resource. And intellisense in the view recognizes the model just fine.

Does anybody have any idea what might cause the problem?

UPDATE

I think it might have to do with the fact that i’m using MEF to load the plugins. I had a similar problem when loading the controllers. I had to build a custom ControllerFactory that would look in the MEF Controllers list if no suitable controller was found by the default controllerfactory.

UPDATE 2

I managed to get rid of the error by providing the RazorBuildProvider with my MEF-loaded assemblies. However, now the view is not found anymore. If the view is not strongly typed it IS found.

    RazorBuildProvider.CodeGenerationStarted += (object sender, EventArgs e) =>
    {
        RazorBuildProvider provider = (RazorBuildProvider)sender;
        foreach (var module in ExternalComponents)
        {
            provider.AssemblyBuilder.AddAssemblyReference(module.GetType().Assembly);
        }
    };

Source Code

The Model

namespace Isis.Plugins.TextArea.TextArea.Models
{
    public class TextAreaModel
    {
        [Required(ErrorMessage = "Field is required")]
        public string Message { get; set; }
    }
}

The Controller:

namespace Isis.Plugins.TextArea.TextArea.Controllers
{
    [Export(typeof(IController))]
    public class IndexController : Controller
    {
        [HttpGet]
        public ActionResult Index()
        {
            return View(new TextAreaModel() { Message = "Hallow!" });
        }

        [HttpGet]
        public ActionResult Editor()
        {
            return View(new TextAreaModel() { Message = "EDITOR CONTENT" });
        }
    }
}

The View

@model Isis.Plugins.TextArea.TextArea.Models.TextAreaModel

@Model.Message

The error:

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

Compiler Error Message: CS0234: The type or namespace name 'Plugins' does not exist in the namespace 'Isis' (are you missing an assembly reference?)

Source Error:


Line 27:     
Line 28:     
Line 29:     public class _Page_Areas_TextArea_Views_Index_Index_cshtml : System.Web.Mvc.WebViewPage<Isis.Plugins.TextArea.TextArea.Models.TextAreaModel> {
Line 30:         
Line 31: #line hidden
  • 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-24T07:30:05+00:00Added an answer on May 24, 2026 at 7:30 am

    I eventually decided to place all the plugins in the Bin directory instead of a custom Plugins directory. It’s not the solution I was aiming for, but it works for now.

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

Sidebar

Related Questions

I want to count how many characters a certain string has in PHP, but
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I want to construct a data frame in an Rcpp function, but when I
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is

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.