Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Problem & questions with clickonce
 

Problem & questions with clickonce

I have need for a fileAssocation to be setup by clickonce. I am building the manifest through MSBUILD which does not seem to have any ability to define these fileAssocations. Rather than manually add the entries I need to automate the process. I wrote a program that added the entry to the manifest before signing. This is built and signed but I still cannot launch my click once app by clicking on the a file with that extension. Note It is added after the application tag at the end of all the <file> tags

Text Added:
<fileAssociation xmlns="urnTongue Tiedchemas-microsoft-com:clickonce.v1" extension=".aim" description="Kalido Modeler (ClickOnce)" progid="Modeler.Document" defaultIcon="Kalido.ico" />

Is this supposed to update the registry with the entries needed to launch my app when a user double clicks on an '.aim' file. My understanding is Clickonce cannot update the registry so perhaps it is done with some other clickonce magic. Anyway when I double click on files with this extension it does not launch my click once application
------
A few other questions on clickonce
Can I add another menu entry from this clickonce deploy to run help or do I have to write another deploy script?

Can I conditionally install the correct .net 3.0 framework 64bit or 32bit from the same script or do I need seperate scripts. It appears I need two scripts to do this with.

Thanks
Craig
Craig Schaepe  Tuesday, January 08, 2008 5:18 PM
Hi Craig,

Have you made it working??

Actually for me it is working fine..but i want to associate more than two extension with a single application like "*.JPG" and "*.PNG" both should be mapped with my application called "Mypaint.exe".

<fileAssociation xmlns="urnTongue Tiedchemas-microsoft-com:clickonce.v1" extension=".aim" description="Kalido Modeler (ClickOnce)" progid="Modeler.Document" defaultIcon="Kalido.ico" />

I am stuck....How can i do that??or shall i write the code for it?

Pls do suggest me..

Kiran Patil


I am Begineer
Kiran Patil  Friday, February 27, 2009 10:52 AM
MSBuild support for file associations was added in 3.5 SP1. I also did a little background in a blog entry for this. You can tryhere and here.

There are rules regarding file associations. All of them must be followed, or your file associations won't work. For example:

  • Values must be given for all 4 xml attributes
  • File associations only work for pure ClickOnce applications. That means that browser-hosted applications and Office documents can't take advantage
  • The application must be targeting the 3.5 version of the .NET Framework
  • The application must be full trust
  • The application must be installed (not run from web)
  • There is a limit of 8 file associations per application

Make sure you aren't breaking any of these rules. Also, you can't use ClickOnce file associations to override existing associations; jpg and png certainly won't work; aim also seems to be used by several entities, although they seem to be a little less common than jpg and png.


-- Mike
Mike Wade - MSFT  Sunday, March 01, 2009 3:25 AM
Hi Mike,

Thanks for reply.

Good to see your answer..Actually i have read this rules already from your post only...But more than one file association we were not able to find out how to do it..But at last we figured it out using MSDN documentation http://msdn.microsoft.com/en-us/library/bb892924.aspx

Main Idea is Your progid Should be different..i also wrote some post which might be useful for some one...Pls have a look at it :

http://kiranpatils.wordpress.com/2009/02/27/add-more-than-one-file-associations-to-a-clickonce-application/

I have created one sample application which targets to .NET Framework 2.0 and it works...So, i am confused with that..would you clarify your statement that "
The application must be targeting the 3.5 version of the .NET Framework "?..Sample application can be found here :

Thank you,

Kiran




I am Begineer
Kiran Patil  Tuesday, March 03, 2009 10:07 AM
If you are targeting the .Net 3.5 (SP-1) Framework, there is an option panel that allows you to define your file associations for your application. I think that's what Mike was referring to.

RobinS.
GoldMail.com
Ts'i mahnu uterna ot twan ot geifur hingts uto.
RobinDotNet  Wednesday, March 04, 2009 12:56 AM

You can use google to search for other answers

Custom Search

More Threads

• Assembly downloads every time
• How to modify app.exe.config.deploy file
• Smart Client and DLL searching
• Unable to add files to new Project
• Application Triggered More than once issue...
• Streaming Files from Binary Files Table in MSM
• make a setup file without need framework
• Update to .NET 3.0
• Seperate Clickonce Forum?
• Deployment of Project with out SQl server.