MySql.Data.MySqlClient shows confusing error - vb.net

I'm using VS2019 and today I opened my project to continue working but a strange error occured that I really don't understand. The MySql.Data.MySqlClient namespace shows this:
and every mysql commands shows this error:
but when I start the debugging it's working fine i don't know whats causing this since I'm not very knowledgeable with programming. How do I get rid of this?

From your scenario it's bit unclear what exactly problem at your end. You could try couple of hacks though
Clean solution and rebuild your project
If that does not resolve your issue, try to remove dll reference "MySql.Data.MySqlClient" from reference and referring to latest documentation from Microsoft, import correct namespace again. Hope this helps you.

Related

BC30420 'Sub Main' was not found in 'quicktest4'. after finding that this error could be caused by a install fail I repaired visual studio

so I'm new to visual studio and I wanted to use the visual basic functionality of the program but when I try to compile and run my VB I get the BC30420 'Sub Main' was not found in 'quicktest4' error code. I looked around on the internet to see what could cause this and found that it could be and error with the install itself, knowing that I proceeded to use the repair function in the installer and got the same error. I've also tried deleting the entire program and reinstalling and got no change as well. I also read a post on this website saying that it could be something about the properties so I checked there and did not see anything out of place. Link: BC30420 'Sub Main' was not found error in a Windows Form app
Any help would be appreciated greatly, I really would like to actually start building stuff. this has been a two day ordeal so far.
If it involves adding code, please tell me where because this system is pretty foreign to me.
EDIT: Adding a screenshot of the quicktest code itself
code snippet
Check your properties. Sometimes it sets the initial form to main instead of form 1.

"Error Loading USE or USELSX" when trying to import Script Library

I get this error when trying to import a script library from my project.
The Script Library does not use Java and I'm not Turkish. Also, recompiling did not help and it is not LSX.
I even removed the whole code from it and still get the problem. What could be wrong?
Try restarting the Domino Designer.
We have this problem here sometimes and it usually does the trick. It is easy to forget the obvious things sometimes.

System.Runtime.Remoting.RemotingException on Windows store app

I'm a new on windows 8 store app development, I got annoying problem with this IDE first time after I installed it, everything works well but on the time I got this exception event there are no error on my code. I always got it with different number of exception but the message is completely same. Here are the picture :
what should I do to fix this thing?? I need your help, thanks
I received the same exception after updating to VS 13 Update 3. This solution worked for me:
Go to C:\Users\{user}\AppData\Local\Microsoft\VisualStudio\12.0\Designer\ShadowCache and delete all the contents in that folder.
Source: https://connect.microsoft.com/VisualStudio/feedback/details/797072/designer-crashes-in-visual-studio-2013-with-system-runtime-remoting-remotingexception
Try running Blend as an administrator. It sounds a bit like this issue.
If you are building a Windows 8 Store application, keep in mind that the System.Runtime.Remoting APIs are not available in WinRT. See MSDN for a listing of all the .NET APIs that are supported here: http://msdn.microsoft.com/en-us/library/windows/apps/br230232.aspx.
Try removing the remoting code and see if this resolves the problem.
I ran into this same issue when I started using a static object variable, where the object loaded images from resource. Somehow this tripped up Blend (perhaps garbage collection with static variables was getting confused).
To fix it I just moved that static object variable inside my Application class as a non-static member and accessed it via a public accessor function.
UPDATE - I also ran into this when one of my DependencyObject implementations was causing a stack overflow, updating one property when another changes and vice versa... Look for stack overflows.
Hope this helps someone!
I had this, right now. The reproducible cause was a crash of the Display-Driver triggered by my code. As this might only be the Display-Drivers fault, it might just needs fixing in the Display-Driver - for the meantime you can try to find the location causing the Display-Driver to crash and do a workaround. But the Display-Driver should not crash, whatever you throw at it. I see strange colours and splits in your screenshots. So I assume something makes your Display-Driver crash also.
I have been receiving the same error after updating Microsoft Visual Studio 2013 to Update 3
Designer works with a new project but removing the code in old projects does not work.
Deleting all folders in C:\Users{user}\AppData\Local\Microsoft\VisualStudio\12.0\Designer\ShadowCache worked for me...
The workaround posted by #pcnThird doesn't work anymore. The issue was resolved in Update 1 and subsequently in the latest Visual Studio 2013 Update 3.

