Reputation: 13571
I am using MS's Azure VM's to take a look at VS 2015. I created a VB MVC project, made sure that the CodeDOM was set to use the Roslyn compiler and ran the project. It ran (and NameOf worked on the index page, so Roslyn is being used), but when I go to the registeration page I get this 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: BC30002: Type 'RegisterViewModel' is not defined.
Source Error:
Line 33:
Line 34: Public Class _Page_Views_Account_Register_vbhtml
Line 35: Inherits System.Web.Mvc.WebViewPage(Of RegisterViewModel)
Line 36:
Line 37: Public Sub New()Source File: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\94d5e9cd\9b4165f\App_Web_register.vbhtml.5f83eb8c.0ywcjbh3.0.vb Line: 35
Compiler Warning Messages:
Show Detailed Compiler Output:
Show Complete Compilation Source:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.81.0
Why am I getting this error, and why does it say that the framework version is 4.0, despite my having set the project to use 4.6?
Upvotes: 0
Views: 1780
Reputation: 13571
I don't have an answer as to why it references the 4.0 version of the framework, but the reason for the compilation failure was found behind the Compiler Warning Messages -- I had renamed the root namespace in the Project properties using the IDE but the web.config file in the View folder was not updated. I updated the namespace there and the app worked.
Upvotes: 1