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?
You can open the project in Visual Studio 2022, Visual Studio 2019, Visual Studio 2017, and Visual Studio 2015.
To upgrade a project created in an earlier version of Visual Studio, just open the project in the latest version of Visual Studio. Visual Studio offers to upgrade the project to the current schema. If you choose No, the project doesn't get upgraded.
In Visual Studio 2017 or lower, Click Syncfusion Menu and choose Essential Studio for ASP.NET Web Forms (EJ1) > Migrate Project…. Right-click the Syncfusion ASP.NET Application from Solution Explorer and select Syncfusion Web (Essential JS 1). Choose Migrate the Essential JS 1 Project to Another version…
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)
I repro this behavior on converted projects. Can't find any docs on what these warning numbers mean, the MSDN library hasn't been updated yet. Nevertheless, my compiler has no trouble with them. Your problem is almost certainly caused by your build server or scripts using an old version of vbc.exe. Be sure the one in c:\windows\microsoft.net\framework\v4.0.30319 compiles the code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With