1

为什么会出现这个错误?我只是在数据集设计器中设置了一些默认值......这是第二次出现......
“自定义工具错误无法生成代码。抛出了'System.OutOfMemoryException'类型的异常”

4

2 回答 2

8

我刚刚找到了一种重新生成代码的方法。右键单击您的数据集并单击
。 我在关闭并重新打开 VS2010 后执行此操作... 希望这对您有所帮助,如果您遇到问题...祝您 好运Solution ExplorerRun Custom Tool


于 2010-11-04T01:21:50.540 回答
0

当我在 Visual Studio 2019 上将目标框架从 .net 4.5 更改为 .net 4.8 时,这发生在我身上。

对我来说,Connections 标签正在寻找不再存在的全局连接字符串或 DatabaseProvinder。

如果您不再需要连接,您可以摆脱它。

去做:

1- Right-click on the .xsd file chose open with and chose 'XML (Text) Editor', or another text editor that you prefer. 

2- Delete de content of the Connections tag and closes it.

之后,您将拥有以下内容:

...
<DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
    <Connections />
    <Tables />
    <Sources />
  </DataSource>
...

参考/类似问题

于 2020-11-17T12:37:24.803 回答