问题描述
对于我们的VB.NET网站,我们使用SVN进行源代码管理,并使用CruiseCruise.NET进行持续集成.
For our VB.NET websites we use SVN for Source Control and CruiseControl.NET for continuous integration.
要在CruiseControl.NET的编译中使用SVN内部版本号,我们需要使用Web部署项目.然后,我们使用SVN Labeller中的此变量在配置文件中替换版本"字段
To use the SVN build number in the compilation by CruiseControl.NET we need to use Web Deployment Projects. We then replace in the configuration file the Version field with this variable from SVN Labeller
- $(CCNetLabel)
这很好用,但是我的问题是此变量在Visual Studio中导致警告解决方案.我正在删除所有警告,只剩下这两个警告:
This works great but my problem is that this variable causes warnings in Visual Studio for the solution. I'm working to remove all warnings and am left with just these two:
- 警告1在项目文件中为'AssemblyFileVersion'指定的版本字符串无效. C:\ MyProject \ MyProjectDeploy.wdproj
- 警告1在项目文件中为'AssemblyVersion'指定的版本字符串无效. C:\ MyProject \ MyProjectDeploy.wdproj
我已经搜索了禁用某些警告的方法,但是它们都引用Windows项目,而不引用不包含编译"选项卡的网站/部署项目.
I have searched for ways to disable certain warnings but they all reference Windows projects not web site/deployment projects which do not contain a Compile tab.
我发现了有关使用#pragma warning(disable:1000)的信息,但看来这仅适用于C ++,不适用于VB.
I found information on using #pragma warning( disable : 1000 ) but it appears this is for C++ only and not VB.
这不是个停顿点,但是这个懒惰的星期五下午让我烦恼,任何帮助将不胜感激-如果声誉共享有效,但我会提供某人20个代表作为可行的解决方案:)至少....
It's not a show-stopper but is annoying the hell out of me this lazy Friday afternoon, any help would be appreciated - if reputation sharing was working yet I'd offer someone 20 of my rep for a workable solution :) at least....
推荐答案
可以忽略错误,对于vb.net来说,它只是一个怪异的地方.
It is possible to ignore errors, it is just in a weird place for vb.net.
使用记事本或等效项打开.vbproj文件,然后找到< NoWarn>.标签并在其中添加错误的ID.
Open the .vbproj file with notepad or an equivalent and find the <NoWarn> tag and add the id of the error there.
在默认的2008 Winforms中,我已经忽略了这些警告.
in a default 2008 winforms, I have these warnings already ignored.
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
这篇关于如何在Visual Studio中为Visual Basic Web部署项目禁用警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!