visual-studio-2010continuous-integrationnant

Problems upgrading VB.Net 2008 project into VS2010


I have been upgrading several different VS2008 projects into VS2010 and have found a problem with VB.Net projects when they are converted.

Once converted, the .vbproj files have changed from this in VS2008:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
   <DebugSymbols>true</DebugSymbols>
   <DebugType>full</DebugType>
   <DefineDebug>true</DefineDebug>
   <DefineTrace>true</DefineTrace>
   <OutputPath>bin\Debug\</OutputPath>
   <DocumentationFile>CustomerManager.xml</DocumentationFile>
   <WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
</PropertyGroup>

To this in VS2010:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
   <DebugSymbols>true</DebugSymbols>
   <DebugType>full</DebugType>
   <DefineDebug>true</DefineDebug>
   <DefineTrace>true</DefineTrace>
   <OutputPath>bin\Debug\</OutputPath>
   <DocumentationFile>CustomerManager.xml</DocumentationFile>
   <NoWarn>42353,42354,42355</NoWarn>
   <WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
</PropertyGroup>

The main difference, is that in the VS2010 version, the 42353,42354,42355 value has been added; Inside the IDE, this manifests itself as the following setting in the Project Properties | Compile section as:

"Function returning intrinsic value type without return value" = None

This isn't a problem when building code inside Visual Studio 2010, but when trying to build the code through our continuous integration scripts, it fails with the following errors:

[msbuild] vbc : Command line error BC2026: warning number '42353' for the option 'nowarn' is either not configurable or not valid

[msbuild] vbc : Command line error BC2026: warning number '42354' for the option 'nowarn' is either not configurable or not valid

[msbuild] vbc : Command line error BC2026: warning number '42355' for the option 'nowarn' is either not configurable or not valid

I couldn't find anything on Google for these messages, which is strange, as I am trying to find out why this is happening.

Any suggestions as to why Visual Studio 2010's conversion wizard is doing this?


Solution

  • Have you changed your build script to use the 4.0 version of MSBuild? Looks to me like you haven't and MSBuild is complaining it knows nothing about warning 42353 etc. (which would make sense if they were introduced in 4.0)