title: Does .NET MVC work when System.Web.Mvc is loaded in the GAC?
body: <p><strong>Is it allowed to put System.Web.Mvc in the GAC? Allowed as in: does it work?</strong></p>
  
  <p>I have done this and all my projects have problems inheriting from System.Web.Mvc.ViewPage...</p>
  
  <p><strong>EDIT</strong>
  Hope this doesn't scare you:</p>
  
  <pre><code>C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE&gt; "c:\WINDOWS\Microsoft.NET\Framework\v3.5\vbc.exe" /t:library /utf8output /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\assembly\dl3\56b70440\003d6f34_8989c901\EntitySpaces.SqlServerCeProvider.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Abstractions\3.5.0.0__31bf3856ad364e35\System.Web.Abstractions.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\assembly\dl3\de7cc3b4\0097d136_8989c901\EntitySpaces.LoaderMT.DLL" /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\assembly\dl3\2afa6c79\006aa035_8989c901\EntitySpaces.NpgsqlProvider.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\assembly\dl3\4a9a547a\006aa035_8989c901\EntitySpaces.OracleClientProvider.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\assembly\dl3\ea5276d6\0051153a_699ec901\System.Web.Mvc.DLL" /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\assembly\dl3\f8843c3a\0097d136_8989c901\EntitySpaces.Web.Design.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\assembly\dl3\4137948d\003d6f34_8989c901\EntitySpaces.Npgsql2Provider.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\assembly\dl3\b72019d9\003d6f34_8989c901\EntitySpaces.MySqlClientProvider.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_global.asax.hiqvxvcm.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Data.Linq\3.5.0.0__b77a5c561934e089\System.Data.Linq.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\assembly\dl3\ad4567e4\006aa035_8989c901\EntitySpaces.Loader.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\assembly\dl3\b543038f\006aa035_8989c901\EntitySpaces.Core.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\assembly\dl3\701637c6\003d6f34_8989c901\EntitySpaces.VistaDBProvider.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_Web_vpbbzwke.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\assembly\dl3\66dcb3ba\006aa035_8989c901\EntitySpaces.Web.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Routing\3.5.0.0__31bf3856ad364e35\System.Web.Routing.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\EC\1.0.0.0__2fce90138e5217ab\EC.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\assembly\dl3\750052d7\716d39b6_bfd3c901\VandaagLijst.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\assembly\dl3\d5308498\003d6f34_8989c901\EntitySpaces.MSAccessProvider.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\assembly\dl3\5ad7a5b5\006aa035_8989c901\EntitySpaces.SqlClientProvider.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\assembly\dl3\54566418\003d6f34_8989c901\EntitySpaces.Interfaces.DLL" /out:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_Web_p7uswgud.dll" /debug- /win32resource:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\p7uswgud.res" /define:_MYTYPE=\"Web\" /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Specialized,System.Configuration,System.Text,System.Text.RegularExpressions,System.Web,System.Web.Caching,System.Web.SessionState,System.Web.Security,System.Web.Profile,System.Web.UI,System.Web.UI.WebControls,System.Web.UI.WebControls.WebParts,System.Web.UI.HtmlControls,System.Web.Mvc,System.Web.Mvc.Ajax,System.Web.Mvc.Html,System.Web.Routing,System.Linq,System.Collections.Generic,EC /warnaserror- /optionInfer+  "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_Web_p7uswgud.0.vb" "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_Web_p7uswgud.1.vb" "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_Web_p7uswgud.2.vb" "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_Web_p7uswgud.3.vb"
  </code></pre>
  
  <p>Microsoft (R) Visual Basic Compiler version 9.0.30729.1
  Copyright (c) Microsoft Corporation.  All rights reserved.</p>
  
  <p>C:\Bugging\VandaagLijst\VandaagLijst\Views\home\List.aspx(1) : error BC30456: 'Title' is not a member of 'ASP.views_home_list_aspx'.</p>
  
  <pre><code>        __ctrl.Title = ""
          ~~~~~~~~~~~~     
  </code></pre>
  
  <p>C:\Bugging\VandaagLijst\VandaagLijst\Views\home\List.aspx(1) : error BC30456: 'InitializeCulture' is not a member of 'ASP.views_home_list_aspx'.</p>
  
  <pre><code>        Me.InitializeCulture
          ~~~~~~~~~~~~~~~~~~~~
  </code></pre>
  
  <p>C:\Bugging\VandaagLijst\VandaagLijst\Views\home\List.aspx(1) : error BC30456: 'MasterPageFile' is not a member of 'ASP.views_home_list_aspx'.</p>
  
  <pre><code>        __ctrl.MasterPageFile = "~/Views/Shared/Site.Master"
          ~~~~~~~~~~~~~~~~~~~~~                               
  </code></pre>
  
  <p>C:\Bugging\VandaagLijst\VandaagLijst\Views\home\List.aspx(7) : error BC30456: 'AddContentTemplate' is not a member of 'ASP.views_home_list_aspx'.</p>
  
  <pre><code>        Me.AddContentTemplate("TitleContent", New System.Web.UI.CompiledTemplateBuilder(AddressOf Me.__BuildControlContent1))
          ~~~~~~~~~~~~~~~~~~~~~                                                                                                
  </code></pre>
  
  <p>C:\Bugging\VandaagLijst\VandaagLijst\Views\home\List.aspx(11) : error BC30456: 'AddContentTemplate' is not a member of 'ASP.views_home_list_aspx'.</p>
  
  <pre><code>        Me.AddContentTemplate("MainContent", New System.Web.UI.CompiledTemplateBuilder(AddressOf Me.__BuildControlContent2))
          ~~~~~~~~~~~~~~~~~~~~~                                                                                               
  </code></pre>
  
  <p>C:\Bugging\VandaagLijst\VandaagLijst\Views\home\List.aspx(13) : error BC30451: Name 'Model' is not declared.</p>
  
  <pre><code>       For Each item In Model
                          ~~~~~
  </code></pre>
  
  <p>c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_Web_p7uswgud.2.vb(42) : error BC30198: ')' expected.</p>
  
  <pre><code>    Inherits System.Web.Mvc.ViewPage(of IEnumerable(of Models.TestClass)
                                                                         ~
  </code></pre>
  
  <p>c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_Web_p7uswgud.2.vb(43) : error BC30154: Class 'views_home_list_aspx' must implement 'ReadOnly Property IsReusable() As Boolean' for interface 'System.Web.IHttpHandler'. Implementing property must have matching 'ReadOnly' or 'WriteOnly' specifiers.</p>
  
  <pre><code>    Implements System.Web.SessionState.IRequiresSessionState, System.Web.IHttpHandler
                                                                ~~~~~~~~~~~~~~~~~~~~~~~
  </code></pre>
  
  <p>c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_Web_p7uswgud.2.vb(43) : error BC30149: Class 'views_home_list_aspx' must implement 'Sub ProcessRequest(context As HttpContext)' for interface 'System.Web.IHttpHandler'.</p>
  
  <pre><code>    Implements System.Web.SessionState.IRequiresSessionState, System.Web.IHttpHandler
                                                                ~~~~~~~~~~~~~~~~~~~~~~~
  </code></pre>
  
  <p>c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_Web_p7uswgud.2.vb(55) : error BC30311: Value of type 'ASP.views_home_list_aspx' cannot be converted to 'System.Web.Mvc.ViewPage'.</p>
  
  <pre><code>        CType(Me,Global.System.Web.Mvc.ViewPage).AppRelativeVirtualPath = "~/Views/home/List.aspx"
                ~~                                                                                  
  </code></pre>
  
  <p>c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_Web_p7uswgud.2.vb(57) : error BC30456: 'ReadStringResource' is not a member of 'ASP.views_home_list_aspx'.</p>
  
  <pre><code>            Global.ASP.views_home_list_aspx.__stringResource = Me.ReadStringResource
                                                                 ~~~~~~~~~~~~~~~~~~~~~
  </code></pre>
  
  <p>c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_Web_p7uswgud.2.vb(61) : error BC30456: 'GetWrappedFileDependencies' is not a member of 'ASP.views_home_list_aspx'.</p>
  
  <pre><code>            Global.ASP.views_home_list_aspx.__fileDependencies = Me.GetWrappedFileDependencies(dependencies)
                                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~              
  </code></pre>
  
  <p>c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_Web_p7uswgud.2.vb(68) : error BC30456: 'Context' is not a member of 'ASP.views_home_list_aspx'.</p>
  
  <pre><code>            Return CType(Me.Context.Profile,System.Web.Profile.DefaultProfile)
                           ~~~~~~~~~~                                           
  </code></pre>
  
  <p>c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_Web_p7uswgud.2.vb(74) : error BC30456: 'Context' is not a member of 'ASP.views_home_list_aspx'.</p>
  
  <pre><code>            Return CType(Me.Context.ApplicationInstance,ASP.global_asax)
                           ~~~~~~~~~~                                     
  </code></pre>
  
  <p>c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_Web_p7uswgud.2.vb(193) : error BC30284: sub 'FrameworkInitialize' cannot be declared 'Overrides' because it does not override a sub in a base class.</p>
  
  <pre><code>    Protected Overrides Sub FrameworkInitialize()
                              ~~~~~~~~~~~~~~~~~~~  
  </code></pre>
  
  <p>c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_Web_p7uswgud.2.vb(195) : error BC30456: 'SetStringResourcePointer' is not a member of 'ASP.views_home_list_aspx'.</p>
  
  <pre><code>        Me.SetStringResourcePointer(Global.ASP.views_home_list_aspx.__stringResource, 0)
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                     
  </code></pre>
  
  <p>c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_Web_p7uswgud.2.vb(197) : error BC30456: 'AddWrappedFileDependencies' is not a member of 'ASP.views_home_list_aspx'.</p>
  
  <pre><code>        Me.AddWrappedFileDependencies(Global.ASP.views_home_list_aspx.__fileDependencies)
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                    
  </code></pre>
  
  <p>c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_Web_p7uswgud.2.vb(201) : error BC30284: function 'GetTypeHashCode' cannot be declared 'Overrides' because it does not override a function in a base class.</p>
  
  <pre><code>    Public Overrides Function GetTypeHashCode() As Integer
                                ~~~~~~~~~~~~~~~             
  </code></pre>
  
  <p>c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\24f69041\8efa8a35\App_Web_p7uswgud.2.vb(206) : error BC30284: sub 'ProcessRequest' cannot be declared 'Overrides' because it does not override a sub in a base class.</p>
  
  <pre><code>    Public Overrides Sub ProcessRequest(ByVal context As System.Web.HttpContext)
                           ~~~~~~~~~~~~~~             
  </code></pre>