ClickOnce - App installs, then next day app reference is broken


  • I have an application that deploys with ClickOnce. It works for 99% of my users, but two of my users are having trouble with it. They install the application and it works just fine (During publish install mode is "The application is available offline as well (launchable from Start menu). Then the next day when they log back in, the icon (which is the application reference not a shortcut and not a setup file) to the app is changed to the windows default icon, and when it's clicked to run the app it instead asks to install it again.

    When I look at the file structure where the app is saved on their machines, I'm seeing many randomly named folders in the local settings location, when I only expect to see one. In other words, at this location:

    C:\Documents and Settings\<WindowsUserName>\Local Settings\Apps\2.0

    I'm expecting to see a folder called Data, and another folder with a randomly generated name. But instead I see the Data Folder and than many randomly generated name folders. There are also many folders inside the Data folder.

    It's almost like after logging out of their user name or rebooting the computer forgot where it had installed any of the ClickOnce Applications (The users have another ClickOnce app that we publish and it has lost it's connection too).  This makes me think it's an issue with the user's machine, but I have no idea what kind of settings, etc. could do this.

    I have made sure they have the latest updates for .Net 3.5 which my app is compiled to. 

    Beyond that I have no idea what to check on next. The users use XP and are admins on their machine. Does anyone know what I can check on next, or what could cause this issue?  I'm trying to figure out more about how the application reference file knows where the different components of the application are kept, since it seems like that is what my user is having a problem with.  Any advice would be appreciated. 

    • Moved by Calvin_Gao Tuesday, February 01, 2011 5:14 AM Move to appropriate forum (From:Visual Basic IDE)
    Friday, January 28, 2011 4:16 PM

