数据集设计器问题 - Visual Studio 2008 [英] Dataset Designer Issue - Visual Studio 2008

查看:172
本文介绍了数据集设计器问题 - Visual Studio 2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用一个数据集在我们的应用程序中的各种节点之间投掷少量的数据。

We're using a dataset to throw a small amount of data around amongst various nodes within our application.

数据集本身就在一个程序集中,因为它是来自许多其他组件的引用。

The dataset is in an assembly by itself as it is reference from many other components.

Visual Studio数据集工具在每次构建完成后都开发出创建新设计器的奇怪习惯。

The Visual Studio dataset tool has developed a strange habit of creating a new designer everytime a build is done.

所以,项目看起来像这样

So, the project looks like this


MyDataSet.xsd
 - MyDataSet.cs
 - MyDataset.designer.cs
 - ....

然后执行构建,结果是

MyDataSet.xsd
 - MyDataSet.cs
 - MyDataset.designer.cs
 - MyDataset1.designer.cs
 - ....

MyDataSet1设计器包含新的更改,原始设计器未更改。我目前的解决方案是用MyDataset1.designer替换MyDataset.designer,然后重建。

The MyDataSet1 designer contains the new changes and the original designer is unchanged. My current solution is to replace MyDataset.designer with MyDataset1.designer then rebuild.

它是一个轻微的不便之处,但是如果有人进行更改,并且不执行上述操作汇编不包含其更改。

Its a minor inconvenience but if anyone makes a change and doesn't perform the above the resulting assembly doesn't contain their changes.

除了不使用数据集之外的任何建议?

Any suggestions, other than not using datasets?

推荐答案

关闭您的项目。以XML模式编辑项目 .csproj文件。您将在该组中找到一个条目:

Close your project. Edit the project.csproj file in XML mode. You will find an entry in the group that reads:

<None Include="*myDataSet*.xsd">
  <SubType>Designer</SubType>
  <Generator>MSDataSetGenerator</Generator>
  <LastGenOutput>*myDataSet*1.Designer.cs</LastGenOutput>
</None>

更改项目以删除1。保存并关闭文件。重新打开你的项目。

Change the item to remove the "1". Save and close the file. Reopen your project.

当您重新生成数据集时,应该恢复正常。

When you regenerate your dataset, it should be back to normal.

这篇关于数据集设计器问题 - Visual Studio 2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