Silverlight OOB updates when using MEF / PRISM - silverlight-4.0

I am working on a prototype for Silverlight OOB application. To modularize the application either PRISM or MEF or both will be used. When a new version of the application is available, CheckAndDownloadUpdateAsync can assist in downloading the latest version in OOB scenario.
How does updates work if only a new version of an application module is available? Is there a known functionality and/or strategy to be used to download new modules?

You can roll your own update detection, by having a small file on your server next to the XAP for your app, that contains the latest version. For example:
http://localhost/myawesomeapp.xap
http://localhost/myawesomeapp.xap.ver
When you want to check for updates without downloading them, you can always hit the .ver file, check the version listed in it and if newer then the current running app, show the Update button to the user.
Note that this approach also would allow you to create more advanced scenarios, like prompting the user to upgrade to a different version of the app (Pro for example) or that they need to upgrade their Silverlight to get the latest.
And if you have multiple apps, you can list all of them in that file and do cross-promotion between your apps.

Related

Creating a .NET application without the entire framework?

I am in the process of creating a lightweight application in vb.NET, and was wondering if it is possible to create an application that uses some of the dll's within the .NET 2.0 framework, without actually using the framework itself.
For instance, can I take the dlls from the .NET directory that the app will reference (and only those dlls that it references), put them into a folder inside the app's directory, and then just change the reference path to that new location? That way, when the app is installed on pc's without .net framework installed, the dlls can just be zipped and copied over to the newly installed app directory.
This may all sound a bit confusing, just let me know if you need any more info.
It is quite unlikely that you'll be able to do that.
There is this thing called .net framework client profile for creating lightweight .net apps that do not need the whole framework but you still need to have that installed.
I would recommend using something like Delphi if you need a standalone exe that does not depend on anything.
There is concept of Client Profile in .NET 3.5 and .NET 4.
That is subset of .NET, smallest necessary fraction of .NET that client must have in order to be able to run .NET applications targeting client profile.
There is more detailed overview of the features you may use when targeting client profile.
Unless you move to .Net 4 or above, you need full framework on the client computers. Having said that, which OS are you targeting? Newer MS OS often come with .Net framework installed already.

Modifying manifest file deletes indexdb in windows 8 metro app

My app(windows 8 metro, using javascript) uses indexDb for database, i have seen when i modify manifest file indexDB database is deleted.
Is this a bug or a feature??.
Now my app is already in windows store I am afraid if i will modify manifest file (which i want to do) users database will get deleted and that will be a huge loss to the user.
So what is the work around for this problem.
You can try their official demo and you will find the same problem
http://code.msdn.microsoft.com/windowsapps/IndexedDB-sample-eb1e95af
This is not a bug - when you modify manifest and deploy app using Visual Studio local data is cleared. This behavior is the same for JS, C++ and C# projects.
It will not happen to your users when they will update the app through the Store.

How to deliver only changes through .Net setup or patch technique

we have our business apps and size is 64 MB. every time add new functionality or change existing one then we rebuild our setup and deliver to client. so this means every time we are delivering 64 MB or more than that to our client.
we have our main win form project and also there many other class library project in our project solution. i am looking for easy way out to deliver only changes to our client.
may be changes could be there in our win form project or could be there in any class library.
so wherever changes made i just only deliver changes through setup and i want just client would install that setup or run any exe file and could see the changes we made in code.
i create setup with VS2005 setup creation option. how suggest me the best option for creating patch like apps which any client just install and get the changes in his apps. give me the best idea to implement in detail. thanks
When using Wix to generate an installer for your project, you can use it to also generate a patch file which will update only changed files.
Visual Studio 2005 setup projects don't really support Patch building and such. It's meant as a rudimentary solution for building installers. Wix, however, is what Microsoft uses internally to build the setup experience for Visual Studio 2012 and other products. There is a very extensive walk-through available here.
Wix does come with a steep learning curve. Would you have been using Visual Studio 2010 or 2012, then you could take advantage of a couple of templates that make it much easier to build a setup for a given type of application. I don't believe these will work with Visual Studio 2005.
This book might also guide you.

