visual-studio-2010 - 将 VB.Net 2008 项目升级到 VS2010 时出现问题

标签 visual-studio-2010 continuous-integration nant

我一直在将几个不同的 VS2008 项目升级到 VS2010,并在转换时发现 VB.Net 项目存在问题。

转换后, .vbproj 文件在 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>

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

主要区别在于VS2010版本增加了42353、42354、42355的值;在 IDE 中,这表现为项目属性 | 中的以下设置。编译部分为:

“函数返回没有返回值的内在值类型” = 无

在 Visual Studio 2010 中构建代码时这不是问题,但是当尝试通过我们的持续集成脚本构建代码时,它会失败并出现以下错误:

[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



我在 Google 上找不到这些消息的任何内容,这很奇怪,因为我正试图找出发生这种情况的原因。

关于 Visual Studio 2010 的转换向导为什么这样做的任何建议?

最佳答案

您是否更改了构建脚本以使用 4.0 版本的 MSBuild?在我看来你没有,MSBuild 提示它对警告 42353 等一无所知(如果它们是在 4.0 中引入的,这将是有道理的)

关于visual-studio-2010 - 将 VB.Net 2008 项目升级到 VS2010 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2803681/

相关文章:

visual-studio - 尝试构建 VS2010 控制台应用程序时访问被拒绝错误(无法写入输出文件)

c++ - Visual Studio 2010 Express Edition 中的 "Cannot open include file: ' ofstream '"错误?

git - 像 Git 这样的 DVCS 是否不适合使用持续集成的团队?

svn - 使用 NAnt 自动添加 SVN

c++ - MSVC++2010 调试器有限制吗?

reporting-services - 如何使用 TeamCity 自动部署/构建 SSAS 和 SSRS 解决方案

jenkins - 如何解决 Gitlab oauth 和 jenkins 日志记录错误

.net - CruiseControl.NET,Nant 真的有必要吗?

asp.net - 将代码从 Subversion 存储库部署到 Web 服务器而不进行构建

visual-studio-2010 - 如何在 Visual Studio 中将源附加到引用的程序集