1
我們有超過1000個單元測試。前一段時間,他們中的18個與其他測試一起運行時開始失敗。這些測試運行一個Windows工作流程。錯誤:運行單元測試時編譯鎖定
如果他們單獨運行,他們會通過。
- 該錯誤似乎是它無法找到連接字符串。
- 它無法找到連接字符串,因爲它不知道看哪個配置文件。
- 它不知道看哪個配置文件,因爲它無法找到應用程序上下文
- 它不能找到應用程序上下文由於編譯鎖定。
任何人有任何想法可能是錯的,以及如何解決這個問題?我得到的錯誤是:
Message: Exception message: The
supplied connection string is not
valid, because it contains
insufficient mapping or metadata
information. Parameter name:
connectionString Inner exception :
System.InvalidOperationException:
Unable to determine application
context. The ASP.NET application path
could not be resolved. --->
System.Reflection.TargetInvocationException:
Exception has been thrown by the
target of an invocation. --->
System.Web.HttpException: The type
initializer for
'System.Web.Compilation.CompilationLock'
threw an exception. --->
System.TypeInitializationException:
The type initializer for
'System.Web.Compilation.CompilationLock'
threw an exception. --->
System.NullReferenceException: Object
reference not set to an instance of an
object. at
System.Web.Compilation.CompilationLock..cctor()
--- End of inner exception stack trace --- at System.Web.Compilation.CompilationLock.GetLock(Boolean&
gotLock) at
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
感謝
西拉