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

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

问题描述

我们正在使用数据集在应用程序的各个节点之间投放少量数据.

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

Visual Studio 数据集工具养成了一种奇怪的习惯,即每次构建完成时都会创建一个新设计器.

所以,项目看起来像这样

<上一页>我的数据集.xsd- 我的数据集.cs- MyDataset.designer.cs- ....

然后执行一次构建,结果是

MyDataSet.xsd- 我的数据集.cs- MyDataset.designer.cs- MyDataset1.designer.cs- ....

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

这是一个小小的不便,但如果有人进行了更改并且不执行上述操作,则生成的程序集不包含他们的更改.

除了不使用数据集之外还有什么建议吗?

解决方案

关闭你的项目.在 XML 模式下编辑 project.csproj 文件.您会在该组中找到一个条目,内容如下:

<None Include="*myDataSet*.xsd"><子类型>设计师</子类型><Generator>MSDataSetGenerator</Generator><LastGenOutput>*myDataSet*1.Designer.cs</LastGenOutput></无>

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

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

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.

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
 - ....

Then a build is performed and the result is

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

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?

解决方案

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>

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天全站免登陆