-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't create SqlParameter in EF Core 3.1.2 in Xamarin.Android application or execute any SQL Query for MS SqlServer #4454
Comments
It seems like the relevant difference between EF Core 2.2.6 and 3.1.2 is they switched from using It looks like their intent is for EF Core to support Xamarin: https://docs.microsoft.com/en-us/ef/core/platforms/, so this seems like a bug on their end (which you have filed). Let's leave this open while they complete their investigation and if they find an issue on our end we can tackle it. |
I've been digging around this issue from SqlClient side, I'm confused about the below:
|
There's a couple of tricky factors here:
This scenario seems to be the main reason behind creating the new I'm a bit out of my league here with how this works in Xamarin/Mono. @marek-safar: could you please tag someone who is familiar enough with the status of Mono's BCL to assist here? |
We suspect this issue is stale and no longer relevant. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process. |
This issue will now be closed since it had been marked |
Steps to Reproduce
Expected Behavior
Project starts without any exceptions.
Actual Behavior
Throwing exception in the function
OnStart()
in the file App1.xaml.cs when project runs.First exception is thrown on line 33: App1.xaml.cs#L33. Note, it even thrown if database even not exists, because it is not accessed before that line of code.
If you comment that line which throws exception, you will get more exceptions in the same function when retrieving data from SQL Database. I used Azure DB.
Version Information
Visual Studio 2019 Community Edition, I tried 16.3.4 and 16.4.6.
OS: Windows 10
Additional info
Initially I had a project with EF Core 2.2.6 which worked fine. It is also also available on github: AndroidXamarinEFCore226
I was not able to upgrade it to EF Core 3.1.2.
In fact I am not able to create any Xamarin Android project with EF Core 3.1.2 support which uses SQL Server. At the same time I was able to make it work with SQLite.
So because of this I created the following ticket in
SqlClient
project: Can't create SqlParameter in EF Core 3.1.2 in Xamarin.Android application #467Thank you
The text was updated successfully, but these errors were encountered: