You might also get a related error when building your ASP.NET project with a Linq to SQL class:
Build failed due to validation errors in myfile.dbml. Open the file and resolve the issues in the Error List, then try rebuilding the project.
This issue can be resolved by removing all dots from the connection string key in web.config, see here, so
<add name=”MyApp.Properties.Settings.MyConnectionString” connectionString=”blah”/>
<add name=”MyConnectionString” connectionString=”blah”/>
Then the build should succeed. If you then reset the connection string key to the one with dots and it will still build but you’ll get this message
upon opening the dbml file and the “dotless” connection string will be added to your web.config.
So Linq to SQL doesn’t like the dotted connection string key for some reason.