1

I have a data set with multiple tables. In one of these tables I have included some scalar queries that take various fields of the table and spit out a single result (for instance average of fields X, Y, and Z), etc. Up to now, I have had great success with this, but now I am getting a very odd issue cropping up.

When I try to add a new scalar query, I am putting my SQL in the screen and naming my query, just like I normally do. However, whenever I do this now, it creates a duplicate of the DataSet.Designer file (now DataSet*1*.Designer), and I start to get compiler errors since all functions within the partial classes are duplicated. I am only able to back out of this by deleting the new designer file, in which case my new SQL query is now unavailable (but I still see it in the original designer view).

I am not sure why this is happening. Can anyone shed any light on why the IDE is creating a new DataSet.Designer file instead of modifying the original?

4

1 回答 1

1

发现了答案。如果某个进程正在使用原始设计器文件,并且 IDE 尝试生成一个新文件,则可能会发生这种情况。不幸的是,旧的仍然存在,这并不令人感到满意。这将纠正问题。

  1. 从您的项目中删除最新的(有问题的)设计器文件

  2. 关闭项目。

  3. 使用文本编辑器打开 vbproj 文件。

  4. 搜索以下..

    <LastGenOutput>myDataSet1.Designer.cs<LastGenOutput>

  5. 从数据集名称中去掉 1

  6. 保存文件并重新打开您的项目。

于 2013-06-04T13:02:54.630 回答