我的工作是将路由添加到 2.0 站点。我更改了 Visual Studio 中的框架并编写了我需要的代码,并且运行良好。现在,我试图在上线之前将我的更改移动到暂存区进行测试,但我遇到了很多麻烦。
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: <body>
Line 53: <form id="form1" runat="server">
Line 54: <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
Line 55: </cc1:ToolkitScriptManager>
Line 56: <div class="pagewidth">
Source File: c:\inetpub\webs\test\master\MasterPage.master Line: 54
当我在本地更改框架时,我注意到 Visual Studio 在幕后对我的 web.config 进行了很多更改。我在 bin 中有 .dll。我厌倦了这样做http://forums.asp.net/t/1174924.aspx但它似乎没有用。
我认为有趣的是我在原始 Web 配置文件中没有看到任何关于 AjaxControlToolkit 的信息。
堆栈跟踪似乎是一个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.
我认为我现在无法访问的查找,因为我是 4.0?真的吗?
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& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& 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
有没有人在升级框架之前遇到过这个问题?