1、打开.dbml所在文件夹,运行sqlmeta-X64.bat或sqlmeta-X84.bat (根据自己的电脑) 2、运行下 Linq序列化.exe (可不运行) 3、右键项目中的 .dbml 运行自定义工具。 OK!