Category Archives: dotNET

Fix XML encoding in LINQ to SQL files to open up in RTM designer window

When opening a dbml file created in a pre-RTM version of Visual Studio 2008, you will probably see this error message:

Cannot load ‘[filepath].dbml’: Error encountered, check Error List window for details.

Looking in the error list window, you might see the following errors:

Build failed due to validation errors in [filepath].dbml.  Open the file and resolve the issues in the Error List, then try rebuilding the project. 

and

There is no Unicode byte order mark. Cannot switch to Unicode.

Opening up the dbml file in the XML editor, the intellisense does not point out any validation errors.

 I couldn’t see the problem.

Then I created a new LINQ to SQL file and looked at the xml,noticing that the encoding was:

<?xml version=1.0 encoding=utf-8?>

while the old file had

<?xml version=1.0 encoding=utf-16?>

So I modified the old file changing the encoding to utf-8 and voila, my project compiled and the file opened up in the designer.

Article: Writing a Viewer Utility for Crystal Reports

A few years ago, I wrote a little utility for one of my clients who uses Crystal Reports XI to design reports inhouse. They wanted other people on the corporate intranet to be able to see and refresh the reports and if necessary, enter new parameters. Since they weren’t designing reports, it didn’t make sense to buy licenses for everyone and I was able to (very easily) come up with a viewer utility that did the trick. I finally wrote this article about it for ASPAlliance, as they have a great collection of articles (mostly written by Eric Landes).

Writing a Viewer Utility for Crystal Reports

VS2008 Beta2 VPCs will expire November 1st. BACK UP YOUR DATA!

From Jeff Beehler on Microsoft’s VSTS team:

We recently discovered that the VPCs we distributed as part of the VS2008 Beta2 release will expire on Thursday, November 1, 2007, much earlier than we had originally expected.  Since the timeout is at the OS level, we cannot automatically extend the timeout period.  As such we are currently in the process of reissuing the VPCs and expect to make them available early next week.

In the meantime, for anyone that has stored information in TFS that they need to access moving forward, we recommend that you immediately backup the TFS databases in preparation to move them to the updated VPCs.  For information to complete these steps, please refer to the documentation on Moving Team Foundation Server.

We’re still working on additional guidance to respond to this situation.  As more information becomes available, I’ll post it here. 

Note this is NOT talking about regular installations but the actual VPCs

Did I hear an Echo? Yes, it’s Beta2 Beta2 Beta2

VS2008 Beta2 has been released. Read all about it here on Scott Guthrie’s blog. Pay special attention to the special installation instructions. And if you could give me another few hours to get it downloaded before you hop on the bandwagon (or bandwidth as that may be), that would be oh so kind of you.

This is the biggest milestone towards the release. COngrats to all who have been working so hard on this.

ClickOnce on Vista installation problem SOLVED!

A few months ago, ClickOnce broke on my Vista machine where I was doing development. I had the same problem on my Vista laptop which I use for travelling and presentations. The short story about the problem is that whenever I tried to install a clickonce app, Vista went into this never-ending loop of insisting that I install .NET Framework and WinFx Runtime Components. The detailed description of the problem is blogged here.

A few people posted comments saying they had the same problem. Yesterday another person left a similar comment which put me on the trail to try to get it solved again. Patrick Darragh, who was a previous owner of ClickOnce at Microsoft hooked me up with Scott Tucker who is now working with ClickOnce. After I packed up my project and some other files to send to Scott, I emailed some of the people who had left comments to see what their status was.

One of them, John Sinclair, emailed me back saying that he had figured out the problem! (I will refrain from entering about a hundred exclamation points there. :-))

It turned out that by using .NET’s command line tool, MAGEUI to manually build manifests was the source of my problem. What I didn’t realize, until John pointed it out, is that the first time you select a different program to run, Vista has the checkbox for “always use this” ON BY DEFAULT. That’s bad bad bad. I thought defaults were supposed to be false  [Don Kiely has a better end for my sentence:] “safe and sensible”.

 Then when trying to install ANY clickonce application, for example, the XAML Pad app in this post by Charles Petzold, would somehow trigger the .NET installer. It doesn’t make perfect sense to me why trying to open up MAGEUI from Internet Explorer would fire off all of that nonsense, but that’s what it did.

So the fix was to go into Vista’s Default Programs settings (available from the start button, then into “Associate a file type or protocol with a program” and change the default app to “Application Deployment Support Library”. Here is what it looked like before I fixed the problem

Oddly, while IE7 exhibited this problem, Firefox did not. However Firefox must still be using the default app lists because it doesn’t have any information about what to do with .application files in it’s settings: