4

I like the new Add View dialog that was released with RC1. If you specify a view data class, it generates a scaffolded view for you. It seems to work fine with classes defined in projects within my solution. Some of my domain classes inherit from a base class that is defined in an external assembly (and referenced in my web project). I get an error when I specify one of these domain classes. Visual Studio is reporting a TypeLoadException on the external base class.

I did a little debugging with ProcMon and found that it was looking for the base class DLL in, among other places, a temporary folder. That folder did contain the DLL containing my derived domain model class. I did not see the base class's DLL. So for fun, I copied it there and voila, I could add the view.

Is this a bug?

2
  • Same here. Will u pls post the work-around here? Commented Feb 16, 2009 at 9:38
  • The work around I found was to put the external assembly in the temporary folder that ASP.NET is using while processing the dialog box. The way I found the temporary folder was to run the SysInternals Procmon utility to display the folders that are searched to find the assembly. Commented Feb 17, 2009 at 22:44

2 Answers 2

1

Yes this is a bug. Please file it on http://codeplex.com/aspnet

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. I see it has already been reported. Thanks. I was going to post my work-around, but I'm having problems logging in.
0

you actually forgot to add the Web.Config file on the View Folder. See this small article : http://www.graytechnology.com/Blog/post/ASPNET-MVC-strongly-typed-view-error-Could-not-load-type.aspx

It got me scratching my head quite a bit as well in my current project! :)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.