i'm begginer in xamarin, but i have to write app. I have to connect to MySQL and update some data. I have written code, whitch works in vs 2013 express, but in Xamarin i have error:
The type 'System.Data.Common.DbConnection' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. (CS0012)
What i can do to repair it? - change target framework?
i'm using Mysql.Data.dll
pls for quick answer :)
It says you need to add refference to System.Data. It is located in Xamarin Base Class Libraries. Use right click on Refferences "folder" in Xamarin Studio to add refference.
Related
Hi I am new to xamarin and have encountered some errors trying to migrate Xamarin to maui and I'm not sure how to solve. I understand that I am supposed to change the [Register] attribute on one of the C# types to a different Java type name. But how do I do that. Any advice would be appreciated.
Error XA4215 The Java type xamarin.essentials.fileProvider is generated by more than one managed type. Please change the [Register] attribute so that the same Java type is not emitted.
Error XA4215 xamarin.essentials.fileProvider generated by: Xamarin.Essentials.FileProvider, Xamarin.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Error XA4215 xamarin.essentials.fileProvider generated by: Microsoft.Maui.Essentials.FileProvider, Microsoft.Maui.Essentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
For me I was referencing https://github.com/jamesmontemagno/StoreReviewPlugin which automatically brings in Xamarin Essentials. I think that package needs to be updated to reference Maui Essentials.
Wonder if you have something similar in a package.
I am using .net Framework 4.5.2. I am running MVC application. As i got new laptop I am getting the issue when running the MVC Application.
ERROR:
The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
Microsoft Studio Professional 2017
Version : 15.9.12
In other teammates VS version is 15.8.1. Where it is running without any issue.
I have also installed MVC 4 and Missing plugins. Still, I am getting this issue.
please suggest to me what I need to do.
Thanks!
Deleting Bin and Obj folders worked for me.
I'm keep getting this irritating error when building my project on iOS platform. Is this has anything to do with the Xamarin updates?
How can I fix this? Thanks in advances
The main reason for this is because I use package Mono.Android inside my Core (PCL) project. Remove the package and this should do the trick.
First a little background:
I'm trying to write an app for Windows Phone (for home use, nothing commercial) to send data over bluetooth to an Arduino.
I'm using Visual Studio Comunity 2015, a Windwos Phone with 8.1 (Denim) and my PC is also Windows 8.1.
I had a hard time finding anything useful to use bluetooth on Windowws Phone for this kind of application and finally found this library :
BluetoothManager.cs
With the rest of the Github project I'm trying to understand and use it, but each time I get an error :
Exception thrown: 'System.Exception' in mscorlib.ni.dll
After using several breakpoints, I found the cause, which is Line 74 of the library.
When adding a watch for the variable pairedDevice, I get
error CS0012: The type 'IReadOnlyList<>' is defined in an assembly
that is not referenced. You must add a reference to assembly
'System.Runtime, Version=4.0.10.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'.
I tried several things the main answers of this question, but nothing worked.
Installing the fix from Microsoft changed nothing
I don't have an App.config or Web.config file (because it's WP8.1 ?)
Adding .dlls from the Facade-folder says that it's already referenced
Can somebody help me with this?
I tried to migrate a MvvmCross project to Unified API and got stuck at MvvmCross libraries, as soon as I add them, it fails to compile.
To recreate the issue I simply created a new Unified API empty project and added MvvmCross 3.5 NuGet package. Tried to compile and got these errors:
Setup.cs(8,23): error CS0012: The type 'System.Object' is defined in an assembly that is not referenced. Consider adding a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
DebugTrace.cs(9,27): error CS0012: The type 'System.Enum' is defined in an assembly that is not referenced. Consider adding a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
I'm using Xamarin Studio 5.8 for Mac with Xamarin.iOS 8.8.
Shouldn't this work out-of-the-box? Am I missing something?
EDIT: Created a new solution from scratch and it works as expected, so I guess it should be something related to the solution file.
It seems that deleting bin and obj folders and a Xamarin Studio restart did the trick. Now everything is worked as expected.