自定义工具错误生成代码失败

发布于 2024-09-30 01:56:26 字数 107 浏览 2 评论 0原文

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

Why this error is appearing? I was just setting some default values in a dataset designer... its second time that this is appearing...
"Custom tool error Failed to generate code. Exception of type 'System.OutOfMemoryException' was thrown"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

美人迟暮 2024-10-07 01:56:26

我刚刚找到了一种重新生成代码的方法。
解决方案资源管理器中,右键单击您的数据集,然后单击运行自定义工具
我是在关闭并重新打开 VS2010 后执行的...
如果您遇到问题,希望这对您有所帮助...
祝你好运

I just found a way to regenerate codes.
In Solution Explorer right click on your DataSet and click Run Custom Tool.
I do it after closing and reopening VS2010...
Hope this help you, if you faced the problem...
good luck

强者自强 2024-10-07 01:56:26

当我在 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>
...

参考/类似问题

This happened to me when I changed the target framework from .net 4.5 to .net 4.8 on Visual Studio 2019.

For me was the Connections tag was looking for a global connection string or DatabaseProvinder that no longer existed.

If you don't need the connection anymore, You can just get rid of it.

Do that:

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.

After that, you will have something like this:

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

Reference / Similar question

寄居者 2024-10-07 01:56:26

我发现这取决于 .NET 的特定版本。就我而言,我永远无法使用 4.8 生成它,但它与 4.8.1 完美配合。鉴于此,请尝试升级您的 .NET 版本。

I've found this to be dependent on the particular version of .NET. In my case, I could never get it to generate using 4.8–but it works perfectly with 4.8.1. Given that, try to upgrade your version of .NET.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文