[英]Could not load file or assembly 'Microsoft.QualityTools.Testing.Fakes' or one of its dependencies
This happened in Visual Studio 2022 Community version.这发生在 Visual Studio 2022 Community 版本中。
System.IO.FileLoadException: Could not load file or assembly 'Microsoft.QualityTools.Testing.Fakes' or one of its dependencies. Access is denied. File name: 'Microsoft.QualityTools.Testing.Fakes'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString)
at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)
WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Tried to create deleting Fakes folder and rebuilding my solution.试图创建删除 Fakes 文件夹并重建我的解决方案。 Nothing.没有什么。 Created [HKLM\Software\Microsoft\Fusion.EnableLog] just gave more details of the error.创建 [HKLM\Software\Microsoft\Fusion.EnableLog] 只是提供了错误的更多详细信息。
Found out that my solution build attempted to create the microsoft.qualitytools.testing.fakes, but there was already a dll in the bin folder.发现我的解决方案构建试图创建 microsoft.qualitytools.testing.fakes,但 bin 文件夹中已经有一个 dll。 Deleted it and the build worked.删除它并且构建工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.