views:

18

answers:

1

I'm using EntLib 5.0 for logging and exception handling, but not for data access.

Everytime I delete the 'database settings' app block using the entlib designer, it re-adds itself after I rebuild the application. It wouldn't be a problem and I'd just leave it except that it creates LocalSqlServer and LocalMySqlServer instances automatically and throws "LocalMy[DB]Server (Connection String): Connection string is a required value" on the next build.

I've just deleted it before every other build, but that's obviously pretty annoying.

So again, how can I delete it such that it'll stay deleted?

+1  A: 

You need to edit your machine.config.

This issue started for me, after I installed Wordpress/MySQL via Web Matrix.

It added this line into my .NET 2.0 machine.config file:

<add name="LocalMySqlServer" connectionString="" />

So all you need to do is open it up in a text editor and comment out that line!

In my case, the file was here: c:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config

And I commented out two providers, e.g.:

<!--    <add name="OraAspNetConString" connectionString=" " />
    <add name="LocalMySqlServer" connectionString="" /> -->
ZhanZhuang