【发布时间】:2017-12-27 01:45:46
【问题描述】:
我使用的是 unity 2017.2,在构建 APK 文件时遇到了这个错误
ArgumentException: The Assembly System.Reflection.Emit is referenced by
Microsoft.AspNetCore.SignalR.Core
('Assets/Plugins/Microsoft.AspNetCore.SignalR.Core.dll'). But the dll is not
allowed to be included or could not be found.
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String
assemblyPath, System.Collections.Generic.List`1[T] alreadyFoundAssemblies,
System.String[] allAssemblyPaths, System.String[] foldersToSearch,
System.Collections.Generic.Dictionary`2[TKey,TValue] cache,
UnityEditor.BuildTarget target) (at
C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:152)
UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths,
System.String[] foldersToSearch, UnityEditor.BuildTarget target) (at
C:/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:192)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
我的项目需要使用 .Net 4.6。所以,我在播放器设置中改变了它。我在编辑器中单击播放时没有任何错误,但是当我想构建它时,这就是它失败的地方。
希望有人可以帮助我。谢谢
【问题讨论】:
-
您要运行服务器还是客户端?因为只有服务器端需要 Microsoft.AspNetCore.SignalR.Core。
-
我想运行客户端。那么,我需要从我的资产中删除这个 dll 吗?
-
不,你只需要
Microsoft.AspNetCore.SignalR.Client,它就会拉取所有的依赖。它不会拉取 Microsoft.AspNetCore.SignalR.Core,因为它是用于服务器的。 -
谢谢。我会尝试一下。会告诉你结果
标签: android unity3d asp.net-core-signalr