Sqlite database restrictions in windows store apps - sqlite

I have some issues with Sq lite. I read a Microsoft article
In that site it is mentioning as "When you create a new C# or VB Windows Store project in Visual Studio, it supports all architectures (x86, x64 and ARM) by default. But since you added Sq Lite to the project, you can’t build one package that targets all architectures. You have to build one target for each. Select Build|Configuration Manager and select x86, x64 or ARM from the Platform drop-down list."
My application is Newspaper app developed using C# for windows tablet. Can i build for all processors.?

Yes you can, the only downside is that you must compile three different times your app, to support the ARM, X86 and X&4 architectures.
This can done easily if you configure your configuration manager with the different architectures ;)
Check this link on How to: Create and Edit Configurations

Related

How do I create an msixbundle for a UWP project?

I have two xamarin forms projects that currently only utilize the UWP platform. One creates msixbundles when publishing and the other creates appxbundles when publishing. I can't seem to find any key difference between the Package.appxmanifest or the uwp project files that would cause this. I would like to make them both produce msixbundles. Does anyone know the key to creating msixbundles vs appxbundles?
The apps targeting Windows 1809 and newer are automatically packaged bundled as msix/msixbundle. And here is official release note.
We added support for creating .MSIX packages for both the Universal
Windows Platform projects, as well as in the Windows Application
Packaging Project template. To create an .MSIX package, the minimum
version of your application must be the latest Windows 10 SDK (build
17763).

How do I decide what runtime id to use?

I am used to the dot net framework building a .exe file that I can release
However in .Net Core 2.0 I need to specify a runtime id when creating the .exe
for example
dotnet publish --runtime win7-x84
where the runtime id is win7
What factors should I consider when choosing the run time id?
Do I need to be releasing multiple .exe versions to cater for my clients on different operating systems?
I have looked at the document here
What factors should I consider when choosing the run time id?
Well, the main factor you should consider is a target Operating System, where the application will be launched. Everything became much simpler after .NET Core 2.0 added support of portable RIDs. Portable RIDs do not include OS details, e.g.: win-x64 or linux-x86. If operating systems belong to one platform (Windows or Linux) you could publish one version of application that will run on all OS from the family. So to build application for whole family of x64 Windows OS run the following publish command:
dotnet publish --configuration Release --runtime win-x64
Do I need to be releasing multiple .exe versions to cater for my
clients on different operating systems?
According to above explanation, there is no need in separate versions for different OS within one family. You don't need to build new versions for win7, win8, win10, etc. However you still need to publish two application versions for support of x86 and x64 architectures. It is possible to build only one x32 version that will run on both x32 and x64. However it will run in 32-bit mode on x64 OS, which should be avoided.
This question contains a lot of other details about compatibility between different RIDs and OS. Much of this outdated since portable RIDs were introduced but there is still plenty of useful info.

Build Problems with SQLite-WinRT Wrapper

I am having trouble getting my app to build for ARM target after adding the SQLite-WinRT database wrapper. I could reproduce this with a simple test app as follows:
(This is done in Visual Studio 2013.)
Create an empty Windows 8.1 universal app (WinRT)
Download SQLite for Windows Phone 8.1 and SQLite for Windows Runtime (Windows 8.1) using Tools/Extensions and Updates. Add them to the respective projects' references.
Using NuGet, add SQLite-WinRT package to each project.
Build for x86 (local machine or phone emulator) -> no problems.
Build for ARM (phone device) -> build error shown below (independent of debug or release builds).
There was a mismatch between the processor architecture of the project being built "ARM" and the processor architecture, "x86", of the implementation file "C:\Users\jr\Documents\Visual Studio 2015\Projects\sqlite-test\packages\Sqlite-Winrt.3.8.7.1\lib\wpa81\SQLiteWinRT.dll" for "C:\Users\jr\Documents\Visual Studio 2015\Projects\sqlite-test\packages\Sqlite-Winrt.3.8.7.1\lib\wpa81\SQLiteWinRT.winmd". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and implementation file, or choose a winmd file with an implementation file that has a processor architecture which matches the targeted processor architecture of your project.
I posted a small test project here (Windows Phone 8.1 empty project, added SQLite, added SQLite-WinRT via NuGet).
Go to project properties open build tab and set target platform to ARM
Edit
You have added WinRt sqlite. it is buid on x86 and when you want to build it on ARM process Architecture it cannot build you need to remove WinRTSQlite dll than your project will work fine. Here is Code
Hope this helps
One workaround for the problems with the NuGet package is adding the sqlite-winrt sources to your phone or universal app.
install SQLite for Windows Phone 8.1 (and for universal also Windows Runtime (Windows 8.1)) in Tools -> Extensions and Updates if not done already
add references to the respective projects
download the sources for the sqlite-winrt wrapper
copy the SQLiteWinRTPhone81(RT) (and SQLiteWinRT81 if needed) folders to your solution
add the projects to your solution in Visual Studio (right-click on solution -> Add -> Existing Project)
add references to the respective projects
edit the references for the sqlite-winrt project(s) to point to the correct version of SQLite (right-click project -> Properties -> Common Porperties -> References): add a reference to the current SQLite version in your project and remove the old reference
build your solution
I have downloaded your project and on the references i have found that you are using SQLite-WinRT and sqlite for windows phone 8.1, you don't need both.
as soon as you remove SQLite-WinRT your project start compiling.
EDIT:
inside a universal app you have to add only the right references, if is a phone project just add sqlite for windows phone 8.1, instead on the windows 8.1 app add only the SQLite-WinRT

cant use store test kit while Working with SQLite in Windows Phone 8

I am using SQLite.WP80 version=3.7.16 in Windows phone 8 project.
Now when I tried to test with store test kit it says:
"the application package(XAP) is not up to date,recompile and try again.
change the solution configuration to release and platform to any cpu and rebuild the app"
But as I am using sqllite i cannot change to any cpu.
Can anyone tell possible solution?
You should target just one CPU during development (depending on what machine you will be testing/debugging on). When it's time to publish your app, you can select multiple packages, one for each CPU architecture. Visual Studio will then create several packages, which you can upload to the dev portal.

Create Installer for an ASP.NET web APP for multiple environments

I have created an ASP.NET website which accesses a DB. The DB can will be alrady installed at target machine. It can be anything from SQL server 2000 to SQL server 2008. Further more the target OS can be anything from Windows server 2000 to Windows 7. I have kept the target .Net framework version as .Net 2.0 to keep matters simple. Also, the target machine can be x86 or x64 or Itanium.
Do I need to create separate builds for different target platforms?
How do I create an Installer which will :
Put this website on a Virtual Directory of IIS server(can be any IIS version)
Detect the target platform and install the appropriate build
I need to do this either using the standard MSI installer of VS2008 or using WiX or any open source installer for that matter. Please help me with this since I am new to deployment projects.
Thanks
You can use softwares like InstallShield in order to create your installer. but InstallShield is not for free I think.
such programs have their own scripting language that simplify the operations that you want to do, like detecting which operating system is installed or which SQL Server version is installer, beside that they allows you to communicate with a certain function in a dll. You can call this function to do some logic or some validation.
You can use WiX to create an MSI that does what you've listed. It is free, and as well as including functionality for what you want also allows custom scripting for any custom logic needed.

Resources