Where is Mono.Data.Sqlite source code? - c#

I'm going through some problems with SQLite on Linux and I'd like to inspect Mono.Data.Sqlite source code, but it seems Mono's page on SQLite is outdated and does not point to Mono.Data.Sqlite code repository.
I've done my homework searching it at Google but with no success.
Am I missing something?

It is a class library within the Mono project : https://github.com/mono/mono
https://github.com/mono/mono/tree/master/mcs/class/Mono.Data.Sqlite

Related

Xamarin iOS native linking failed for grpc.core

I've been attempting to make grpc work (ssl http2) on Xamarin Forms and after some pain I managed to get it to work on Android using Grpc.Core. However I couldn't get iOS to compile. Working through this problem I was trying to get anything grpc related to work on iOS, and eventually found the grpc experimental xamarin demo, HelloworldXamarin. Found here:
https://github.com/grpc/grpc/tree/master/examples/csharp/HelloworldXamarin
I downloaded the solution, but when I try to compile it I get the following errors:
Error Text:
Native linking failed, undefined symbol: operator delete(void*). Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
Native linking failed. Please review the build log and the user flags provided to gcc: -LC:/g/examples/csharp/HelloworldXamarin/packages/Grpc.Core.2.23.0/build/Xamarin.iOS10/../../native/ios/universal -lgrpc_csharp_ext -force_load C:/g/examples/csharp/HelloworldXamarin/packages/Grpc.Core.2.23.0/build/Xamarin.iOS10/../../native/ios/universal/libgrpc_csharp_ext.a -LC:/g/examples/csharp/HelloworldXamarin/packages/Grpc.Core.2.23.0/build/Xamarin.iOS10/../../native/ios/universal -lgrpc -force_load C:/g/examples/csharp/HelloworldXamarin/packages/Grpc.Core.2.23.0/build/Xamarin.iOS10/../../native/ios/universal/libgrpc.a
linker command failed with exit code 1 (use -v to see invocation)
For the warning regarding not being able to find libgrpc_csharp_ext.a, I verified that the file was there.
There appears to be some issue with native linking, which I am very unfamiliar with. I'm using nearly the latest Visual Studio (well, 16.5.3), a mac build host with latest OS and XCode updated to latest. Didn't make any changes to the files pulled from git. I only just started working with Xamarin iOS this week, so everything should be in a fairly "default" state.
What could be wrong with my setup/system that makes this not work? I understand that this is an experimental feature still, but I can't tell if I've done something stupid or if there's been some change in something (like XCode? or it needing VS 2017?) that makes this no longer work? Is anyone else able to get this example to compile?
I've also tried newer versions of the grpc nuget packages and that only resulted in more errors.
Ultimately I'm trying to get latest Grpc.Core to work in iOS on Xamarin.Forms, though I have very little experience working with iOS. If there are issues with the latest versions of XCode/Visual Studio/Grpc.Core that are causing this, I'm willing to try to work through them, if someone can point me in the right direction.
It is not at all related to your versions or something that you did or didn't do.
First for some theory:
If someone wants to use Objective-C libraries or CocoaPods packages in their Xamarin project, they will need to create a binding library for this. Take it as some sort of a "bridge" between the native implementation and the later exposed C# code that you can use. You can learn more about the binding from the official documentation here and more specifically here.
To sum up the info - after the bindings have been created, you see a .lib or .a file. This is exactly what they have done - exposed some native code into the libgrpc_csharp_ext.a. Unfortunately, there are some bindings that are not correct. This is exactly what you are seeing here - the aftermath of an incorrect binding.
Looking a bit into the project I got to the following conclusions:
There is an open issue from May 2019 about this - https://github.com/grpc/grpc/issues/19172
Unfortunately, the issue is still active and there is no movement there.
I have confirmed that after version 1.21 (incl.) the build is not working. For now, you can downgrade to version 1.20.1 (last known to work). I have successfully built the solution with it. Please review the changelog and release notes for this specific version (if any) so that you know if it will fit your needs.
Basically, you have 2 options:
Downgrade to the last good version in order to use it;
If you want to use the latest version either wait for the issue to be fixed, or fork the repo and help with the fixing.
If you want to see their build script and help fix the issue, you can start from here.
Another useful resource is this video from the official Xamarin channel.

