Wednesday, January 7, 2009

Where to find the Devenv.exe /resetskippkgs command

If you install Visual Studio 2008 Standard Edition after running the VS 2008 Professional 90 day trial you may get a package load failure when you start the Standard environment.

The error message recommends running "devenv /resetskippkgs" from the command line, but no location is specified and the path was not recognized on my PC so the command did not run

For visual studio 2008 the command is found in the C:\Windows\Microsoft.NET\Framework\v3.5 directory. Make sure you have shut down any open instances of VS before running this command. The command will open a new instance, which I closed immediately in order to save the updated settings. No more warnings about packages since then

Installing Visual Studio 2008 Standard after running the VS2008 Professional trial

I could not find anything on this so here's a post to say it was easy to install Visual Studio 2008 Standard edition after running the Visual Studio Professional trial version. So far no trouble working with my web application, windows forms, windows service, and windows DLL projects that were upgraded from VS 2005 using the 2008 Pro trial version.

I installed Standard on day 89 of the trial. When I started the IDE it defaulted to the Pro trial, so I went to Control Panel, Programs & Features (Vista), and selected uninstall on the "Microsoft Visual Studio 2008 Professional - ENU" entry.

That launched an installer looking essentially the same as the VS2008 Standard installer, but with a "maintenance mode" label. Next, selected Add/Remove, and confirmed yes to "remove all of Visual Studio 2008". The warning sounds a bit ominous, but it removes just the Pro version and after that my opened up in Standard just fine. There was a single warning about a package not loading which apparently can be resolved by running devenv with the /resetskippkgs option.

Tuesday, January 6, 2009

New setup project MSI requires .NET Framework 3.5 even though project targets other Framework

If you create a new Setup project in VS2008 for a project targeting Framework 2.0 it will prompt the user to install Framework 3.5 even if it is not needed.

To fix this right-click on the Setup project in the solution explorer, select View, Launch Conditions. Right-click on the ".Net Framework" item, select Properties Window, then select your appropriate framework version (e.g. 2.0.50727)

Next time you build the solution the MSI will require only the appropriate Framework.

Tuesday, December 23, 2008

Visual Studio 2008 unable to build due to corrupted XML documentation file in referenced DLL

Just resolved a vexing problem that does not seem to be described elsewhere. I have a Visual Basic application which references a DLL built by another VB project. A couple months ago the DLL generated an XML documentation file during one of the first build attempts on Visual Studio 2008. I only wanted to verify I could build so I didn't notice or care about the XML file.

When I later tried to build again the XML file could not be overwritten. I could not delete or rename the file as Administrator or any other user. I finally de-selected the XML documentation checkbox in the Project in order to generate new builds of the DLL

Today I was blocked from building a project that references that DLL. Each time I tried it would fail while trying to copy the XML documentation file.

I finally booted to safe mode and let the OS do a low-level disk scan (CHKDISK?). The system found and removed the corrupted XML document file.

I guess I should have tried looking at the disk earlier, I've never had a situation where even Administrator could not alter or delete a file (other than malware).

Can not recall how the XML file could have been corrupted, but I'd guess it was an aborted build. I found threads that mentioned the XML file gets renamed during the build process, and can get "sticky" if you abort a build, so maybe this was a manifestation of that.

Bottom line is if you ever get an error saying something like "access denied" when trying to copy, rename, overwrite, or change settings on the XML documentation file consider running CHKDISK or the like before dynamiting your computer.

Thursday, December 18, 2008

Word Mail Merge "Not Responding"

I ran into an issue doing a mail merge today that, while it falls into the user-generated DOH! category, is still worth documenting. The symptom was a totally non-responsive instance of Word when I tried to do the last step "Edit Individual Items".

I have about 140 items in the merge. I selected the "ALL" button to fixup some labels manually and save the file, but Word would never come back and I'd have to kill everything and start over.

The DOH! moment came when I finally tried selecting items 1 through 150 instead of ALL. Word came back quickly with the correct data. In hindsight it's obvious Word was reading too many records from Excel. I had applied formatting to a column (not just the cells with data), and I think that was what caused Word to read all 65,555 rows from the Excel file when I told it to merge ALL.

You can confirm this by scrolling down the items in the window that pops-up when you select a data source. You can apply a Filter (e.g. Company - not equal to - blank) at this stage to eliminate the ghost rows.

DOH!

Wednesday, December 17, 2008

Ctrl+Alt+End to reboot over Remote Desktop

To reboot the remote PC in a Remote Desktop session use Ctrl-Alt-End rather than Ctrl-Alt-Del. On XP systems select "Shutdown" and you will get a choice whether to restart or go cold

Monday, December 15, 2008

"Toner Low" on Brother HL 4040 printer

Okay, it's not a VB note, but it's worth sharing. My Brother 4040 printer was refusing to print due to "Toner Low" on multiple cartridges. There was plenty of toner in the cartridge, of course, but blocking the sensor holes with electrical tape did not reset the alarm. After some hunting found this article that describes how to reset the internal page count for the cartridge. The specific instructions for the 4040 were buried in the article, so here they are:

(1) open front door
(2) hold down Cancel button
(3) press Reprint button

The Devices Reset menu appears. Arrow up/down to find your cartridge. I reset both H and S settings for both M and C cartridges

After closing the front door a "Drum Error" appeared. Rather than hunting down the cause I manually reseated both the M and C cartridges and the error disappeared.