允许ILMerge未解析的程序集引用位

时间:2017-11-07 19:07:01

标签: c# msbuild ilmerge

我尝试通过MSBuild.ILMerge.Task使用ILMerge将我的项目转换为单个DLL。我的构建的输出是

1>------ Build started: Project: AdvancedRadioCommunication, Configuration: Release x64 ------
1>  Transitive merge
1>  Merged assemblies: C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\AdvancedRadioCommunication\obj\x64\Release\AdvancedRadioCommunication.dll;C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\packages\Discord.Net.Commands.1.0.2\lib\netstandard1.1\Discord.Net.Commands.dll;C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\packages\Discord.Net.Core.1.0.2\lib\net45\Discord.Net.Core.dll;C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\packages\Discord.Net.Rest.1.0.2\lib\net45\Discord.Net.Rest.dll;C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\packages\Discord.Net.Rpc.1.0.2\lib\net45\Discord.Net.Rpc.dll;C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\packages\Discord.Net.Webhook.1.0.2\lib\netstandard1.1\Discord.Net.Webhook.dll;C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\packages\Discord.Net.WebSocket.1.0.2\lib\net45\Discord.Net.WebSocket.dll;C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll;C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll;C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\packages\Microsoft.Extensions.DependencyInjection.Abstractions.1.1.1\lib\netstandard1.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll;C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\packages\Microsoft.Extensions.DependencyInjection.1.1.1\lib\netstandard1.1\Microsoft.Extensions.DependencyInjection.dll;C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll;C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll;C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\packages\System.Data.SQLite.Core.1.0.106.0\lib\net46\System.Data.SQLite.dll;C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\packages\System.Data.SQLite.EF6.1.0.106.0\lib\net46\System.Data.SQLite.EF6.dll;C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\packages\System.Data.SQLite.Linq.1.0.106.0\lib\net46\System.Data.SQLite.Linq.dll;C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\packages\System.Interactive.Async.3.1.1\lib\net45\System.Interactive.Async.dll;C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll;
1>C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\packages\MSBuild.ILMerge.Task.1.0.5\build\MSBuild.ILMerge.Task.targets(87,5): error : Unresolved assembly reference not allowed: System.Interactive.Async.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

错误为error : Unresolved assembly reference not allowed: System.Interactive.Async.

Merged assemblies列表中存在以下文件,我确认它已存在。

C:\Users\Brett.DESKTOP-5CJEEUH\source\repos\AdvancedRadioCommunication\packages\System.Interactive.Async.3.1.1\lib\net45\System.Interactive.Async.dll

1 个答案:

答案 0 :(得分:0)

尝试在

下安装软件包
Install-Package System.Interactive.Async -Version 3.1.1