Dotfuscator:找不到 Microsoft.AspNetCore.Hosting.Abstractions 版本=3.0.0.0
Dotfuscator: Couldn't find Microsoft.AspNetCore.Hosting.Abstractions Version=3.0.0.0
Dotfuscator
直到今天都运行良好。我不知道为什么。
我的项目类型是aspnetcore 3.0。使用以下命令发布:
dotnet publish --self-contained -c Release -r linux-x64
错误输出为:
[Build Output] Renaming...
[Build Output]
[Build Output] Updating Markup...
[Build Output]
[Build Output] Writing map file to C:\code\quant\Dotfuscated\Map_win.xml
[Build Output]
[Smart Obfuscation] User Type QuantWS.Startup was excluded from renaming by AspNetStartupRule for the following reasons: Type is an ASP.NET Core Startup Type.
[Build Output] Writing Assemblies...
[Build Output]
[Build Output] Couldn't load external type because its assembly can't be found: Microsoft.AspNetCore.Hosting.IWebHostBuilder,Microsoft.AspNetCore.Hosting.Abstractions, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
=== Pre-bind state information ===
C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\QuantWS.dll
LOG: DisplayName = Microsoft.AspNetCore.Hosting.Abstractions, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
LOG: Appbase = C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64
LOG: Processing DEVPATH.
LOG: DEVPATH not enabled. Falling through to regular bind.
LOG: Checking Cache
LOG: Assembly not found in cache.
LOG: Codebase not set.
LOG: Processing CodeBase
LOG: Checking Windows Kit Folder : C:\Program Files (x86)\Windows Kits.1\References\CommonConfiguration\Neutral
LOG: Probing C:\Program Files (x86)\Windows Kits.1\References\CommonConfiguration\Neutral\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits.1\References\CommonConfiguration\Neutral\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits.1\References\CommonConfiguration\Neutral\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits.1\References\CommonConfiguration\Neutral\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd LOG: Not found in Windows Kit Folder.
LOG: Checking Windows Kit Folder : C:\Program Files (x86)\Windows Kits\References
LOG: Probing C:\Program Files (x86)\Windows Kits\References\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Checking Windows Kit Folder : C:\Program Files (x86)\Windows Kits\References.0.17134.0
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.17134.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.17134.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.17134.0\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.17134.0\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Checking Windows Kit Folder : C:\Program Files (x86)\Windows Kits\References.0.17763.0
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.17763.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.17763.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.17763.0\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.17763.0\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Checking Windows Kit Folder : C:\Program Files (x86)\Windows Kits\References.0.18362.0
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.18362.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.18362.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.18362.0\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.18362.0\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Not found in Windows Kit Folder.
LOG: Checking AssemblyFoldersEx paths for runtime version v4.0.30319.
LOG: Probing C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.9\bin\plugins\Diagnostics\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.9\bin\plugins\Diagnostics\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Not Found in AssemblyFoldersEx paths.
LOG: Checking AssemblyFolders paths.
LOG: Probing C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files\IIS\Microsoft Web Deploy V3\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files\IIS\Microsoft Web Deploy V3\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Not Found in AssemblyFolders paths.
LOG: Checking Visual Studio AssemblyFolders paths.
LOG: Not Found in Visual Studio AssemblyFolders paths.
LOG: Looking in GAC
LOG: Assembly not found in GAC
LOG: Probing AppBase
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions.dll.deploy
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll.deploy
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions.exe
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.exe
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions.exe.deploy
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.exe.deploy
LOG: Probing Private Bin Path
LOG: Bin Path not set
LOG: Processing User Defined Assembly Load Path.
LOG: The User Defined Assembly Load Path is not set.
LOG: Checking Reference Assemblies folders.
LOG: Not found in Reference Assemblies folders.
LOG: Checking NuGet Folder : C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions.1.1\lib\netstandard2.0
LOG: Probing C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Probing C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Probing C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Checking NuGet Folder : C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions.2.0\lib\netstandard2.0
LOG: Probing C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Probing C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Probing C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Checking NuGet Folder : C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.app.runtime.linux-x64.0.0-preview7.19365.7\runtimes\linux-x64\lib\netcoreapp3.0
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.app.runtime.linux-x64.0.0-preview7.19365.7\runtimes\linux-x64\lib\netcoreapp3.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.app.runtime.linux-x64.0.0-preview7.19365.7\runtimes\linux-x64\lib\netcoreapp3.0\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.app.runtime.linux-x64.0.0-preview7.19365.7\runtimes\linux-x64\lib\netcoreapp3.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll LOG: Checking NuGet Folder : C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions.0.0\lib\netstandard2.0
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions.0.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions.0.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions.0.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Checking NuGet Folder : C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions.1.1\lib\netstandard2.0
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Not found in NuGet folders.
LOG: Checking additional folder : C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Checking additional folder : C:\Users\EDZ\AppData\Local\Temp\~QuantWS.8
LOG: Probing C:\Users\EDZ\AppData\Local\Temp\~QuantWS.8\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Users\EDZ\AppData\Local\Temp\~QuantWS.8\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Not found in additional folders.
LOG: Loose binding enabled. Probing for later versions.
当我在 Visual Studio 中查找 IWebHostBuilder
时,它在
C:\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref.0.0-preview7.19365.7\ref\netcoreapp3.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
。相同的文件也在发布输出目录中。但是 Dotfuscator 就是不能接受它们并说 Strong name match failed
。
直到今天都还好。如果我将项目降级到 aspnetcore 2.2,问题就会消失。有人可以帮忙吗?
注意:我是以Dotfuscator
开发者的雇员的专业身份回答的
Dotfuscator 会自动尝试在它知道的位置定位引用程序集,但 Microsoft 最近添加了一些新的(.NETCore 3.0 毕竟是预览版!)。未来的社区更新将添加这个自动解决此问题的新位置,但目前正确的解决方法是手动将新位置添加到程序集加载路径(您已经完成)。
在发布文件夹中加载程序集副本的问题似乎是由于完整框架处理非 Windows 程序集的问题,此限制应在未来的 Dotfuscator 更新中解决。
Dotfuscator
直到今天都运行良好。我不知道为什么。
我的项目类型是aspnetcore 3.0。使用以下命令发布:
dotnet publish --self-contained -c Release -r linux-x64
错误输出为:
[Build Output] Renaming...
[Build Output]
[Build Output] Updating Markup...
[Build Output]
[Build Output] Writing map file to C:\code\quant\Dotfuscated\Map_win.xml
[Build Output]
[Smart Obfuscation] User Type QuantWS.Startup was excluded from renaming by AspNetStartupRule for the following reasons: Type is an ASP.NET Core Startup Type.
[Build Output] Writing Assemblies...
[Build Output]
[Build Output] Couldn't load external type because its assembly can't be found: Microsoft.AspNetCore.Hosting.IWebHostBuilder,Microsoft.AspNetCore.Hosting.Abstractions, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
=== Pre-bind state information ===
C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\QuantWS.dll
LOG: DisplayName = Microsoft.AspNetCore.Hosting.Abstractions, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
LOG: Appbase = C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64
LOG: Processing DEVPATH.
LOG: DEVPATH not enabled. Falling through to regular bind.
LOG: Checking Cache
LOG: Assembly not found in cache.
LOG: Codebase not set.
LOG: Processing CodeBase
LOG: Checking Windows Kit Folder : C:\Program Files (x86)\Windows Kits.1\References\CommonConfiguration\Neutral
LOG: Probing C:\Program Files (x86)\Windows Kits.1\References\CommonConfiguration\Neutral\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits.1\References\CommonConfiguration\Neutral\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits.1\References\CommonConfiguration\Neutral\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits.1\References\CommonConfiguration\Neutral\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd LOG: Not found in Windows Kit Folder.
LOG: Checking Windows Kit Folder : C:\Program Files (x86)\Windows Kits\References
LOG: Probing C:\Program Files (x86)\Windows Kits\References\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Checking Windows Kit Folder : C:\Program Files (x86)\Windows Kits\References.0.17134.0
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.17134.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.17134.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.17134.0\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.17134.0\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Checking Windows Kit Folder : C:\Program Files (x86)\Windows Kits\References.0.17763.0
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.17763.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.17763.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.17763.0\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.17763.0\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Checking Windows Kit Folder : C:\Program Files (x86)\Windows Kits\References.0.18362.0
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.18362.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.18362.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.18362.0\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\Program Files (x86)\Windows Kits\References.0.18362.0\Microsoft.AspNetCore.Hosting.Abstractions.0.0.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Not found in Windows Kit Folder.
LOG: Checking AssemblyFoldersEx paths for runtime version v4.0.30319.
LOG: Probing C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.9\bin\plugins\Diagnostics\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.9\bin\plugins\Diagnostics\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Not Found in AssemblyFoldersEx paths.
LOG: Checking AssemblyFolders paths.
LOG: Probing C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files\IIS\Microsoft Web Deploy V3\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files\IIS\Microsoft Web Deploy V3\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Not Found in AssemblyFolders paths.
LOG: Checking Visual Studio AssemblyFolders paths.
LOG: Not Found in Visual Studio AssemblyFolders paths.
LOG: Looking in GAC
LOG: Assembly not found in GAC
LOG: Probing AppBase
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.winmd
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions.dll.deploy
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll.deploy
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions.exe
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.exe
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions.exe.deploy
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.exe.deploy
LOG: Probing Private Bin Path
LOG: Bin Path not set
LOG: Processing User Defined Assembly Load Path.
LOG: The User Defined Assembly Load Path is not set.
LOG: Checking Reference Assemblies folders.
LOG: Not found in Reference Assemblies folders.
LOG: Checking NuGet Folder : C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions.1.1\lib\netstandard2.0
LOG: Probing C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Probing C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Probing C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Checking NuGet Folder : C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions.2.0\lib\netstandard2.0
LOG: Probing C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Probing C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Probing C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.aspnetcore.hosting.abstractions.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Checking NuGet Folder : C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.app.runtime.linux-x64.0.0-preview7.19365.7\runtimes\linux-x64\lib\netcoreapp3.0
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.app.runtime.linux-x64.0.0-preview7.19365.7\runtimes\linux-x64\lib\netcoreapp3.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.app.runtime.linux-x64.0.0-preview7.19365.7\runtimes\linux-x64\lib\netcoreapp3.0\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.app.runtime.linux-x64.0.0-preview7.19365.7\runtimes\linux-x64\lib\netcoreapp3.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll LOG: Checking NuGet Folder : C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions.0.0\lib\netstandard2.0
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions.0.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions.0.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions.0.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Checking NuGet Folder : C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions.1.1\lib\netstandard2.0
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Probing C:\Users\EDZ\.nuget\packages\microsoft.aspnetcore.hosting.abstractions.1.1\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.ni.dll
LOG: Not found in NuGet folders.
LOG: Checking additional folder : C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64
LOG: Probing C:\code\quant\QuantWS\bin\Release\netcoreapp3.0\linux-x64\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Strong name match failed
LOG: Checking additional folder : C:\Users\EDZ\AppData\Local\Temp\~QuantWS.8
LOG: Probing C:\Users\EDZ\AppData\Local\Temp\~QuantWS.8\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Probing C:\Users\EDZ\AppData\Local\Temp\~QuantWS.8\Microsoft.AspNetCore.Hosting.Abstractions\Microsoft.AspNetCore.Hosting.Abstractions.dll
LOG: Not found in additional folders.
LOG: Loose binding enabled. Probing for later versions.
当我在 Visual Studio 中查找 IWebHostBuilder
时,它在
C:\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref.0.0-preview7.19365.7\ref\netcoreapp3.0\Microsoft.AspNetCore.Hosting.Abstractions.dll
。相同的文件也在发布输出目录中。但是 Dotfuscator 就是不能接受它们并说 Strong name match failed
。
直到今天都还好。如果我将项目降级到 aspnetcore 2.2,问题就会消失。有人可以帮忙吗?
注意:我是以Dotfuscator
开发者的雇员的专业身份回答的Dotfuscator 会自动尝试在它知道的位置定位引用程序集,但 Microsoft 最近添加了一些新的(.NETCore 3.0 毕竟是预览版!)。未来的社区更新将添加这个自动解决此问题的新位置,但目前正确的解决方法是手动将新位置添加到程序集加载路径(您已经完成)。
在发布文件夹中加载程序集副本的问题似乎是由于完整框架处理非 Windows 程序集的问题,此限制应在未来的 Dotfuscator 更新中解决。