How to disable warnings in Visual Studio for a Visual Basic web deployment project

For our VB.NET websites, we use SVN for Source Control and CruiseControl.NET for continuous integration.

To use the SVN build number in the CruiseControl.NET compilation, we need to use web deployment projects. Then we replace the Version field in the configuration file with this variable from SVN Labeller

  • $ (CCNetLabel)

This works fine, but my problem is that this variable raises warnings in Visual Studio to solve. I work to remove all warnings, and I left only these two:

  • Warning 1 The version string specified for 'AssemblyFileVersion' in the project file is invalid. C: \ MyProject \ MyProjectDeploy.wdproj
  • Warning 1 The version string specified for 'AssemblyVersion' in the project file is invalid. C: \ MyProject \ MyProjectDeploy.wdproj

I was looking for ways to turn off specific alerts, but they all refer to Windows projects, not website / deployment projects that don't have a Compilation tab.

I found information about using the #pragma warning (disable: 1000), but it seems to be only for C ++, not VB.

This is not a show stopper, but this lazy Friday on Friday annoys me, any help would be appreciated - if reputation sharing worked, I would suggest 20 of my representative for a workable solution :) at least ....

+6
visual-studio warnings web-deployment-project
source share
2 answers

You can ignore errors, this is just strange for vb.net.

Open your .vbproj file with notepad or equivalent and find <NoWarn> and add the error identifier there.

in winforms default 2008, these warnings are already ignored.

<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> 
+9
source share

If you used Nant in your build script, you could just overwrite this version before compiling, and you will not see a warning when you work on your local machines.

+1
source share

All Articles