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 Chapi · Oct 23, 2014 at 06:38 PM · build-errormysql

MySQL Not Working Correctly After Build

On editor it works fine, but when I build or build and run I get this exception and it fails to establish a connection to MySQL server

 Platform assembly: D:\Build 9\game_Data\Managed\System.Configuration.dll (this message is harmless)
 TypeLoadException: Could not load type 'System.Configuration.Internal.ConfigurationManagerInternal, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
   at (wrapper managed-to-native) System.Type:internal_from_name (string,bool,bool)
 
   at System.Type.GetType (System.String typeName, Boolean throwOnError) [0x00011] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Type.cs:471 
 
   at System.Configuration.TypeUtil.CreateInstanceWithReflectionPermission (System.String typeString) [0x00000] in <filename unknown>:0 
 
   at System.Configuration.ConfigurationManagerInternalFactory.get_Instance () [0x00000] in <filename unknown>:0 
 
   at System.Diagnostics.DiagnosticsConfiguration.Initialize () [0x00000] in <filename unknown>:0 
 
   at System.Diagnostics.DiagnosticsConfiguration.get_Sources () [0x00000] in <filename unknown>:0 
 
   at System.Diagnostics.TraceSource.Initialize () [0x00000] in <filename unknown>:0 
 
   at System.Diagnostics.TraceSource.get_Listeners () [0x00000] in <filename unknown>:0 
 
   at MySql.Data.MySqlClient.MySqlTrace..cctor () [0x00000] in <filename unknown>:0 
 Rethrow as TypeInitializationException: An exception was thrown by the type initializer for MySql.Data.MySqlClient.MySqlTrace
   at MySql.Data.MySqlClient.Driver.Create (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) [0x00000] in <filename unknown>:0 
  
 (Filename: /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Type.cs Line: 471)


And the error when I try to use the MySQL connection that should be open by now

 InvalidOperationException: Connection must be valid and open.
   at MySql.Data.MySqlClient.ExceptionInterceptor.Throw (System.Exception exception) [0x00000] in <filename unknown>:0 
 
   at MySql.Data.MySqlClient.MySqlConnection.Throw (System.Exception ex) [0x00000] in <filename unknown>:0 
 
   at (wrapper remoting-invoke-with-check) MySql.Data.MySqlClient.MySqlConnection:Throw (System.Exception)
 
   at MySql.Data.MySqlClient.MySqlCommand.Throw (System.Exception ex) [0x00000] in <filename unknown>:0 
 
   at MySql.Data.MySqlClient.MySqlCommand.CheckState () [0x00000] in <filename unknown>:0 
 
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader (CommandBehavior behavior) [0x00000] in <filename unknown>:0 
 
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader () [0x00000] in <filename unknown>:0 
 
   at (wrapper remoting-invoke-with-check) MySql.Data.MySqlClient.MySqlCommand:ExecuteReader ()
 
   at MySQL.checkUser (System.String user, System.String password, System.Int32& userID) [0x00018] in C:\Users\Chapi\Documents\Survival Game\Assets\Scripts\MySQL.cs:61 
 
   at networkingScript.logIn (System.String user, System.String password) [0x00002] in C:\Users\Chapi\Documents\Survival Game\Assets\Scripts\networkingScript.cs:20 
 
   at mainMenu.ConnectWindow (Int32 windowID) [0x00099] in C:\Users\Chapi\Documents\Survival Game\Assets\Scripts\mainMenu.cs:92 
 
   at UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) [0x00076] in C:\BuildAgent\work\aeedb04a1292f85a\artifacts\StandalonePlayerGenerated\GUILayout.cs:413 
 
   at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x0005c] in C:\BuildAgent\work\aeedb04a1292f85a\artifacts\StandalonePlayerGenerated\GUI.cs:1402 
  
 (Filename: C Line: 0)


Any clue of whats causing this and how to fix it?

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

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Chapi · Oct 23, 2014 at 07:57 PM

Never mind, found the problem, if anyone is wondering, I had System.dll on my plugins folder so when it compiles I think it overrides the defualt System.dll making it unable to load System.configuration.dll subcomponent (I guess).

Comment
Add comment · Show 3 · 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 iriemaikus · Mar 25, 2015 at 03:49 PM 0
Share

I have the same problem. Could you more what you did? if I remove the system files it wont build

avatar image Daniel Neel · Apr 29, 2015 at 06:34 AM 0
Share

This fixed it for me. I had been receiving an exception related to: The type initializer for '$$anonymous$$ySql.Data.$$anonymous$$ySqlClient.Replication.Replication$$anonymous$$anager' until I removed System.dll.

avatar image xdragonxslayerx · Jul 14, 2016 at 10:09 AM 0
Share

when i removed system.dll my application is doesnt working.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers

Not Supported Exception occurs when building il2cpp + MySql application 0 Answers

How can I stop the variable values reverting to its default values after being built? 1 Answer

Character Model Works in Editor but Distorts in the Build 0 Answers

Tizen build error 0 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