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 に答える