Problems upgrading VB.Net 2008 project into VS2010

Posted by Brett Rigby on Stack Overflow See other posts from Stack Overflow or by Brett Rigby
Published on 2010-05-10T15:00:30Z Indexed on 2010/05/10 15:04 UTC
Read the original article Hit count: 686

Hi there,

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?

© Stack Overflow or respective owner

Related posts about visual-studio-2010

Related posts about conversion-wizard