All replies

  • Hi kschuler,


    The following is some understanding from the other community members in the others discussions. And you can reference it. And I think this information can let you clear about your question.


    It's because those shortcuts are not ordinary shortcuts - they cause validation of the feature associated with shortcut, and that can result in a repair.


    Primary output is probably irrelevant here because it's some number of files, not just the config file, so you can't use that technique unless you go into the MSI file and find the config file's component, plus you want the config file to be optional I guess, but you basically are trying to disable the repair.


    It seems to me that you could design this app so that there is a setting in the config file for all the possibilities. Then you're not worrying about a missing config file, just a setting inside it that makes your app do the same thing as if it was missing.Repair can be prevented to a certain extent with DISABLEADVTSHORTCUTS, but you can't stop the user right-clicking on your MSI file (or going to Add/remove Programs) and choosing repair, and that will reinstall the missing file. It's better to design something that works with repair instead of trying to defeat it because repair cannot be absolutely prevented and if your app required repair to never happen then your app design is broken.


    It's a built-in feature of Windows Installer triggered by a number of entrypoints, shortcuts being one of them.  It's an automatic version of right-click=>Repair on the MSI file, or from Add/Remove Programs.  If somebody chooses that repair the files will also reinstall, so it's usually easier to live with this rather than try to defeat it.


    The icon doesn't point to the exe because that's not actually where the icon is. It's in the Binary table of the MSI file, and that link describes how Windows can get it.  That link allows Windows to get hold of the icon even if the exe isn't around, and there are some features of Windows Installer that require that capability.


    By default, shortcuts are advertised shortcuts - they don't point directly to the target. They have an encoding that contains the feature name, ProductCode guid and Component Code guid. If you search this forum for DISABLEADVTSHORTCUTS you'll find how to disable them.



    For just one file, the method that works in all cases is to set the component guid to null for that file:



    where it says "If this column is null.....".


    The exact path of the user.config files can also be explained like this:

    <Profile Directory>\<Company Name>\<App Name>_<Evidence Type>_<Evidence Hash>\<Version>\user.config

    <Evidence Type> and <Evidence Hash> - information derived from the app domain evidence to provide proper app domain and assembly isolation.


    If there's any concern, please feel free to let me know.


    Have a nice day!

    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, February 02, 2011 9:11 AM
  • Hi Mike,

    Thank you for taking the time to try to help me with this issue, I hope you can spare a bit more time because I am confused by your suggestions.  I have never dug too deep into the ClickOnce process and have only altered settings that are available on the My Project tabs…so when you start talking about changing properties and config files I am completely ignorant of what/how to do it and worry about what other effects such changes might have.


    I think you are saying that when my trouble user clicks the application reference icon they are, because of unknown errors in the app/deployment, triggering the app to repair.  And that the solution to my problem is to disable the app’s repair to the extent possible.


    First of all, I don’t understand why the app repair turns into prompting the user to install the program from scratch.  This is a big problem for my application because my app includes a database that is stored in the application user’s data special folder.  When the app is reinstalled the user loses their data because a fresh/blank version of the database is installed with the app.


    Second, there must have been some reason the app wanted to do a repair in the first place.  I am hesitant to just disable the repair and let the user run an app that has some kind of problem with it.  I am also skeptical as to this being the solution because right now, the app doesn’t DO a repair as I am used to thinking of a repair… it does an install, which I’ve always seen as two completely separate things.  Also, when I tried to fix the issue on the trouble user’s machine I went to add/remove programs, found my app, and clicked.  Normally a window would appear asking if I wanted to restore the application to its previous state or remove the application from this computer (I have never seen an option to repair for a ClickOnce app).  However, in this instance with the trouble user it didn’t display the dialog at all.  Instead it just removed my app from the list.  That leads me to believe that whatever keeps track of where the install/repair is located is also messed up.  And if that’s the case, does that mess up your fix idea? (Also, you call the install/repair an MSI but that confuses me because it’s a ClickOnce app and technically I never see an actual MSI file, so I’m assuming we’re talking generally about the deployment/install/repair files in this instance.)


    Third, I am completely lost with the DISABLEADVTSHORTCUTS suggestion and the setting the Component GUID to null.  Is the DISABLEADVTSHORTCUTS a property for the MSI?  In which case, how do I change it with a ClickOnce application?  In the app.config file?  I have no experience with making changes in the app.config file, I have only made changes to publishes by using the settings that are provided on the My Project tabs.  Do you know of a site with more information about how to do this in ClickOnce?  And do you know if disabling shortcuts will also turn off any other features of the ClickOnce?  What will that do to the updating process when I publish a new version of my application?  I have the impression that the GUID is quite important to that process, although I have never researched it.


    Once again, thank you for taking the time to help me and if you could please explain a bit further I would really appreciate it.

    Wednesday, February 02, 2011 4:31 PM
  • Hi kschuler,


    I think the following information can help you to solve this problem, you can create a common shortcut instead of the primary out shot cut, then it will not try to re-install the application files again.


    For create the common file shortcut you can reference this article:

    Use the IWshRuntimeLibrary.IWshShortcut object to create the shortcut,


    And you also can reference the following thread to do settings for the DISABLEADVTSHORTCUTS:


    If there's any concern, please feel free to let me know.


    Best wishes,

    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, February 16, 2011 3:55 AM
  • Okay, so let's say I try your way and redo how I make the desktop shortcuts...What am I supposed to do about the shortcuts that are in the Start Menu - All Programs for my ClickOnce application?  Those do not work either and the creation of those is entirely handled by the ClickOnce publish.

    I still think we are talking about two different problems here.  The user having trouble with my app installed and is using the app with the same windows user name and has always had admin rights.  My "shortcuts" are broken both on the desktop where I had code in my app to place shortcuts AND in the Start Menu - All Programs which were put there magically by the Install.  This user doesn't ALWAYS have the problem.  They can go for months just fine and then suddenly log in one day and the shortcut is broken and clicking it runs the install instead.  Then after they reinstall (losing all of their data) the shortcut works again (not cause a reinstall) for a seemingly random amount of time. 

    My suspicion is that some other software might be interfering or clearing something in the registery or maybe messing with the profile or Apps folders, but I haven't been able to determine what software or what I can do to stop it.

    Please let me know if you have any other ideas.

    Wednesday, February 16, 2011 9:55 PM
  • kschuler,

    I recommend that you disregard the advice from Mike. All of that information is about setup & deployment packages, not ClickOnce deployment.

    I have a couple of suggestions for you. First, try setting up a new user on the machine and have HIM install and run the ClickOnce application, and see if it exhibits the same behavior. If it does, then it's something on the machine. If it doesn't, it's something about the user's profile.

    Is it the shortcut from the Start Menu that's causing the problem or are you putting a shortcut on the desktop and that's the one having the problem? If it's on the desktop, what does the one on the start menu look like?

    This could be a permission problem in the registry -- does the user account have restricted permissions? If you make him an administrator, does it fix the problem? (Shouldn't be required, mind you, but sometimes companies restrict write access to the registry).



    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Thursday, February 17, 2011 9:07 AM
  • RobinDotNet,

    Thanks for replying to the thread.  I had the impression that Mike's response wasn't quite what I was looking for, but I couldn't make enough sense of it to say that with any confidence.

    Unfortunately this issue doesn't happen EVERY time the user runs my app.  And the user who is having the trouble is a customer so I can't ask them to test my app for me by adding a user to the computer the way you suggested.  So far, I've just asked her to notify us as soon as the problem happens again so we can talk to the IT people and see if any scans had been run or check anti-virus logs...etc.

    The shortcut on the desktop and in the start menu are both the problem (which makes sense because they are both the same thing).  I let the ClickOnce publish put a shortcut in the start menu and then in code when my app starts I make a copy of that .application file and put it on the desktop if one isn't already there.  They both turn into the default icon and both launch install instead of my app when the problem occurs.

    The user is an admin on the machine already and has been since they began using the app.

    If you think of any other possible things for me to try, please let me know.  Thanks again for taking the time to consider my problem.

    Thursday, February 17, 2011 2:26 PM
  • I would wonder if the corp IT guys have something coming through and messing with the user profile folders somehow.

    You CAN always ask the customer to help. We do this, and sometimes we get no response, sometimes we get "go away", but most times, the customer is very helpful. Sometimes that's the only way you can fix this kind of problem.

    When it happens, does the customer uninstall it and reinstall it? What happens if they just re-invoke the install link, does it replace the icons?

    Also, when it DOES happen again, I would go check the \apps\2.0 folder under their profile and see if the folders for your app are there. They will be called something like xxxx...tion and xxxx...exe where xxxx is the 1st four characters of your assembly name. The xxxx...tion folder is the one with your executable and assemblies, there is what is run by C/O. The xxxx...exe folder holds resources that you included in your deployment.


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Thursday, February 17, 2011 6:18 PM
  • If you reread my original post, the ...\Apps\2.0 folder under the user's profile name has several folders with random numbers/letters where I am only expecting to see ONE folder.  It's like the app is still installed, but the connection between the shortcut and the app was disconnected, so the install runs...which generates another randomly named folder in that Apps\2.0 folder with the new set of folders for data and the exe, etc.
    Thursday, February 17, 2011 8:00 PM
  • So under the 2.0 folder, there is an folder with a randomized name. Are you saying you have multiples of these? Or do you mean under \apps\2.0\weirdfoldername\weirdfoldername\ you have multiple folders?


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Thursday, February 17, 2011 8:25 PM
  • Multiple just in the Apps\2.0 folder.  so in \Apps\2.0 there was weirdfoldername1, weirdfoldername2, weirdfoldername3....etc.  She had about 17 of them.  And she casually made the comment that she had probably reinstalled the app about that many times before reporting the problem.

    Thursday, February 17, 2011 8:38 PM
  • That's really weird.I've had that happen to me, but it was when it didn't recognize my username and profile, and it created a new folder. I can't remember the exact circumstances, or how I fixed it, although it wsa probably by uninstalling it and deleting the 2.0 folder.

    If you delete the 2.0 folder, it would be interesting to see if the problem still occurs.


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Wednesday, February 23, 2011 9:49 AM
  • Hi kschuler,

    Has this issue solved? Have you tried the suggestion from RobinDotNet?

    In my mind, I think if the application re-installed again while you execute the shortcut, then it tells us that something is not fine with the application, maybe the application file has been broken, or there's some others cause the relation between shortcut and the application broken.

    Maybe there's any virus, or there's some not good operation by the customer, or the system is not also fine.

    For the reason to the application re-installed is the application is not fine, or we can say it broken. 

    But why the application can be broken, i think it is hard to find the root cause(I think this is a apply problem). This is not also the setup project problem. If the others works well but only the several one not good, then I think the root cause is not in your product. I mean, I think the root cause is not the setup project problem.


    @Hi Robin,

    What do you think about this problem, Robin?


    Best wishes,

    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, February 25, 2011 4:59 AM
  • Hi Mike and kschuler,

    I had to think about this a lot because I had this problem once. We had a case where we wanted to give someone an S&D project (msi) that would install the C/O app. Of course, we went about this the wrong way and tried to have it actually unfurl and run setup.exe, not install the prereqs itself and then invoke the ClickOnce application. When it tried to run the ClickOnce application, it would not start up IE with Protected Mode On, and it would install the application in a separate cache folder under the 2.0 folder. If I remember right, because it was trying to run something from the web with Protected Mode off, it didn't have the permissions to read/update the entries in the HKCU registry, and it wouldn't register the C/O app correctly. So not only did I get multiple folders under \apps\2.0, the icon on the start menu was the generic windows icon, not my company icon.

    I think I figured this out by searching the registry for my company name, which is also the name of the application, and I examined each place I found it, and i found it somewhere other than HKCU. I'd start there, and look at the permissions given to those registry keys and make sure something isn't read/only.

    That's why I suggested setting up a new user profile and trying it, and trying that user on another machine where it worked. Is it the profile on that machine, is it that user, or is it any user account on that machine?


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Friday, February 25, 2011 5:22 AM
  • Hi.  I can't say exactly the issue has been solved...but I haven't had trouble with it since. 

    When the issue presented itself the user really needed to use the program, so I deleted the Apps/2.0 folder on their machine, then rebooted, then reinstalled the application.  The user hasn't had the issue of losing the app icon or having to reinstall since and there are no multiple random folder names anymore.  I have even had to publish several new versions of the application, the user has gotten them just fine.  So I'm just watching the issue now. I still have clue what caused it.

    Thanks for taking the time to try and help me out.  I'll post more if I ever get to the bottom of it.

    Monday, February 28, 2011 5:02 PM
  • The issue has occurred again.  I've published 8 versions of the application and this user has been able to update to all of them just fine.  Yesterday I published the 9th version and today when the user tried to get the updates the issue happened again.  She was prompted to reinstall the program, she lost all of her data, there were now TWO randomly named folders in the Apps/2.0/ directory.  I'm still at a loss as to why it happens.  IT says nothing new/strange was happening on her machine since the publish of version 8. 

    The one big difference with this publish is that so far my application had only been published to our Test servers.  Version 9 was the first time I also published to our Production servers.  When I publish to Test I set various settings differntly than when I publish to Production. For example, on the Application Tab I set the Assembly name to MyApp2011Test instead of MyApp2011.  Other settings that include changes like this are in Assembly Information, the Title and the Product.  Then on the Publish tab I for test I set the publishing folder and installation folder to Test server locations and for production to production server locations.  Similarly I set the update location in applicaiton updates to the corresponding server location.  In publish options I set the product name differntly as well.  By doing this, users can run both the test version and the production version on their computer if needed.  Is it possible that for this one user there is a problem from this?  If so, it's very strange because this user only had the Test version...NOT the production version installed.  I can't think of anything else that is different that would cause this issue to happen NOW for this user.  If anyone has another thought on the subject, anything else I could check on, please let me know.

    ----- ADDIONAL INFO -----

    IT let me know that the user has windows updates set to automatically install. 
    Update for Windows XP (KB2524375) was installed in between versions 8 and 9.  How can I find out if this is the culprit?

    Tuesday, March 29, 2011 7:18 PM
  • Hi,

    Somewhere up above, you say this:

    >>I let the ClickOnce publish put a shortcut in the start menu
    >>and then in code when my app starts I make a copy of that .application file
    >>and put it on the desktop if one isn't already there

    If you are really putting the deployment manifest on the start menu (i.e. the .application file), this would explain your problem. It is installing each once as a separate application. You need to copy the shortcut for the applcation, the .appref-ms file, to the desktop and use that.

    Here's how to do it programmatically:


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Monday, April 11, 2011 7:01 AM
  • Hey Robin,

    I did say application file, but that was because I was being lazy and didn't go back and actually look at my code.  I am actually copying the .appref-ms file as you describe.  It had just been a while since I looked at the code, and all I remembered was that it wasn't a normal shortcut...I mean, when you right click on it (even the one in the start menu) it is called an Application Reference not a Shortcut.  I was calling it the application file just to illustrate that distinction, I should have been more accurate.  Thanks for the link, though.

    Monday, April 11, 2011 1:21 PM
  • Well, it was worth a try. How are you copying the shortcut? Just copy and paste? Do they have the problem is they *always* use the start menu shortcut? If there's a problem with the one on the desktop, switching back and forth could cause a problem.

    When it creates the extra folders under \apps\2.0\, do each of the folders have (when you get to the bottom) all of the files and folders? If you find the folder for the exe (probably something like xxxx...tion.., where xxxx is the first four characters of the assembly name), and you double-click on the app, does it work?

    When it creates all the folders, do they also get a start menu option for each one that is like yourappname-1, yourappname-2, etc.,?



    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Tuesday, April 12, 2011 2:16 AM
  • I'm pretty sure this user only uses the desktop shortcut.

    The extra folders under apps\2.o appear to have all of the appropriate folders to run the app.  On the user's machine I didn't think to run the .exe to try it before I "fixed" the problem again by just deleting the 2.0 folder, rebooting, and reinstalling the app.  I made a copy of what was there before I did that, so I could check folders, etc...but I can't use that copy to run the app because it's not a simple app. It functions off a database that it is expecting to be in the user's application data folder, so immediately after I try to run it from my copy it blows because it's not setup properly.

    The start menu only has the one menu option for my application, but it's obviously not connected properly because it has lost it's icon and is using that default icon.

    Please let me know if you can think of any other ideas.  This one really has me stumped.  Especially since it's currently only happening to this ONE user. 

    Friday, April 29, 2011 2:29 PM
  • Hi kschuler,

    I would like to look into the ClickOnce log, maybe we can try to find anything in the log:

    you can ref my post in the following thread to set the ClickOnce log file, it will record the log when the application install/uninstall, then it maybe can help us record the log when it randomly reinstall on your user's side, after you collect the information, you can analysis it or share it to us.

    You can upload it to the "sky driver", and then share the download link to us in your post.

    You will need to put the log file in a folder which the user has the write permission.

    I put the log file to a non-system driver (D:\clickonce\a.log).

    You will need to create the directory(here is folder "clickonce") first then the log file in auto created in the "clickonce" folder.

    note: If you change or set the LogFilePath, it takes effect immediately. If you change or set the LogVerbosityLevel, it does not take effect until the user logs off and logs back in.

    Best wishes,

    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, May 03, 2011 7:13 AM
  • Hi,

    You didn't answer my question about how you are putting the shortcut on the desktop. Are both shortcuts messed up and missing an icon, the one on the desktop and the one on the start menu?

    Have you tried doing a Repair on the .NET Framework installed on that machine?

    Also, you can try the logging method mentioned in my blog and referenced by Mike, but you have to install .NET 4.0 on the machine. Your application does not have to target .NET 4, you just have to install it. This will update the ClickOnce engine to the newest version, which is more robust and more stable then the .NET 2.0 CLR one.

    I would recommend doing a Repair on .NET 3.5, installing .NET 4, and turning on the verbose logging and setting it to go to a folder in the MyDocuments folder of the user and see what you get.

    I'm meeting with the ClickOnce guy again on Friday; we've already discussed your thread, and will ask him about it again. Please post back any information you can retrieve by then.


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Thursday, May 05, 2011 5:41 AM
  • Hi Robin,

    Yes, both shortcuts are messed up.  Here is the code I use to make the desktop version:

            'Get the company and description from the deployment (they correspond to the folder the shorcut
            'is located in within the start menu and the name of the shortcut)
            Dim ad As System.Deployment.Application.ApplicationDeployment
            ad = System.Deployment.Application.ApplicationDeployment.CurrentDeployment
            Dim code As System.Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly()
            Dim company As String = String.Empty
            Dim description As String = String.Empty
            'Get the company
            'NOTE: For this to work, the Assembly Company Attribute must equal the Publisher Name in Publish Options
            If (Attribute.IsDefined(code, GetType(System.Reflection.AssemblyCompanyAttribute))) Then
              Dim ascompany As System.Reflection.AssemblyCompanyAttribute
              ascompany = Attribute.GetCustomAttribute(code, GetType(System.Reflection.AssemblyCompanyAttribute))
              company = ascompany.Company
            End If
            'Get the description
            'NOTE: For this to work, the Assembly Title Attribute must equal the Product Name in Publish Options
            If (Attribute.IsDefined(code, GetType(System.Reflection.AssemblyTitleAttribute))) Then
              Dim asdescription As System.Reflection.AssemblyTitleAttribute
              asdescription = Attribute.GetCustomAttribute(code, GetType(System.Reflection.AssemblyTitleAttribute))
              description = asdescription.Title
            End If
            'If the company is blank, then set it to the description
            If company = String.Empty Then company = description
            Dim desktopPath As String = String.Empty, shortcutName As String = String.Empty
            If (company <> String.Empty And description <> String.Empty) Then
              'Determine what name the desktop shortcut will have
              desktopPath = String.Concat(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "\", description, ".appref-ms")
              'Determine the location of the current start menu shortcut
              shortcutName = String.Concat(Environment.GetFolderPath(Environment.SpecialFolder.Programs), "\", company, "\", description, ".appref-ms")
              'Copy the start menu shortcut to the desktop
              If System.IO.File.Exists(shortcutName) Then
                  System.IO.File.Copy(shortcutName, desktopPath, True)
                Catch ex As Exception
                  'Don't report any errors. If it doesn't work too bad
                End Try
              End If
            End If 'Company and description are filled

    I know we made sure that windows updates were current, but I don't think we tried to do a .Net repair.  I will try that and will install .Net 4 as you suggested.

    I recently published another version of the app and the user in question didn't seem to have any trouble getting the latest version.  Now a bug has been found.  I will try to get the logging in place before I publish the fix today.  Not sure what it will yield if the error doesn't occur.  I still haven't been able to narrow down what causes it to happen.  I'll try to pass along what I find, but not sure I'll get to it by Friday.  :)

    Thanks for all of your ideas.  And your those articles.  They are very clear and easy to follow and so complete. I'm totally using that app to set the log file location.

    Thanks again!

    Thursday, May 05, 2011 1:35 PM
  • On the user's machine I did a repair on .Net Framework 3.5.  I then ran windows updates to make sure all service packs and hotfixes were installed.  They were.  The user already had .Net Framework 4.0.  I used the ClickOnce Logging application to setup the verbose and specify the log file location.  The user had version of the application.  She ran it and updated to version  The log shows no errors, her shortcuts look fine, and the app runs okay.  So my plan is to leave the logging on until it happens again or until enough time has gone by that we are sure it won't happen again.

    Thursday, May 05, 2011 6:53 PM
  • Now, we will go on to follow this question when you got any update about the error from your client's pc system.


    Best wishes,

    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, May 12, 2011 11:26 AM

    Hi kschuler,

    I talked to the ClickOnce guys at Microsoft about this (again). He said this is really weird. If this happens again, please post back the log.The verbose logging will help. Or you can post a comment on the about page on my blog and reference this post, and I will send you my e-mail address, and then you can e-mail me the log and report progress there, and when/if we resolve this we can post it back to this thread.

    Is the user doing something odd in-between those updates? Can you trace any of his steps to see if he's doing something odd before or during that update?

    Are there other ClickOnce apps on that machine that are having these issues or that are not having these issues? Does the user have any vsto add-ins installed?

    Are you modifying any of the files in the ClickOnce folders programmatically or manually? Is the user touching them at all?


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Friday, May 13, 2011 9:36 PM
  • I am seeing the same behavior. My application references no longer connect to the ClickOnce application on my computer. I can go to Apps\2.0 and find my application, there I can launch it (it launches but has errors, probably due to the data path not being set). The point is, this seems to confirm that it is a problem with the linkage of the application reference.

    We have been using this ClickOnce for several years now without this problem. It is only since we started using an outsource IT company that this problem has started. They have a "cleaning" utility that runs on startup and I believe this has something to do with breaking the linkage of the Application Reference.

    One of our client computers has this problem, but it is fixed with a simple reboot. My client computer is not fixed by a reboot. I will eventually try a reinstall after I am done "poking at it".

    Anyone have any thoughts on this? Any ideas what would break the linkage?

    Tom Stevens

    Wednesday, September 05, 2012 4:22 PM
  • Hi Tom. Sorry to hear that others are having this issue too, especially since I still have no real solution for it.  It still randomly happens to couple of machines.  I had it happen to my own machine once.  When I logged in the icons for my app were set to default icons so I rebooted my computer and that fixed it.  I feel like if I would have tried to run the app that I probably would have broken it the same way by creating another set of random folder names....but that's just a guess because I'm confident that's what my other user did.  As for the idea of getting log information, that was a bust.  There was never anything in the logs to indicate an error.  Like you said, it's a doesn't even realize that it's doing something wrong so the log says nothing other than the typical info it records when it runs.

    I haven't had the issue occur in quite a while...kind thinking that maybe windows updates or our company updating it's hardware (and therefore using windows 7 instead of xp) might have resolved the issue for us. *knock on wood*.  Also, the app I work on has an expiration.  Each year we create a new one.  This past year I upgraded to using VS2010 and .Net 4.  I've wondered if perhaps whatever the issue was has been resolved in this case. 

    I don't know if any of this helps you, but it's all the info I've got.  I'd be interested to know if you find anything else out about it, though.  Thanks.

    Friday, September 21, 2012 4:06 PM
  • Hi kschuler.

    I know this threas is very old.

    But i have the same problem as above (now on windows 7) and i`m wondering if there is a solution to this.

    this is the second thread on socia.msdn that clears out the facts well, but stops with no solution.

    Best regards


    Tuesday, April 05, 2016 8:12 AM
  • Hi Franz,

    Sorry to say that I never found a great solution for this.  The program that it was happening to gets recreated every year and my company has since upgraded to using VS 2012.  I'm not sure if that was the fix.  Another thing that I read somewhere made it sound like the certificate could be the issue.  We have since renewed certificates as well.  So perhaps one of those "fixes" the issue if your able to upgrade and/or redo certificates.

    Good Luck,


    Friday, April 08, 2016 6:55 PM
  • thx kschuler. the certificate thing ist a new hint
    Thursday, April 28, 2016 6:46 AM
  • Leosolo - Did you happen to figure out why this was happening in your environment earlier this year? I have 3 different customer environments that this is happening in and was excited to find this thread in hopes of pinpointing the cause. Please let me know if you did or did not identify the issue or if you have any theories. Thank you!
    Monday, December 19, 2016 6:21 PM