This problem has been driving me crazy for the past week.
We have migrated our 3.5 Solution to 4.0 (started using EF4), no big issues here. i already been using Visual Studio 2010 Final for a while without any problem.
Migrated the solution, and associated third party assemblies to .net 4.0, and although run-time performance is in level with 3.5, launching the debugger is now taking about 2:30 to 3:00, on several good machines (Core i7, Core i5 Laptops and Phenom 4x Desktops with plenty of ram).
On 3.5 solution this all process took about 20-30 seconds!!, Lucky if we start the site without debugging and attach the debugger only afterwords there is no problem, and everything seems OK.
The output window i'm getting more than 4000 first time exceptions, that seem to be slowing the process down:
A first chance exception of type 'System.Globalization.CultureNotFoundException' occurred in mscorlib.dll
I have already debugged this exception and no conclusion, it seems that on CultureInfo method name = Resx, and obviously this is not a correct culture:
public CultureInfo(String name, bool useUserOverride) {
if (name==null) {
throw new ArgumentNullException("name",
Environment.GetResourceString("ArgumentNull_String"));
}
Contract.EndContractBlock();
// Get our data providing record
this.m_cultureData = CultureData.GetCultureData(name, useUserOverride);
if (this.m_cultureData == null)
throw new CultureNotFoundException(
"name", name, Environment.GetResourceString("Argument_CultureNotSupported"));
this.m_name = this.m_cultureData.CultureName;
this.m_isInherited = (this.GetType() != typeof(System.Globalization.CultureInfo));
}
Here is the stack trace:
> mscorlib.dll!System.Globalization.CultureInfo.CultureInfo(string name, bool useUserOverride) Line 264 + 0xef bytes C#
System.Web.dll!System.Web.HttpServerUtility.CreateReadOnlyCultureInfo(string name) + 0xb8 bytes
System.Web.dll!System.Web.UI.Util.IsCultureName(string s) + 0x84 bytes
System.Web.dll!System.Web.UI.Util.GetCultureName(string virtualPath) + 0x4a bytes
System.Web.dll!System.Web.Util.HashCodeCombiner.AddResourcesDirectory(string directoryName) + 0x18c bytes
System.Web.dll!System.Web.Util.HashCodeCombiner.AddResourcesDirectory(string directoryName) + 0x16c bytes
System.Web.dll!System.Web.Util.HashCodeCombiner.AddResourcesDirectory(string di开发者_如何学PythonrectoryName) + 0x16c bytes
System.Web.dll!System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDate2(System.Web.Compilation.StandardDiskBuildResultCache diskCache) + 0x13a bytes
System.Web.dll!System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDate(System.Web.Compilation.StandardDiskBuildResultCache diskCache) + 0x38 bytes
System.Web.dll!System.Web.Compilation.BuildManager.RegularAppRuntimeModeInitialize() + 0xaf bytes
System.Web.dll!System.Web.Compilation.BuildManager.Initialize() + 0x106 bytes
System.Web.dll!System.Web.Compilation.BuildManager.InitializeBuildManager() + 0xb8 bytes
System.Web.dll!System.Web.HttpRuntime.HostingInit(System.Web.Hosting.HostingEnvironmentFlags hostingFlags, System.Security.Policy.PolicyLevel policyLevel, System.Exception appDomainCreationException) + 0x15f bytes
System.Web.dll!System.Web.HttpRuntime.InitializeHostingFeatures(System.Web.Hosting.HostingEnvironmentFlags hostingFlags, System.Security.Policy.PolicyLevel policyLevel, System.Exception appDomainCreationException) + 0x3c bytes
System.Web.dll!System.Web.Hosting.HostingEnvironment.Initialize(System.Web.Hosting.ApplicationManager appManager, System.Web.Hosting.IApplicationHost appHost, System.Web.Configuration.IConfigMapPathFactory configMapPathFactory, System.Web.Hosting.HostingEnvironmentParameters hostingParameters, System.Security.Policy.PolicyLevel policyLevel, System.Exception appDomainCreationException) + 0x224 bytes
System.Web.dll!System.Web.Hosting.HostingEnvironment.Initialize(System.Web.Hosting.ApplicationManager appManager, System.Web.Hosting.IApplicationHost appHost, System.Web.Configuration.IConfigMapPathFactory configMapPathFactory, System.Web.Hosting.HostingEnvironmentParameters hostingParameters, System.Security.Policy.PolicyLevel policyLevel) + 0x1d bytes
[Appdomain Transition]
System.Web.dll!System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(string appId, System.Web.Hosting.IApplicationHost appHost, System.Web.Hosting.HostingEnvironmentParameters hostingParameters) + 0xfd1 bytes
System.Web.dll!System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(string appId, System.Web.Hosting.IApplicationHost appHost, System.Web.Hosting.HostingEnvironmentParameters hostingParameters) + 0x2f bytes
System.Web.dll!System.Web.Hosting.ApplicationManager.GetAppDomainWithHostingEnvironment(string appId, System.Web.Hosting.IApplicationHost appHost, System.Web.Hosting.HostingEnvironmentParameters hostingParameters) + 0x67 bytes
System.Web.dll!System.Web.Hosting.ApplicationManager.CreateObjectInternal(string appId, System.Type type, System.Web.Hosting.IApplicationHost appHost, bool failIfExists, System.Web.Hosting.HostingEnvironmentParameters hostingParameters) + 0x4d bytes
System.Web.dll!System.Web.Hosting.ApplicationManager.CreateObject(string appId, System.Type type, string virtualPath, string physicalPath, bool failIfExists, bool throwOnError) + 0x8d bytes
System.Web.dll!System.Web.Hosting.ApplicationManager.CreateObject(string appId, System.Type type, string virtualPath, string physicalPath, bool failIfExists) + 0x35 bytes
WebDev.WebHost40.dll!Microsoft.VisualStudio.WebHost.Server.GetHost() + 0x14b bytes
WebDev.WebHost40.dll!Microsoft.VisualStudio.WebHost.Server.OnSocketAccept(object acceptedSocket) + 0xa7 bytes
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(object state) Line 1507 + 0xb bytes C#
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) Line 441 + 0xe bytes C#
mscorlib.dll!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() Line 1486 + 0x22 bytes C#
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() Line 974 C#
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() Line 1341 + 0x5 bytes C#
- Have anybody had the same problem?
- Any ideas how to find the root cause of this exception (stack trace is not conclusive) or/and the performance degradation?
精彩评论