24 March, 2011

Force termination of Apps; unable to load installer (.vdproj) file in .NET IDE

Image representing Microsoft Silverlight as de...Image via CrunchBaseI encountered some problems with my applications today, and searched the web for help.

> I saw one article (I quickly closed, so I am unable to reference it here) that instructed the single-line code:

Application.Exit()
Environment.Exit(0)

Application.Exit() is used when you are running a WinForms app.
Environment.Exit() is used when you are running a Console app.

If you need the values to be supplied with the method call, these are below, by standard:

0 - Success
1 - InvalidLogin
2 - InvalidFilename
10 - UnknownError


-----

The other problem I encountered on one development machine, not just today, but a few days back, and also today, is the problem of the .NET IDE not loading the installer project. And this only happens in one machine. All the rest are okay.

What came up in my web search are a couple of suggestions, solutions by users having the same problem:

> Run a registry cleaner, like CCleaner. And this is especially if you have done uninstallation of softwares, especially similar products recently.
> The steps below, taken from a forum's article, :

1. Make sure that Visual Studio user project/item templates location is right. (Menu: Tools > Options > Projects and Solutions)
Default path for VS2005 for projects is: %UserProfile%\My Documents\Visual Studio 2005\Templates\ProjectTemplates
Default path for VS2005 for items is: %UserProfile%\My Documents\Visual Studio 2005\Templates\ItemTemplates
*%UserProfile% refers to C:\Documents and Settings\

2. Run devenv.exe /ResetSkipPkgs (Clears all options to skip loading added to VSPackages by users wishing to avoid loading problem VSPackages, then starts Visual Studio.)

3. Use devenv.exe /setup to restore the VS settings to their original state. If you have, for instance, packages that failed to load and you clicked the button to disable them from loading in the future, you can get them back again with the /setup switch. The original problem that caused the package to fail to load may or may not have been corrected so you may need to correct that before all packages load correctly.
This is similar to /ResetSkipPkgs, but also gets newly installed packages resource info completely registered.

4. Run devenv.exe /ResetSettings to isolate the settings problem

5. Visual Studio uses a cache on disk of all the installed project/item templates, to rebuild the cache, please run devenv.exe /InstallVSTemplates (in Start > Run or "Visual Studio 2005 Command Prompt")



-----

I have applied the single-line code to my affected application, and to the others that are okay, in case they do. I have cleaned the registry using CCleaner. It didn't work.

I have also followed all the steps above, from 1 to 5, and the problem persists.

I have now performed reinstallation of VS2005.


> After some time, I find that this has not been how I expected to be fixing this problem. I thought it was easy. My VS2005 reinstallation encountered some error. I remember manually uninstallating a lot of those MS softwares, like Silverlight, RIA toolkits, Expression Blend, etc., etc. I may have removed some critical softwares...

I am reinstalling those MS softwares that I know are critical, and I'm keeping my fingers crossed...

Till then!



Enhanced by Zemanta

No comments:

Post a Comment