Why SQLite is not available on NuGet? Why it is part of Visual Studio where you have to go look for updates at Tools->Extensions and Updates? I started coding Windows 8 and Windows Phone 8 in the past few months and I like to get some insight into this.
To me, using SQLite on a Windows 8 project creates a VS-level dependency.
Let's say I develop a client library using the version of SQLite referenced by the Visual Studio IDE (Example: 3.7.x) and distribute the library to another developer who uses SQLite 3.8.x referenced by his/her Visual Studio IDE, will my client library still work?
What happened to me last week was this:
I developed a client library for Windows Phone 8 using SQLite and I had to use a 3rd party wrapper written by Peter Huene called sqlite-net-wp8.
It is available at: https://github.com/peterhuene/sqlite-net-wp8/
When you look at the Sqlite.vcxproj file (https://github.com/peterhuene/sqlite-net-wp8/blob/master/Sqlite.vcxproj) of this project, it has references to a given version of SQLite. Looks like every time you update SQLite on Visual Studio, you have to update the .vcxproj file too.
Something like:
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(MSBuildProgramFiles32)\Microsoft SDKs\Windows Phone\v8.0\ExtensionSDKs\SQLite.WP80\**3.8.0.2**\DesignTime\CommonConfiguration\Neutral\SQLite.WP80.props" />
</ImportGroup>
Let's say I develop the client library using 3.8.0.2 and give it to an apps developer who uses the same approach to talk to SQLite (using sqlite-net-wp8) for Windows Phone 8 apps and he/she uses a different version of SQLite (say 3.7.x or even a newer version 3.9.x), will my client library still work? I believe his/her sqlite-net-wp8 may be referring to a different version of SQLite than my client library, breaking the code.
When I updated SQLite 3.7.x to 3.8.x, it forced me to update the Sqlite.vcxproj to go find 3.7 and replace with 3.8 which was not good user experience.
I think ideally it should be backward compatible working with 3.7.x also. But it didn't.
If SQLite and sqlite-net-wp8 is available on NuGet, I can inform the developer who wants to use my client library the version of SQLite and sqlite-net-wp8 I use.
Any idea of overcoming the problem and have better developer experience dealing with the issue?
I believe the reason SQLite is not available on nuget is that it is a native package so the dll to be used need to be dependent on the target assembly platform which nuget don't seem to support yet
Regarding updating the version of sqlite for your project, you don't need to manually update vcxproj, just use "Add Reference" to remove and readd the reference to Sqlite (it will show up in the Add Reference window under windows ->Extension after you have install the extension)
Related
I'm currently working in VS2017 on a solution with multiple C# and C++ projects.
The installer project has the C++ redistributable as a prerequisite, with the option to download it from the component vendor's site.
Some of the clients want to be able to install the application without an internet connection.
The normal thing would be to put the package in the bootstraper and check the download from the same location as my application; the problem is every time Microsoft updates something with this library, compiling the application would work, but installation will have the old redistributable.
Is there any check to include Visual Studio libraries that are used when building the application, which ever version these may be?
so i downloaded monodevelop...and it installed xamarin studio 5.0.1...the gtkc# is working well...i made an app and run it...everything went well...when i tried to make an android app with c# thru new solution it said the "MainActivity.cs" couldn't be found.I let the default location in documents/projects and named the solution hello.I also have installed the android development add-in from add-in manager.I can't figure out what's the problem...also i had installed the android tools from eclipse.
I think it has something to do with the licensing, as XamarinStudio + Android / iOS is not a free product. I believe that the "re-branded-as-XamarinStudio" MonoDevelop available from the MonoDevelop website is simply missing the stuff needed to create these types of projects.
While I'd be interested in knowing why MonoDevelop has released a crippled (read broken) version of XamarinStudio, one can simply get the fully-functional "XamarinStudio" from the XamarinStudio website, and it will be able to create these project types without this issue (so long as you have a trial, or full license).
It will still be able to create other types of C# projects, just as MonoDevelop used to, as this whole thing is part of the process of moving away from the MonoDevelop name, and having a single product "XamarinStudio".
I'm developing addin compatible with 2003,2007,2010 and 2013 MS Word versions and XP(not crittical), Vista, Windows 7.
Important note - I'm working with free SharpDevelop IDE, target framework is 4.0.
First of all, I should find installer for relevant version of intertop assemblies and provide it to client. In order to download only one version I have to download the oldest version of PIA. Here I read that PIA for XP works for any MS word version and for any of XP,Vista and Windows 7. Is it true?
This answer talks about implemeting Extensibility interface. I found extensibility GAC reference in SharpDevelop and it's ok. But should I give extensibility.dll to client or it exist on any PC with .NET framework?
What version of Microsoft Object Library is compatible with every OS/Word combination? 2003's 11.0? Is it necessary? Now I'm using office.dll GAC reference without adding object library and it works. But I can't even build project using both office.dll and object library. Doest it mean I can provide to client office.dll and forgot about object library and problems related to compability?
Question about RegAsm.exe. If I compiled project under 4.0 .NET Framework and set target Framework 3.5 what version of RegAsm I should use? Development version or target version?
Oh, i forgot the main question)) After solving compability problems how create setup.exe which automatically installs .NET Framework, Intertop Assemblies and automatically registers addin? Right now I'm doing registration manually - create LoadBehavior,Description,FriendlyName variables in regisrty, call RegAsm - how do it inside installer?
I owe you respect for the work you have undertaken to do all this manually and without the help of Visual Studio. I'm developing also add-ins targeting multiple office versions, but I always use Visual Studio Professional together with the Add-in Express rapid development tool, which covers all of the questions / steps you're asking for. You may get plenty of free information on their website.
Please be aware that creating an installer program working in all the situations you have named can be a very difficult job. Don't forget that in the case of a professional software you must test your deployment on nearly each configuration you're expecting.
ad 1) As for an installer, look for WIX tools which are free. Otherwise you can buy any installer program you like and learn how to deploy. - As for the PIAs, installation can only be done be administrators, so be aware of this.
ad 2) You must deploy the extensibility.dll to your clients.
ad 3) You must use the oldest PIA for all versions, because it is the only one the oldest office version (e.g. Office 2003) can understand. All Office PIAs are compatible upwards. Attention of course you cannot use methods or properties which have been introduced in newer versions.
ad 4) I don't think that there's a difference between the two versions of regasm.exe.
ad Main Question)
I cannot explain here HOW TO DEPLOY AN OFFICE ADD-IN. You need some basic knowledge about the Windows Installer technology first. But you're on the right way.
However, "Installation of the .net framework" I would leave as a prerequisite to the administrator, because it may require reboots.
Additionally, a lot of people have got grey hair pulling the right version of the .net framework in their setup program (say, it is running on a Windows 7 English US with Multilanguage Pack in Dutch running a Dutch Microsoft Office 2010: which framework your setup should install?)
The same for the PIAs: You can just check through custom actions in the installer for the existence of the Office PIAs and cancel the install, if they are not available.
As for the registry keys, normally this is done exactly as you're said: writing to the registry during the setup; and this is done normally by custom actions.
So, I installed Visual Studio 2013 on my Windows 8.1 box. I want to experiment with it and created a new Windows Store Grid App. I want to persist data on a SQLite database, apparently the database of choice for WinRT apps.
Quickly found links to the vsix needed in order to be able to use the SDK: SQLite download page, and downloaded sqlite-winrt81-3080002.vsix.
Installed it, then in my project, added the reference to the newly installed SDK (right click references, add reference, navigate to Windows, select extensions and tick SQLite for Windows Runtime (Windows 8.1) checkbox.
Also quickly found that it won't compile on Any CPU. On Configuration Manager, selected Debug, x64 active platform, that made me able to compile the application.
Finally, while attempting to use the namespace SQLite I noticed VS 2013 isn't recognizing it. Attempted many things like adding reference to the .dll directly, exploring the component to see which namespaces were available (which doesn't show anything), and I'm quickly running out of ideas. Because it's kinda new thing, and with limited interest, google, the saviour, doesn't want to save me today.
So, how one would be able to use the SQLite SDK in their Visual Studio 2013 projects, targeting Windows Runtime 8.1?
These are the contents of my csproj file
UPDATE
Stupid me, thought there was no managed land (.net) in Metro style land. Sorry for causing any confusion.
I installed the VSIX for SQLite and noticed that it is a native DLL to be used in Windows Store 8.1 C++ apps. It is not for managed C# projects.
The current NuGet package for SQLite from what seems to be the 'official' SQLite team is only working for .NET 4.5, if you try to install it, it will error saying it does not support .NET 4.51.
There is also the NuGet package SQLite-net, which works for .NET Windows Store apps. All you need to add is the SQLite using statement.
You will need this NuGet package as it is the managed wrapper for the SQLite, without you will not be able to properly reference the right DLL for SQLite.
Here is the link to the project information from that NuGet package. SQLite Runtime Support
Here is an article on how to use SQLite with Windows Store apps in VS2012 but it should still all apply:
SQLite and Windows Store Apps
Is there a redistributable web installer for .net framework 4.0? Preferably, it'd detect the correct language version to install and download it from the internet.
I want to bundle this web installer with my 4.0 application, so that the download size of setup package is as small as possible (40MB of full offline installer could scare users), plus I don't want to deal with detecting the necessary version (x86, x64, which language) to install.
EDIT:
As to how I create the setup. I'll go for the easiest option. My application is really trivial. I just need to copy some files and make shortcuts in Start Menu / Desktop.
What's the simplest/fastest solution to this? The setup project that can be build with VS (I'm using VS 2010).
Visual Studio setup project covers your needs.
check this : http://msdn.microsoft.com/en-us/library/ee942965.aspx
edit fixed the link, you might want to check the web bootstrapper and redistribute framework related sections
Within your setup project you should embed the .Net 4 Framework. But instead of adding the full offline version you simply download and embed this web installer. It checks the currently running machine and downloads only the necessary files. So everyone who already has the .Net framework installed just gets 870kb of death data with your setup (thats the size of the web installer) and anybody else downloads as much as needed for the current machine.