How can I deploy SQLite in WinRT devices with an ARM CPU? - sqlite

I'm developing a C# Window8 / WinRT app and I'm using SQLite-NET with the sqlite3.dll linked at the bottom of the documentation at
https://github.com/praeclarum/sqlite-net
My project works fine on my computer, but since sqlite is a non-managed DLL, I wonder what's going to happen when I deploy my app to the app store and someone with an ARM cpu tries to run it. Is it going work? If not, how can I make it work?
Thanks,
Adrian

No, it's not going to work. You cannot choose a neutral architecture (Any CPU) when there is a C++ component involved. You will have to compile your SQLite DLL into ARM in order for you to have an ARM version. If you have a native component, you will submit multiple versions for the Store and the customer will download the correct version for their architecture.
Good blog post on Windows on the ARM architecture.

The only thing I know is that Microsoft is working with guys from SQLLite and is now officially supported

Related

Can we build a Xamarin based android system application in visual studio or Android studio IDE?

I want build and debug a xamarin based "SYSTEM" android application in visual studio. Is it doable?
Yes it is doable, therefore you need this:
Xamarin.Android 7.5 or later
Android Studio 3.x with Java 1.8
More information how to set up the system you can find here.
Here is some basic information from MSDN that you can start with for distributing your Xamarin.Android app as a System app.
It's difficult to provide specifics on this topic because the way you go about doing this can shift dramatically depending on your setup. Even MSDN states that. The article provided though is a great starting point to begin to understand how to go about installing your app as a system app.

How do I build a native binary on .NET Core using the current preview?

Using the current .NET Core preview, how do I compile (Publish ?) a native binary for a console application. I am on Mac OS 10.11.
I did the following:
dotnet new
dotnet restore
dotnet publish
I kind of expected "publish" to build a native binary for me, but it did not. It places a .dll, along with some JSON, in the publish folder ? I should mention the application runs fine when using dotnet run.
So, how do I get a native binary for my simple console application ?
According to an MS dev on the Slack channel, native compilation was removed/disabled in RC2 since it wasn't deemed ready yet.
There does seem to be a little bit of interest in it, so I've been debating whether to try to get it running myself, from the CLI source.
Otherwise, we'll just have to wait, but I agree, huge disappointment.
EDIT: just for completeness, I should add that .NET Core and .NET Native are available for UWP / Windows Store apps, though obviously this is not cross-platform.
EDIT #2: since this seems to continue to be getting attention, the new way that this is planned on being done is CoreRT, currently in active development.

Can we compile an asp.net 5 application by .net native?

The role of .net native in .net ecosystem is confusing for me. I heard it is just for universal windows applications, but also heard that it is part of CoreFX. I think having the option to compile to .net native can have many advantages (including performance).
Is it possible to compile my asp.net application (specially asp.net 5) to .net native?
No, you cannot. Right now, .NET Native is not for ASP.NET. I believe it's only for Universal Windows Applications. That doesn't mean that one day it won't be available, but right now it's not planned.
See related GitHub issue where ASP.NET team confirms this.
Edit 11/27/2015
Since this was posted, Microsoft has made further announcements regarding .NET Native and .NET Core. I suggest you check out Scott Hanselman's part of the keynote from the Microsoft Connect 2015 event. At the 11:22 minute mark of this excerpt video Scott shows compiling an .NET app to native code and then running it. He says it's "future work" so it appears it's not quite ready yet (I believe one of the Q&A videos from the event explained that it's in one of the dev branches on GitHub, but I'm too lazy to rewatch all the videos for you at the moment). It was unclear if this is only working for console apps at the moment or if it will run ASP.NET.
As Thomas says in comments, this should be possible once LLILC is out. It targets .NET Core which is what ASP.NET 5 runs on. I am not sure if the resulting runtime can be called .NET Native per say but LLILC do has plans to natively compile IL (e.g. output by Roslyn) ahead-of-time.
Another option is ASP.NET running on CoreRT by using RyuJIT as AOT compiler. This looks closer to reality today than LLILC. Have seen some experiments in compiling ASP.NET project on CoreRT but nothing that actually works.
[.NET Native makes use of UTC compiler which compiles to run on some C++ runtime (MRT - either minimal runtime or managed runtime, cant remember, also known as Native runtime). Currently the .NET Native UWP apps are windows specific. Though .NET Native and UWP are advertised under .NET Core, this could be misleading as only in debug mode UWP targets CoreCLR, in release mode it targets native runtime which is Windows specific. LLILC/CoreRT should change that.]

Embedded database for a simple portable application

I am going to develop small WPF application. Target platform is .NET 3.5. The main goal is to make it portable (move to any folder and it works out of the box). It should run on Windows 7 machine without any additional installations. However I need a database into it (not need ORM support, just simple storage). Could you please suggest database that would be better for this purpose? I think about SQL CE 4.0 but I am not sure whether it requires additional installations like C++ libs or not. Including DLLs is OK.

Deploy ASP.NET MVC on Linux: Best Practices, Tools & Surprises

I'm wondering about best practices to develop ASP.NET MVC apps with an option to deploy on Linux. If you are creating these kinds of MVC apps,
What Linux/Mono platform are you targeting?
How much of the development are you doing on Windows and how much on Linux?
Are you using an ORM to abstract the database? Which one?
Are you running a build engine on Linux? What about tests?
What other tools are you using?
How much additional work has it been to target Linux in addition to Windows?
What ugly or pleasant surprises have you encountered?
The company I work for targets Mono on Linux as our main deployment environment. Thus there is no "additional" work - we provide the whole stack, from hardware, through operating system (customized and trimmed) to applications. Using Open Source gives huge savings for us and our clients (and yes, we do contribute back to the OS Projects we rely on).
The important thing is to constantly test using your actual target (sorry, Mono on Windows doesn't count). Sure, developers use Visual Studio, but the continous integration (using CruiseControl.Net, you'll need Mono 2.4.2 to run it on Linux) is done both on Windows and Linux, testing all Mono versions we expect to work on (it got much more stable recently, but still, regressions do happen between releases). It's quite easy to run parallel Mono versions on one *nix system, you can even include an svn snapshot build if you prefer to catch upstream regressions early. If you don't roll out your own distribution, then remember that most Linux vendors ship Mono with custom patches - this has caused problems for us before. Also, many distributions have a lot of lag updating Mono, and this is a rapidly advancing project.
For database layer we use mostly "plain" ADO.NET - Oracle (with dotConnect for Oracle, they support Mono) and SQLite (Mono ships with a working connector). I have also used the official ADO.NET Driver for MySQL (Connector/NET) and it, too, works well. ORM mappings are more tricky, but NHibernate is usable (keep in mind that they do not support Mono officially).
As for the build engine and tests - NAnt and NUnit are well known and well tested. With most recent versions of Mono xbuild (clone of MSBuild) actually got usable, but prepare yourself for contributing quite a lot patches if you decide to use it for more complex scenarios.
Write tests. Lots of them. Be prepared to contribute patches and bugreports, and if you use commercial components - make sure the supplier officially supports Mono.
Nathan Bridgewater's blog has some nice articles showing, among other things:
running MVC3 with razor on mono
migrating ASP.NET MVC from Windows/SQL Server to Linux/MySQL
installing and running MonoDevelop
installing mono from source
http://iws.io/get-mvc3-razor-running-on-mono/
Take a look at the Mono project. Sounds like that is what you are looking for. If I remember correctly, they have ASP.NET MVC integrated into it now.
I have never worked with Mono, but from my understanding there are not many differences.

Resources