Showdialog "Corruption" error vb.net after SQL use. Database MS Access

Ive searched on this error plenty, and have tried all the fixes i found.
Im making a document management system. And i have no prior vb experience, just figuring it out as i go. I have run into this problem now and i have no idea what the heck to do to fix it. I have narrowed it down to whats causing it but again not sure how i would change the root to solve the problem.
I have a showdialog that allows for documents to be added to the system. This works perfectly as long as i dont do any sql on the access database. As soon as I run a command on the access database (eg cmd.ExecuteNonQuery() or
Dim da As New OleDbDataAdapter(StrSQL, cnn)
da.Fill(ds, TableName)
dt = ds.Tables(TableName))
the program will error on showdialog and give me this error
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Ive tried recreating the form, i havnt yet tried reinstalling visual studio as it didnt make any difference in all the posts ive read, ive tried to recode the showdialog as well as the sql parts with no difference, ive changed compiler settings and set my .net framework to 4 (not client profile).
Nothing seems to work. Any help would be much appreciated thanks.
I can provide code if neccessary although im sure its quite ugly :)
That error is a strange one to get in VB.NET. It is more common in C# or unmanaged languages.
I can't tell you how to fix it but I can give you some pointers:
What version of .NET are you using? If it is not 2010 then try upgrading to this (you can compile your application to use a different framework if you need to)
Make sure you have all MS updates installed for Visual Studio. There were some fixes that addressed this error
Turn Option Strict On (not sure this will fix you issue but good practise anyway) and fix any resulting errors
It is not the ShowDialog that is causing the error, visual studio is just breaking at this point. Try setting a breakpoint on ShowDialog and step through your code using the F8 key to see exactly where the error occurs. That might give you more clues

vb.net compile error 'abc' is ambiguous in the namespace 'xyz'

I have a VB.Net solution that another developer created and I'm trying to compile it on our build machine (it compiles on their machine) but with one of the projects I get an error saying something along the lines of:
Imyinterface is ambiguous in the namespace anamespaceassembly.
I have tried with no success:
examined the references to see any obvious errors
removed and re-added the assembly in question
searched the system for the same dll
attempted to compile the original deve's src (.v the source control version)
examined the assembly with ildasm.exe
I usually code in C# and have not seen this error before (in this form at least), not that it is VB.Net specific but the UI for adding/viewing references is slightly different so I thought maybe VB.Net might do something different with references.
I also tried to compile on another machine, and it compiles ok. So I assume it is something with the build machine but I'm not sure what. Other conflicting assemblies somehow not referenced by the project, is that possible??
Any ideas?
Check your references if you have two versions of the same reference (eg. Microsoft.ReportViewer.Webforms version 10.0.0.0 and Microsoft.ReportViewer.Webforms 8.0.0.0) You will get this error. Delete the oldest and you should be good. I do this to myself all of the time.
There can be a few causes for this error. In VB, you should be aware that more names then you're used to from C# are available without class specification. Also, case does not matter in VB, which can further liken the chances on collisions.
Even in the event that you don't find the actual conflicting issue, you can resolve this in the same way you would in C#: rename it in the Imports statement:
Imports IM = yourAssembly.Imyinterface
Then change the code such that uses of Imyinterface are replace with IM.
NOTE: If the error does not point to a particular line, the conflict may be out of your hand. Normally, a full Clean Solution and Rebuild helps a lot, but occasionally a misbehaving file (i.e., another error) causes this error to popup first without clear source. Try to rollback recent changes to the place where it did work.
You also say it worked on another machine. Chances are that your machine is having a different version of MS Visual Studio or .NET. Check and compare the exact versions.
I was facing same issue. I upgraded my application from vb6 to vb.net and when i change the build configuration from DEBUG to RELEASE then i got AMBIGUOUS errors.
I found dulicate references folder in solution Explorer. I removed those duplicate referecnces and Build sucessfully. I Hope it may help others.
Thanks for the responses! I tried each but still was having issues.
One point of info I left out of the original question was that the VB.net projects are upgrades from VB6 projects. At the time I did not think that was relevant.
After investigating further the build machine was used to build the VB6 projects also. So I ran 'reg32 /u' on the vb6 dlls and that seemed to fix the VB.net issue.
Not exactly sure why this fixed it since I was not referencing the VB6 dlls, I'm guessing something to do with ambiguous entries in the registry confusing the vb.net project.