Auto-generation of designer.cs file not working

posted in: Uncategorized | 0

BronwenWeeGo All of a sudden my project stopped autogenerating the designer.cs files for all my page and controls in my Visual Studio 2008 project.  Apart from being really annoying it’s just WRONG!

 

No matter what i did it wouldn’t fix the designer.cs file.  So I started down the track of regenerating the files in a new project and then it happened again!

So I tried deleting the designer.cs file and right clicking on the page and choosing “Convert To WebApplication”.  Then received an interesting error:

 

“The ‘tagname’ attribute cannot be an empty string”

 

There’s no tagname in my page.  So investigate further and find it in the web.config file.  I’ve been using the SilverlightStreamingMediaPlayer which is part of the VS .Net controls.  When you add this control it adds a blank tag attribute:

 

<add tagPrefix="asp" tagName="" namespace="System.Web.UI.SilverlightControls" />

 

To fix:

1. Delete the tagName attribute altogether

2. Regenerate you designer.cs file and all seems happy again.

 

 

Technorati Tags: ,