开发者

FileNotFoundException during ClickOnce Install, missing HKCU\Software\Classes\Software

开发者 https://www.devze.com 2023-04-13 00:53 出处:网络
One of our users has a very serious problem with ClickOnce. The error is a classic one: Following errors were detected during this operation.* [14/10/2011 01:40:25] System.IO.FileNotFoundException

One of our users has a very serious problem with ClickOnce. The error is a classic one:

     Following errors were detected during this operation.  * [14/10/2011 01:40:25] System.IO.FileNotFoundException
      - The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
      - Source: System.Deployment
      - Stack trace:    
at System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore(UInt32 Flags, IntPtr hToken, Guid& riid)    
at System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore()   
at System.Deployment.Application.ComponentStore..ctor(ComponentStoreType storeType, SubscriptionStore subStore)    
at System.Deployment.Application.SubscriptionStore..ctor(String deployPath, String tempPath, ComponentStoreType storeType)    
at System.Deployment.Application.SubscriptionStore.get_CurrentUser()    
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)    at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

But none of the traditional solutions worked. We tried:

  1. Delete folders and files in manifest related to the application
  2. Delete 2.0 folder
  3. Delete App folder
  4. Run mage -cc
  5. Kill dfsvc.exe and try again (dfsvc gets loaded everytime it fails)

I published a helloworld app in .NET 3.5 and .NET 4.0 and copied the entire \publish folder to his machine. This also did not install, giving the same error. Finally, I went to the registry to try to add enhanced logging per RobinDotNet and realized that HKCU\Software\Classes\Software was completely missing. Following some more threads, I went and renamed UsrClass.dat. However, after logging off and logging in, this was not rebuilt. I suspect this maybe the issue. Any thoughts on how 开发者_运维知识库to get ClickOnce working again?

This is a reasonably fresh Windows 7 Professional install.

Update Here's another clue. We are able to rename UsrClass.dat to anything or delete it without any complaint from Windows - so it is not being loaded. On my machine it complains that it is under use.


I would say forget about ClickOnce and get that registry sorted out. This probably isn't a correct topic for StackOverflow, more like SuperUser.com...

Anyway:
1) Try a System Restore, see if you can find a state where that registry hive exists, you might have to go back many weeks.
2) Try exporting that registry hive from your machine and import it into the client machine. See if the error goes away or if it complains about a different hive - it might be possible that the registry is corrupt and there are other hives missing as well...
3) If these two don't fix the problem, then you are better of doing a clean install (it will be faster than looking for the exact cause of the problem and you can be sure that everything will be fixed)
4) Finally uninstall any registry cleaner or pc tuning software. They are known to cause problems, registry corruption being one of them. Also check for hardware issues, the HDD might have developed a bad block(s) or the RAM maybe faulty (run MemTest for 3+ passes to be sure)...


Try uninstalling it and then reinstall it ! I'm sure it should work.


Try deleting folders under:

C:\Users\username\AppData\Local\Apps\2.0\

Except Data folder.

You should delete .NET Framework temporary files too:

C:\WINDOWS\Microsoft.NET\Framework\<version>\Temporary ASP.NET Files


Try a tool for cleaning the registry. I've never experienced that but I think is not related to your application nor the manifest, check a software or tool that could be causing this problem in that user's computer.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号