Install Microsoft.AspNet.Identity.EntityFramework.3.0.0-rc1-final into Class Library

I'm trying to create a class library for the new Microsoft Identity model but am being beaten back by an odd error.
If I create a regular C# Class Library (not a PCL) and attempt to install Microsoft.AspNet.Identity.EntityFramework.3.0.0-rc1-final via Nuget it goes so far, chokes, rolls back and then displays the following error:
Failed to add reference to 'System.Runtime'. Please make sure that it
is in the Global Assembly Cache.
I know that this is a pre-release version of the library but this cannot be such a radical idea that I'm trying to achieve here.
Any pointers greatly appreciated.
It seems to be a known issue and confirmed by Microsoft. It leads to this NuGet issue.
A workaround, according to the comments, is to install Microsoft.AspNetCore.Identity.EntityFrameworkCore, which is the RC2 equivalent. From what I can find this hasn't been officially released yet, and you might need to build from source.

XNA - Missing Namespace for Video and VideoPlayer?

Today I tried to include some videos for cutscenes but I failed on even getting the variables recognized.
If I try to access Microsoft.Xna.Framework.Media.Video or Microsoft.Xna.Framework.Media.VideoPlayer it is just missing.
.Media exists but Video/VideoPlayer is just not there
I also can't use "using Microsoft.Xna.Framework.Media;".
If I copy the exact same project to the example project on the Microsoft website it recognizes "Video" and "VideoPlayer" but of course everything else will not work cause of the wrong namespace, missing content and all that stuff.
I already reinstalled the complete SDK with XNA and .NET Frameworks but it still doesn't work.
If I create a new project and copy it there it doesn't work too, did I miss something?
Do I need something else except using Microsoft.Xna.Framework.Media.Video?
I compared the full projects but couldn't find any difference at all.
You are missing a reference to Microsoft.Xna.Framework.Video.dll.
That is where those two classes are located.
Sorry for late answer but this could be helpful..
You can try to install nuget package directxtk_desktop_2015 this will fix issue.
here is reference link.
It looks like your project is missing a reference to the assembly: Microsoft.Xna.Framework.dll.
UPDATE:
Kendall Frey is right, although Microsoft says in the documentation that the Video and VideoPlayer classes are in Microsoft.Xna.Framework.dll, this information is incorrect and these classes are really in Microsoft.Xna.Framework.Video.dll

Implementing C# compiler (Online) like compilr.com

Im working on creating a feature in a website, where people cah write C# code in the input box , and it can be compiled and results emitted.
Any resources or suggestions as to how to start with this.
The .Net framework has built in runtime compilers. They are in the System.CodeDom.Compiler namespace.
The other thing to consider is when you are compiling the code what assemblies you link in. If you link in an assembly the code you compile will have full access to that assembly and it will be compiled and running on your server.
Code compiled should be done in a sandbox. You can interface with the compiler through the command line.
http://msdn.microsoft.com/en-us/library/1700bbwd(v=vs.71).aspx
I'm using Microsoft.Build and Microsoft.Build.Framework in my online .Net IDE, Chpokk. Soon, Roslyn will be the way to go (I'm currently using it for Intellisense).

Missing "ADODB" assembly with Mono?

I'm trying to port some ASP.Net code to mono. I am testing it using xsp2. I compile it with Visual Studio also before running it with xsp2.
Whenever I go to a practically blank page in my application I get
Parser Error Message: Assembly ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A not found
I have searched and not found any info anywhere about this. I know the web application makes use of Webparts and the SqlPersonalization thing which is not supported in Mono, but I'm going to basically a blank page with a master page and getting this strange error.
And I have ran Moma and it only complained about web parts and SqlPersonalization, neither of which are on the page I'm trying to view(or referenced in any way).
What could be the problem here? Has someone hit a problem like this before? Also I'm using the latest version of Mono on Windows
ADODB is the primary interop assembly for the old Microsoft ActiveX Data Objects (ADO, aka MDAC) COM-based database access layer. Looks like the ASP.NET code you're trying to port uses an older, non-.NET data access library for some reason. I suspect that library doesn't, and never will, exist on Mono.
One solution would be to port the code that uses ADO to ADO.NET, if that's possible.

Categories