Embedded database for a simple portable application - sqlite

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.

Related

Is it possible to change from .NET Framework 4.8 to 4.7.2

Is it possible to change from .NET Framework 4.8 to 4.7.2? In my "Turn Windows features on or off", I have ASP.NET 4.8 listed. I wish to change this to 4.7.2 I tried downloading and installing the developer pack from here (https://dotnet.microsoft.com/download/dotnet-framework/net472), but no luck on changing it inside "Windows features on or off".
I don't see any real particular issue by going back on the projects .net version.
The only requirement is that you have the correct version of .net installed on your computer. I suppose you "can" go into windows settings - and if the .net framework is not selected, then fine.
I would NOT suggest that you bother to disable say some given .net framework in the windows settings.
if you need a particular .net framework - then make sure it is installed on your development computer. once done, then in project settings you can select the framework - say like this:
So no, don't disable any .net framework. Sure, you can enable as such, but I would not mess or bother to remove existing frameworks.
About the ONLY real issues are:
If any library or referenced assemblies are LATER then the framework you select, then you can't use such tools, and external libraries.
And of course the target computer then has to have AT LEAST that level of .net installed.
In fact, in some cases, especially some web hosting providers - they are often VERY MUCH behind on what versions of .net are avaible.
And then of course often your have a 4-5 year old production server. They often don't allow updates to such servers to later versions of .net, so you are in your case - can you roll back, or choose a lower .net framework.
I certainly suggest that you adjust, pick, and get your development cycle working on the lowest min target framework. That way you not only avoid (even by accident) using some libraries and tools that can't run on that target web server.
Another FYI? If you select/change that framework in the VS project settings (as per above screen shot), I suggest that after doing so, you exit VS, and re-enter. I experienced some issues when not doing this exit of VS when downgrading the project.
You then want to do a clean project, and then do a re-build all. If that re-build all don't spit out any errors, then you are in rather good shape and should be ok.
Open the Project in Visual Studio >>> Go to Project Tab on Top >>> Select Project Properties >>> Change the Target Frameworkenter image description here from the Dropdown >>> Click Yes to Save the Same

ASP.NET vnext and open database

is there some possibility to work with an open database like mysql, mariadb or other and ASP.NET vNext?
Perhaps a beta driver or something like that?
For ASP.NET vNext you can choose to target the full .NET Framework or a slimmed down, bin-deployable, cross platform, Core framework.
If you target the full .NET Framework then you get all the data access options you had before. If you target the CoreCLR then you can use the new version of Entity Framework (EF7). Currently we have the following providers available on CoreCLR; SQL Server, SQLite, and an in memory provider for testing. Of course, more providers will become available as we work towards RTM.
In addition to EF7, there are also the corresponding provider specific SDKs that EF is building on top of, and these can be used in application code as well (e.g. there is an implementation of SqlClient that can be used to access a SQL Server database).
You can read more about our plans for EF7 here - http://blogs.msdn.com/b/adonet/archive/2014/05/19/ef7-new-platforms-new-data-stores.aspx.
It depends on if you are using the CoreCLR (the trimmed down version) or the Desktop profiles. In the Desktop profile you have everything you have in .NET available and you can add your own open source libraries (via Nuget).
Just open up your project.json and add the needed dependencies.
Anyway you should not be dealing with low level ADO.NET, you can use Entity Framework, or Massive or nHibernate, or whatever, to abstract away the specific database your project is using now, as it is bound to change or multiply during the project lifetime...
You should still be able to use anything ADO.Net related with ASP.Net vNext - it is, after all, still .Net!
Yes, it is possible, but only if you use full .net profile (on windows it will be .net framework and on linux - mono). NHibernate working well on mono, so you can eventually use mysql, postgresql and other databases in you APS.NET 5 vNext application. Here is complete example of application with NHibernate and PostgreSQL on Ubuntu server.

Porting Mono to .Net

I have a project that needs to be done using ASP.NET. Currently, I'm using a Linux box and don't have an access to Windows so I was wondering about doing the development in Mono.Net for the meanwhile. The final project needs to be completed on the Microsoft.NET.
How easy would it be to port a Mono.NET application to a Microsoft.NET? Or should I just wait till I get the windows machine? I don't mind an occasional challenge but not if it's going to be a big pain.
It should work fine just make sure you use the Microsoft .NET APIs only or keep track of any Mono or other opensource DLLs and include them when you run on Windows.
MonoDevelop could also help as it creates Visual Studio compatible project files which can help your migration if you want to later migrate to Visual Studio also.

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.

Do a Windows application ifself contain the .NET framework?

I have a Windows application which contain a deployer.
Does the deployer itself contain a copy of the .NET framework?
Or do we have to explicitily install it?
When I check in the solution explorer, it shows the .NET framework under the deployer project under detected dependencies?
My Windows application connects to the Internet to validate for a registered user. Do I need to configure some port (or something like that) while I am installing it? Also how do I check which port my application uses to connect to the Internet?
Regarding #1, just as Xstahef said, you need to prerequisite the .NET framework.
You could put the .NET redistributable in your installer, and if you detect that the .NET runtime is not installed then prompt the user to run and install the .NET distributable contained in your installer (that's what we did some time ago, InstallShield provided this functionality for us). But this may not be recommendable: the .NET runtime has grown a lot in size (depending of the version you need to have in your client's machine), and many customers (at least the educated customers) won't trust installing the runtime from your installer. Besides, you may need to check with the legal department in your company before including a third-party component in your installation.
It depends on your deploy project (Visual Studio, InstallShield?). But commonly, you need to force the .NET installation (prerequisite option). By default, .NET is not contained in the deployment projects.
Here, it depends on the way you want to connect the Internet.
.NET runs in a VM, so you would need to require the framework be installed in order to actually run it. Much like you need to have Flash or Java for those respective mediums. Microsoft has redistributable packages for the .NET framework. So you could probably incorporate them into your installer. If you're targeting 1.1 or 2.0 most people probably won't need it.
So long as you are not trying to get in to the client machine then you shouldn't need anything special like UPnP to [attempt to] open a port if they are behind a NAT router.
Xenocode does allow to running such an application on an absolutely clean PC.

Resources