Rick Strahl's Weblog  

Wind, waves, code and everything in between...
.NET • C# • Markdown • WPF • All Things Web
Contact   •   Articles   •   Products   •   Support   •   Advertise
Sponsored by:
West Wind WebSurge - Rest Client and Http Load Testing for Windows

Ctrl-S in web.config in Visual Studio closes web.config file


:P
On this page:

Ok a couple of weeks ago I started having some strange behavior in Visual Studio: Whenever I've been editing web.config in Visual Studio and then press the Ctrl-S key to save the file the web.config file closes. This is pretty annoying if you're working with the web.config file a lot as I do <s>...

Anyway, according to Omar Khan from Microsoft it turns out the problem is due to a bug in the ADO.NET Entity Framework Designer Tools, which I had installed shortly after installing the ASP.NET 3.5 Extensions that include the ADO.NET Entity framework. The tools are a seperate install from the ASP.NET 3.5 Extensions and they are responsible for providing the diagramming support in Visual Studio. Uninstalling just the Designer Tools solves the web.config issue. This will be fixed in future release but for the moment this particular issue is affecting me too much to leave the designer tools installed.

I've mentioned this in a previous post, but figured I'd repost it here in a more visible spot as a few people seem to have run into this same issue.

Posted in Visual Studio  

The Voices of Reason


 

Henning
January 05, 2008

# re: Ctrl-S in web.config in Visual Studio closes web.config file

Thank you, thank you, THANK YOU!!! This has been bugging me for a couple of weeks now! I thought it was new, interesting behavior in VS2008 that I could not for the life of me find a way to fix.

Mike
January 05, 2008

# re: Ctrl-S in web.config in Visual Studio closes web.config file

It does kind of force you to think about your web.config. Try creating one from scratch with ASP.NET Ajax support, membership and all that new 3.5 crap. I bet no one can do it at once without an example, and save only once when done.

Web.config has become a mess, and it is my understanding that we need a new version of the CLR before they can move all that crap back to the machine level by default.

Anyway, thanks for the tip!

Florian Krüsch
January 05, 2008

# re: Ctrl-S in web.config in Visual Studio closes web.config file

Thanks for sharing! That thing was about to drive me insane...,

Beeradg
February 25, 2008

# re: Ctrl-S in web.config in Visual Studio closes web.config file

I noticed the same behavior - but found out what was causing it by happening upon the output window once, directly after it happened. I saw an error that actually pointed out the entity framework tools and thus, removed the wretched problem-causing add-on. Nonetheless, great job in identifying the issue.

Lucian Bargaoanu
March 04, 2008

# re: Ctrl-S in web.config in Visual Studio closes web.config file

Thanks.

EricTN
April 26, 2008

# re: Ctrl-S in web.config in Visual Studio closes web.config file

Thanks for posting this - I thought my Visual Studio was acting all "special".

Tamir
May 28, 2008

# re: Ctrl-S in web.config in Visual Studio closes web.config file

Thanx. that was pretty helpful.

Wayne Bloss
June 06, 2008

# re: Ctrl-S in web.config in Visual Studio closes web.config file

If you don't want to completely uninstall the Entity Designer tools, you can disable them temporarily by closing all instances of Visual Studio 2008 and then zipping up the following files in C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\

Microsoft.Data.Entity.Design.dll
Microsoft.Data.Entity.Design.EntityDesigner.dll
Microsoft.Data.Entity.Design.Package.dll

After backing up these files, delete them and restart Visual Studio 2008. You will get a message like the following that explains how to re-enable them when you want to play around with the designer:

---------------------------
Microsoft Visual Studio
---------------------------
Package Load Failure

Package 'Microsoft.Data.Entity.Design.Package.MicrosoftDataEntityDesignPackage, Microsoft.Data.Entity.Design.Package, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has failed to load properly ( GUID = {8889E051-B7F9-4781-BB33-2A36A9BDB3A5} ). Please contact package vendor for assistance. Application restart is recommended, due to possible environment corruption. Would you like to disable loading this package in the future? You may use 'devenv /resetskippkgs' to re-enable package loading.
---------------------------
Yes No
---------------------------

Dennis Myren
September 20, 2008

# re: Ctrl-S in web.config in Visual Studio closes web.config file

Another workaround is to mark an item in the solution explorer before saving, which is not part of the project to which the configuration file belongs. Like the solution top node or a file in an other project.

West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2024