Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by solmorth · May 12, 2012 at 11:39 PM · c#dll

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.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 cache) (at C:/BuildAgent/work/842f9557127e852/Editor/Mono/AssemblyHelper.cs:52) UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1 alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2 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?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by rutter · May 13, 2012 at 01:55 AM

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:

  • http://answers.unity3d.com/questions/51777/argumentexception-the-assembly-systemdeployment-is.html

  • http://answers.unity3d.com/questions/52190/cant-build-error-dll-is-not-allowed-to-be-included.html

  • http://answers.unity3d.com/questions/40306/cant-export-game.html

  • http://answers.unity3d.com/questions/30881/compiling-error-with-mysql-pls-help.html

  • http://answers.unity3d.com/questions/32548/problem-when-building-with-web-player.html

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by solmorth · May 13, 2012 at 10:16 PM

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

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image rutter · May 13, 2012 at 10:31 PM 0
Share

Found one more forum thread that might help: http://forum.unity3d.com/threads/105854-Compile-Unity-project-with-Visual-Basic-dll

avatar image
0

Answer by solmorth · May 14, 2012 at 11:49 AM

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

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by treknib · Sep 08, 2014 at 01:24 AM

I had the same problem with my own DLL's written in VB.net. I am using Unity 4.5.3f3 and solved it with the following:

  1. Downloaded MONO 3.2.3 at http://www.mono-project.com/download/#download-win

  2. Installed MONO

  3. Copied the file C:\Program Files (x86)\Mono-3.2.3\lib\mono\gac\Microsoft.VisualBasic\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll into the plugin folder of my unity project ("Assets\Plugins\X86" in my case)

Build&Run ... perfectly worked.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

How can I exclude unnecessary DLLs from my build? 2 Answers

How to link a class Library project in visual studio with my generated visual studio .sln unity project ? 1 Answer

MSSQL Connection and Select 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges