x


dll error when build

Hello

I am doing a project for school course credit. Teacher gave us a dll(so i don't have source code only dll) file with the engine (weather, temperature, location, etc). I drop this file into assets/scripts and make engine.cs file. When i hit play button everything working properly. But when i build unity project i gets such errors:

---------- ArgumentException: The Assembly Microsoft.VisualBasic is referenced by PodzespolyGazowni. But the dll is not allowed to be included or could not be found. UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary2 cache) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/AssemblyHelper.cs:52) UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary2 cache) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/AssemblyHelper.cs:55) UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/AssemblyHelper.cs:87) UnityEditor.HostView:OnGUI()


Error building Player: Extracting referenced dlls failed. UnityEditor.HostView:OnGUI()


Exception: Error building Player: Extracting referenced dlls failed. UnityEditor.BuildPlayerWindow.BuildPlayerWithDefaultSettings (Boolean askForBuildLocation, BuildOptions forceOptions) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPlayerWindow.cs:367) UnityEditor.BuildPlayerWindow.GUIBuildButtons (Boolean enableBuildButton, Boolean enableBuildAndRunButton, Boolean canInstallInBuildFolder) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPlayerWindow.cs:972) UnityEditor.BuildPlayerWindow.ShowBuildTargetSettings () (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPlayerWindow.cs:953) UnityEditor.BuildPlayerWindow.OnGUI () (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/BuildPlayerWindow.cs:726) System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/GUI/DockArea.cs:225) UnityEditor.HostView.Invoke (System.String methodName) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/GUI/DockArea.cs:218) UnityEditor.HostView.OnGUI () (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/GUI/DockArea.cs:119)

---------- turns out Edit > Project Settings > Player > Optimization change compatibility from ".net 2.0 subset" to ".net 2.0" does not work

copy dll into assest/Plugins does not work

restart unity and build without hiting play does not work

restart computer and build does not work

How to solve this errors?

more ▼

asked May 12 '12 at 11:39 PM

solmorth gravatar image

solmorth
0 1 1 2

(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

I download Microsoft.VisualBasic.dll and pasted it into assest folder. Naw everything works:)

more ▼

answered May 14 '12 at 11:49 AM

solmorth gravatar image

solmorth
0 1 1 2

(comments are locked)
10|3000 characters needed characters left

As far as I can tell, this is the only part of that error message that really matters:

ArgumentException: The Assembly Microsoft.VisualBasic is referenced by PodzespolyGazowni. But the dll is not allowed to be included or could not be found.

That's pretty clear language. I haven't run into that problem, personally, but here are some threads which might relate:

The most common suggestion seems to be checking your player settings; Unity sometimes compiles with a ".Net 2.0 subset", which is smaller but includes less stuff. There is an option detailed on that manual page which allows you to change this setting.

more ▼

answered May 13 '12 at 01:55 AM

rutter gravatar image

rutter
5.2k 2 11

(comments are locked)
10|3000 characters needed characters left

I read this Threads before I create my question. change compatibility from ".net 2.0 subset" to ".net 2.0" does not work

more ▼

answered May 13 '12 at 10:16 PM

solmorth gravatar image

solmorth
0 1 1 2

May 13 '12 at 10:31 PM rutter
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x4151
x231

asked: May 12 '12 at 11:39 PM

Seen: 1086 times

Last Updated: May 14 '12 at 11:49 AM