views:

2506

answers:

2

Hello,

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

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:

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

I found information on using #pragma warning( disable : 1000 ) but it appears this is for C++ only and not VB.

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

+1  A: 

If you used Nant in your build script you could just have it re-write the version prior to compile, and you wouldn't see the warning when you are working on your local machines.

Jeff Martin
How big of a task would it be to cpnvert to Nant? Is it just a matter of installing it on the Build server then modifying the CrusieControl.NET config to use the Nant build exe instead os MSBuild? If not this is maybe to much work just fix to small annoyances.
David A Gibson
nant can do lots of things to enhance the build experience... you can also store the nant script in SVN and so it can be somewhat selfupdating (you don't have to attach to the CI box to change your build script)
Jeff Martin
+4  A: 

It is possible to ignore errors, it is just in a weird place for vb.net.

Open the .vbproj file with notepad or an equivalent and find the <NoWarn> tag and add the id of the error there.

in a default 2008 winforms, I have these warnings already ignored.

<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
Tom Anderson
did this work for you?
Tom Anderson
i;m going to test it now - if it works it's EXACTLY what I wanted, cheers
David A Gibson