I used Visual Studio 2017 to create ASP.NET Web Forms with reference: MySql.data.dll. It works well on my Laptop. I upload all files on my server, I get Compilation Error
Compiler Error Message: CS0246: The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?)
Web Forms target Framework: 2.0. My server support ASP.NET version 2.0
I have done many ways that I can search. But nothing change.
The last, I tried change version MySql.Data.dll file, change version framework, use some free hosting to test, but same error
You need to install the MySql Connector/NET on the web server.
To solve this problem download MySql.Data.dll from
https://www.cryptool.org/trac/CrypTool2/export/2020/trunk/AppReferences/x64/MySql.Data.dll
Then right click on your project name, click on add reference and select MySql.Data.dll file
Related
UWP App not being able to work with MySql
I have made an app in UWP and instead of using SQLLite which seems to be the norm for Visual Studio 2015 I want to use MySql. I have already connected my Azure mysql database to Visual Studio via the 'Server Explorer'.
I'm using MySQL Workbench to update my tables within my connected database from Azure but I cannot actually write any code to access my tables as whenever I try to install MySql.data/.entity/etc in the NuGet Package Manager I get an error.
nuget error
I tried downloading the Mysql installer, the Mysql drivers for Ado and ODBC. I even tried downloading the MySql for Visual Studio option as I found out that Visual Studio is not compatibile with MySql and instead requires the MySql for Visual Studio download but I still have errors whenever I try to use MySql in my code as I need an assembly reference for it but I'm having no luck in being able to get one that doesn't error.
Does anybody have any idea how I could actually use MySql within Visual Studio 2015?
This is what I've been using as my guideline but I can't seem to get past the Mysql.data errors when installing.
http://web3.codeproject.com/Articles/1074242/Designig-your-Azure-MySQL-DB-with-a-UWP-Demo
I have seen a lot of people talk about this but there is no one straightforward fix (I've tried a lot of the fixes, one in particular being to use Vs13 to install Mysql in the Nuget package manager and then it should update within VS15 but as my app is a UWP VS13 does not actually load/read it so that idea isn't good to me, might help anyone else though)
Starting with 6.7, Connector/Net fully supports building Windows Store apps. But using Connector/Net RT is not by install the Nuget package, it just reference the MySql.Data.RT.dll assembly according to MySQL Connector/Net Developer Guide:
Using Connector/Net RT is easy. Simply create a Windows Store application using Visual Studio and then reference the MySql.Data.RT.dll assembly in your project. The code you write should be exactly the same as for normal Connector/Net (including using same namespace MySql.Data.MySqlClient) except for the differences listed above.
You may find this dll at C:\Program Files (x86)\MySQL\Connector.NET 6.79\Assemblies\RT if you have install the connector. You can also download the mysql-connector-net-6.7.9-noinstall.zip to find this file inside the folder. I also have a MySql UWP sample before and has the dll here. Right click your project and add reference for this it will work.
More details please reference this sample
i develop an Asp core web application (.net framework).
how i specify a run as 32-bit applications?
the publish wizard do not give way to change the Target Runtime, which the selected option is x64 is selected.
I installed on my machine the x86 version of .NET Core Installer.
publish wizard screenshot:
PS Why do I need x86.
I had to run the site on a computer that installed Microsoft Access 32-bit (2003, for an old software).
I also need to access data in Microsoft Access file, which requires me to use the Microsoft.Jet.OLEDB.4.0 driver.
The problem is, probably, that the app's core ASP.NET always running as 64-bit applications, is what gives me the known exception 'driver not registred'
stil after set "enable 32-bit application" in IIS.
i cant install the 64-bit access driver engine, because it requires the removal of MS Access 32-bit...
As mentioned here you need to add the "runtimes" key to your project.json file like below image.
Once you do this, the Target Runtime entry in Publish menu will list all of your specified runtimes. Although this is not enough to get it working since using the Publish menu and selecting x86 version will have no effect and will result in x64 binary files. (This bug may be fixed in future).
The workaround is to navigate to your project folder where the project.json resides. Open a command prompt and type the following to have your binary in desired runtime:
dotnet publish --runtime win7-x86
If you get any error yet, you may need to have the corresponding runtime installed (Download form here).
More info:
https://learn.microsoft.com/en-us/dotnet/articles/core/app-types
https://learn.microsoft.com/en-us/dotnet/articles/core/rid-catalog#what-are-rids
There is also a platform key under buildOptions listing all possible targets, but yet because of some issues (like #1624) it has no effect and it seems the system ignores that.
I'm getting this error message
BC30002: Type 'MySql.Data.MySqlClient.MySqlConnection' is not defined.
However, there is a MySql.Data.dll file within Bin and there is a reference to it in web.config. It is imported in the aspx.vb file too.
I should add that when running locally through Visual Studio this application works fine - all I've done is copied the files to a remote server and this message comes up
Does anyone have any ideas?
If you're using Mysql Connector you should reference to the same version of mysql connector dll file which is installed on remote computer.
I made an application in Visual Studio 2013 using VB.net that works with my MySql database.
the program compiles and runs well when invoked through visual studio. However, when I run the application in the debug folder, I get the following error.
I have.
copied the MySql.data dll to the C:\Windows\Microsoft.NET\assembly\GAC_MSIL\MySql.Data\v4.0_4.0.0.0__b77a5c561934e089
and referenced my project to that dll. -> Error does not go away.
i set local to true for this dll in VS -> Error does not go away.
Do you know how to solve this problem?
i had a similar problem. For your application to run, you need to install the MySQL DotNet Connector msi. here is the link https://dev.mysql.com/get/Downloads/Connector-Net/mysql-connector-net-6.9.8.msi. Download and install. Your application should now run ok
Anyone please help. I have a deadline and I am unable to connect to any Microsoft SQL Server on my development box. Not sure what happened but all of a sudden when I attempt to connect to any Microsoft SQL Server, I get the following error:
Could not load file or assembly
'System.Transactions, Version=2.0.0.0,
Culture=neutral,
PublicKeyToken=b77a5c561934e089' or
one of its dependencies. The module
was expected to contain an assembly
manifest. (System.Data)
Anyone PLEASE help! I am running Windows 7 x64 with Visual Studio 2008/2010, SQL Server Express 2008 R2
This can be caused by different kinds of issues.
You probably have classes that reference this assembly but you didn't add a reference to your project.
Or it can be more complicated as an example here.
Try running gacutil -I "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Transactions.dll"
System.Transaction should be part of .NET framework and it should be installed in the GAC. I suspect your update somehow removed it from the GAC.
Check to see if system.transaction is in the GAC.
Open Windows Explorer
Navigate to c:\windows\assembly
Check if System.Transaction is there
If not, you may need to reinstall the assembly into the GAC.
http://forums.asp.net/t/1145885.aspx/1?New+error+Could+not+load+file+or+assembly+