Posts tonen met het label Visual Studio. Alle posts tonen
Posts tonen met het label Visual Studio. Alle posts tonen

donderdag 24 maart 2011

VS2010 Settings not updating

Nitty gritty detail, could drive you mad.

In Visual Studio 2010 I have a C# Windows application. I changed the connectionstring for the database in the app.config file. Later, I opened the Properties | Settings. VS noticed that the app.config had changed and suggested to change the settings accordingly. Yes, VS, I would like that, thank you. 

But then (as it turned out much later), it does NOT change the default setting in the Settings.Designer.cs, in the

[global::System.Configuration.DefaultSettingValueAttribute(....)]

When you simply run the application, it will read app.config (or actually the values that were copied to <applicationname>.exe.config). But when you - a I did - use it's classes from a Test project, it will only use the default setting.

Solution: open the editor in the Properties | Settings designer, test your connection (if you want to), and then save the setting. Now VS sees that you altered it, and adjusts the .cs file accordingly.

dinsdag 17 februari 2009

Visual Studio extensions

Resharper is said to be very good, although it slows VS down. I don't know, because I never used it and I do not intend to pay that much money. Recently I installed two extensions that I'm very happy with. Both are free!

- CoolCommands, with info in the makers' blog, here and here. The newer PowerCommands looks a lot like it, it might be a rebranding.

- Exact Magic Studio Tools. I like the powerful Go To command the most. It's definitely something that should have been a part of the Solution Explorer all along.