打包这个Unity3D的程序时出现错误(程序是由XML数据改成连接数据库):

ArgumentException: The Assembly System.Configuration is referenced by System.Data. But the dll is not allowed to be included or could not be found.
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List` alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary` cache) (at C:/BuildAgent/work/b0bcff80449a48aa/Editor/Mono/AssemblyHelper.cs:)
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List` alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary` cache) (at C:/BuildAgent/work/b0bcff80449a48aa/Editor/Mono/AssemblyHelper.cs:)
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List` alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary` cache) (at C:/BuildAgent/work/b0bcff80449a48aa/Editor/Mono/AssemblyHelper.cs:)
UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch) (at C:/BuildAgent/work/b0bcff80449a48aa/Editor/Mono/AssemblyHelper.cs:)
UnityEditor.HostView:OnGUI()

解决办法:

在player settings里将api capability level里的.Net 2.0 Sub 改成.Net 2.0就行了

05-02 11:54
查看更多