noo*_*yte 5 .net azure etw-eventsource
我们正在使用EventSource nuget包,但是我们遇到了一个构建错误:
1>EXEC : error : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
1> LoaderException:
1> System.IO.FileLoadException: Cannot resolve dependency to assembly 'Microsoft.WindowsAzure.ServiceRuntime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
1>C:\Source\...\dev\packages\Microsoft.Diagnostics.Tracing.EventRegister.1.0.16\tools\Microsoft.Diagnostics.Tracing.EventRegister.targets(132,5): error MSB3073: The command ""C:\Source\...\dev\packages\Microsoft.Diagnostics.Tracing.EventRegister.1.0.16\tools\eventRegister.exe" -DumpRegDlls @"C:\Source\...\Debug\myDLL.eventRegister.rsp" "C:\Source\...\Debug\myDLL.dll" " exited with code 1.
Run Code Online (Sandbox Code Playgroud)
我们可以通过在Machine.Config(1.0.0.0到2.2.0.0)中转发程序集来解决这个问题,但这感觉就像是一个糟糕的'修复'.我不明白为什么EventRegister应用程序应该加载Azure Service Runtime,这对我来说没有意义.
可能有一个引用再次引用 Microsoft.WindowsAzure.ServiceRuntime 1.0.0.0。
我想到了 3 个解决方案:
| 归档时间: |
|
| 查看次数: |
1542 次 |
| 最近记录: |