Why does the x.designer.cs part of the LinqToSql dbml triad disappear after editing in a visual editor?

I ran into a particularly annoying problem. I am running a LinqToSql project.

The X.dbml file has three dependent files: X.cs, X.dbml.layout and X.designer.cs
Now, when I drop the extra table into the designer surface and rename the table, I get the property value, this is an invalid "unspecified error".
Weird But then somehow your X.designer.cs file will disappear from your project. And now your assembly is broken. (If you do not use the initial control, God will help you!)

I cannot make changes to my dbml file ...

+3
source share
2 answers

Also, it was called as Connect Bug , that they are marked as "Fixed in a later version" when it ever comes out.

There are also several other ways:

If you have a partial class, make sure that any operators used are in namespaces:

namespace cScape.PM.DataStore.DataContexts
{
  using System.Collections.Generic;
  using System.Linq;

  partial class ConfigDataContext
  {
    [...]
  }
}

Then right-click on the DBML file and select Run Custom Tool. This will lead to the re-generation of your designer file, and you can create your own project - it worked better for me, especially since we use TFS, and this will lead to rather odd checks.

The connection error is related to the middle of this four-month discussion.

+5
source

( KB) , .net 3.5 SP1 .

, ...

  • X.dbml Y.dbml . designer.cs. X.dbml

. dbml. 3.5SP1

0

All Articles