title: Updating A asp.net website from .net 2.0 to .net 4.5
body: <p>My job was to add routing to a 2.0 site. I changed the framework in visual studio and coded what i need to and it ran great. Now I trying to move my changes to a staging area for testing before i go live and i am having a ton of trouble. </p>
  
  <pre><code>Server Error in '/' Application.
  
  Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.
  
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
  
  Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.
  
      Source Error: 
  
  
      Line 52: &lt;body&gt;
      Line 53:     &lt;form id="form1" runat="server"&gt;
      Line 54:     &lt;cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"&gt;
      Line 55:     &lt;/cc1:ToolkitScriptManager&gt;
      Line 56:     &lt;div class="pagewidth"&gt;
  
      Source File: c:\inetpub\webs\test\master\MasterPage.master    Line: 54 
  </code></pre>
  
  <p>When I changed the framework locally i noticed Visual Studio made alot of changes to my web.config behind the scenes. I have the .dll in the bin.
  I tired doing this <a href="http://forums.asp.net/t/1174924.aspx" rel="nofollow">http://forums.asp.net/t/1174924.aspx</a> but it did not seem to work. </p>
  
  <p>What i thought was interesting is i didn't see anything about AjaxControlToolkit in the original web config file. </p>
  
  <p>The Stack trace seems like it is a looking for <code>Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.</code>
  which i don't think i can access anymore now that i am 4.0? is that true?</p>
  
  <pre><code>Stack Trace: 
  
  
  [FileNotFoundException: Could not load file or assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.]
     System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) +0
     System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) +180
     System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) +192
     System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly&amp; lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType&amp; attributeType, IRuntimeMethodInfo&amp; ctor, Boolean&amp; ctorHasParameters, Boolean&amp; isVarArg) +115
     System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +426
     System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) +103
     System.Reflection.RuntimeAssembly.GetCustomAttributes(Boolean inherit) +33
     System.Web.UI.AssemblyCache.GetAjaxFrameworkAssemblyAttribute(Assembly assembly) +76
     System.Web.UI.ScriptManager.get_DefaultAjaxFrameworkAssembly() +399
     System.Web.UI.ScriptManager..ctor() +26
     AjaxControlToolkit.ToolkitScriptManager..ctor() +11
     ASP.master_masterpage_master.__BuildControlToolkitScriptManager1() in c:\inetpub\webs\test\master\MasterPage.master:54
     ASP.master_masterpage_master.__BuildControlform1() in c:\inetpub\webs\test\master\MasterPage.master:53
     ASP.master_masterpage_master.__BuildControlTree(master_masterpage_master __ctrl) in c:\inetpub\webs\test\master\MasterPage.master:1
     ASP.master_masterpage_master.FrameworkInitialize() in c:\inetpub\webs\test\master\MasterPage.master.cs:912308
     System.Web.UI.UserControl.InitializeAsUserControlInternal() +35
     System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +8963266
     System.Web.UI.Page.get_Master() +54
     System.Web.UI.Page.ApplyMasterPage() +15
     System.Web.UI.Page.PerformPreInit() +45
     System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +328
  </code></pre>
  
  <p>Has anyone experienced this problem before while upgrading frameworks? </p>