1

I have a windows application deployed through ClickOnce at one location (dev server). The same version is deployed at another location as well (test server).

I am not able to install two versions (dev and test) on the same machine. I am getting a error like "Application cannot be started". If select the details button, it is showing "Application is installed from different location".

Can I install two different versions on same machine at the same time? For example, I need to install both - dev version and test version - on same machine without uninstalling any of them.

Stefan Over
  • 5,851
  • 2
  • 35
  • 61
user3859666
  • 279
  • 1
  • 10
  • 24
  • Your title says "Application cannot be started". Are you asking for a solution for that, or for the text in your question? Please clarify! – Stefan Over Sep 17 '14 at 05:26
  • I am not able to install two versions(dev and test) in same machine. I am getting error like "Application cannot be started". If select details button it is showing like "application is installed from different location" – user3859666 Sep 17 '14 at 09:06

1 Answers1

1

If you want to install two different versions on the same machine, you need to do three things before you publish your ClickOnce packages:

  1. Each version needs it's own "Assembly Name" on the properties page

Right Click Project -> Select "Properties" -> Select "Application" tab -> Change "Assembly name" to something like "[YourCurrentAssemblyName].Dev"

  1. Each version will need to have it's own "Product Name" in the publish properties

Right Click Project -> Select "Properties" -> Select "Publish" tab -> Select "Options" -> In the "Description" section, change the "Product name" to something like "[YourCurrentApplicationName] Dev"

  1. Each version will need a unique assembly guid in the applications assembly.cs file

Expand your project "Properties" in the solution explorer and open up your "Assembly.cs" file. Find the following line:

[assembly: Guid("D3461344-B663-4698-B32B-F52041D7B093")]

Change the guid there to something different, which you must remember for each environment. So every time you build for dev it should use the same guid it used before, but the guid should be different for each environment.

You should be able to build your project and publish it for different environments if you follow these steps.

heathesh
  • 261
  • 1
  • 5
  • how to open Assembly file. My project is vb project. I could not find any properties in solution explorer – user3859666 Sep 17 '14 at 10:01
  • Try and do this: http://stackoverflow.com/questions/4602721/asp-net-server-control-how-to-add-assemblyinfo-file – heathesh Sep 17 '14 at 10:06
  • Shouldn't be step 3 enough to achieve the goal? – Stefan Over Sep 17 '14 at 10:13
  • I dont find assembly: GUID in my assemblyinfo.vb file. – user3859666 Sep 17 '14 at 10:30
  • That's weird, according to MSDN it should be there: http://msdn.microsoft.com/en-us/library/ms973231.aspx – heathesh Sep 17 '14 at 10:31
  • If i change the GUID i am getting error like "Incorrect UUID format". This is the GUID i gave "b2d55833-edde-4765-DEV1-5e2031f67c91" – user3859666 Sep 17 '14 at 11:30
  • Try not to manually change the guid, but rather generate a completely new grid by going to "Tools -> Create Guid -> And selecting Copy". Then paste and use just the Guid part like you need. – heathesh Sep 17 '14 at 11:33
  • Is it necessary to change the GUID. Because By Changing the Assembly Name and ProductName itself i am able to install both versions. It's working. – user3859666 Sep 17 '14 at 11:36