Custom tool error Failed to generate code
Why this error is appearing? I was just s开发者_StackOverflow中文版etting 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"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
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
精彩评论