How to create an all-in-one installer for Silverlight - WCF - SQL Server database

I have the requirement as follows to create an installer for a Silverlight application that consumes WCF service and SQL Server as a database.
The goal is to create an all-in-one package that installs the application, the service and the SQL Server database on the server. Although the package should include all three the user should be able to install them separately as well. For ex. Silverlight application need not be installed on the server, and the WCF service not on the client and so on.
I'm right now trying with Wix installer, this is my first time using wix. It looks good so far, but I'm not sure if it complies with all the following requirements.
Requirement:
Customers should be confident that applications will install on Windows Server 2008 R2 without degrading the operating system or other applications.
Installer related requirements
Do not require server to restart during and after Install / uninstall
Uninstall cleanly
Comply with Windows Resource Protection (WRP)
Allow user control of installation location
Comply with Kernel mode component requirements
Install shared components to correct location
Do not overwrite non proprietary files with older Versions
Support User Account Control for installation
Correctly conñgure package identity
Follow Best Practices for creating custom actions
Follow component rules
Install / uninstall
Support command iine installation
Applications using Windows Installer must successfully install in quiet mode via a command line with /qn switch.
I would like to know if Wix is the right tool or is there any other better free tools. Visual Studio setup project doesn't seem to be flexible or may be I'm wrong.
If you want a free tool Wix should be your choice. Its no so easy to use it in the beginning, but it gets the job done. VS setup project is designed for small simple setup packages, you cannot consider it as an option based on the requirements you have.
Advanced Installer recently added dedicated support for Silverlight applications. It also covers your other requirements, including SQL Server databases. The only downside is that it's a commercial tool, so you need to get a license.
But if you want a free tool, WiX allows you to hack pretty much anything into your installer. So if you like it, you should stick with it and start implementing custom actions which cover the requirements which are not supported by Windows Installer.

creating setup of vb2008

I have developed a s/w using acces and sqlserver 2008 and now trying to make a setup file.
How could be the possible way??
I tried in VS2008 software and development. But after installing from the msi file and running the s/w it shows an error
"Microsoft.ACE.OLEDB.12.0 provider is not registered”
plz help
You have to do a few things to set up your application:
Install the .NET framework if required
Install SQL Server 2008 if required
Install your application
Define/configure the connection from your application to the SQL Server instance
Create your database/schema in the SQL Server instance.
Ignore the SQL Server problem for a moment, the easiest way to deal with the .NET framework and installing the application would be to use a setup project - which should be available from within VS.NET under Other Project Types|Setup and Deployment. There are hooks in there to give you options for installing dependencies - of which the .NET framework is one.
Ok, you have a tool to create setups (there are several others, e.g. I'm currently using WiX which I like so far, is very capable but can rapidly becomes complex) - the problem now is that the installer you need to build will depend on how and where your application is to be deployed. Do you want to ship a complete, self-contained, application on a disc? Is it to be downloaded internally within a business or distributed over the internet - each of these suggests a different set of packages at one end "everything" at the other you want the smallest possible pieces pulled down as required or perhaps even a different packaging method (e.g. clickonce).
Next up is SQL Server. You can get a redistributable package for SQL Server 2008 Express, so distributing it is not a problem however you have to determine if the user has an existing instance they want to user or if they want to install.
Once you've got an installed instance - you need to be able to create and to maintain (update) the database/schema within that instance. That I suggest you do using code (see here: How to create "embedded" SQL 2008 database file if it doesn't exist?). Which brings us to another point, you not only have to be able to install the application the first time, but you need to make sure that a) you provide a means to uninstall the application and b) that you can neatly do an upgrade in place.
I hope there are enough pointers there to get you moving - in terms of testing this, Virtual Machines are your friend, they give you the capability to create multiple environments in which to test your deployment and the ability to quickly roll back to a clean environment to test again as its virtually impossible to properly test an installer on a dev box (I've found this out the hard way) as it will already have all the dependencies for your application installed.
Pick your tools and that should let you ask more focused questions.