I have a dataset (*.xsd) with table adapters. I needed to change one of these adapters because of the new fields in my database. The current one has been working fine for months.
I load up the xsd and try to preview data off of one of the adapters.
datasetname.tableadaptername.Fill,GetData () could not be previewed.
Unable to find connection ‘PRODConnectionString’ for object ‘Settings’. The connection string could not be found in application settings, or the data provider associated with the connection string could not be loaded.
Confused, I create another dataset. Add a table adapter using the default choices. The connection string is already preloaded from my web.config file. I can preview data for this table adapter and everything works fine.
I save the new dataset and recompile. I get an error!
The custom tool ‘MSDataSetGenerator’ failed. Unable to convert input xml file content to a DataSet. Requested value ‘Properties’ was not found.
Error 27 Custom tool error: Failed to generate code. Unable to convert input xml file content to a DataSet. Requested value ‘Properties’ was not found.
How to resolve this issue?
I have been trying for nearly 3 days and finally the solution to this problem. This is the way to do it
1. Create a new class library in your Project Solution and create a new dataset call it, dataset1, with a table adapter. Configure the table adapter for a particular connection string
2. Compile and right click on the dataset and select open with. Choose XML Editor. Copy the everything between <Connections> </Connections>
3. Now drag and drop your dataset which you were having problem to to the newly created project. Open it with XML Editor and look for the tags <Connections> and replace it with above
4.Inspect the xml through out and update whenever there is ConnectionRef. <DbSource ConnectionRef=”PROD (Settings)”
5. Finally, Clean and Build the Solution. It should work
