Visual Studio 2013 在 TFS 2010 上构建 - 构建问题

Posted

技术标签:

【中文标题】Visual Studio 2013 在 TFS 2010 上构建 - 构建问题【英文标题】:Visual Studio 2013 to build on TFS 2010 - Build Issues 【发布时间】:2014-02-11 15:24:24 【问题描述】:

管理员和开发人员。我们最近升级到 Visual Studio 2013,并构建了一个 .NET Framework 4.5 ASP.NET MVC 应用程序

请注意我已经在 TFS Build Server 2010 上安装了 .NET Framework 4.5.1 - Registry = HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > NET FRAMWORK SETUP > NDP > v4 > Client > 1033 > Version = 4.5.50938

我已经复制了目录 C:\Program Files (x86)\Microsoft Visual Studio 12.0 - 网络 - 网络应用程序

但是,在尝试构建时,我仍然收到以下错误和警告。

Errors
Filters\AjaxOnly.cs (16): The type or namespace name 'ActionMethodSelectorAttribute' could not be found (are you missing a using directive or an assembly reference?)

 htmlExtensions\BootStrap3Helpers.cs (511): The type or namespace name 'SelectListItem' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrap3Helpers.cs (508): The type or namespace name 'MvcHtmlString' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrapHelpers.cs (31): The type or namespace name 'HtmlHelper' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrapHelpers.cs (30): The type or namespace name 'MvcHtmlString' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrapHelpers.cs (122): The type or namespace name 'HtmlHelper' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrapHelpers.cs (121): The type or namespace name 'MvcHtmlString' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrapHelpers.cs (207): The type or namespace name 'HtmlHelper' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrap3Helpers.cs (509): The type or namespace name 'HtmlHelper' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrapHelpers.cs (206): The type or namespace name 'MvcHtmlString' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrapHelpers.cs (298): The type or namespace name 'MvcHtmlString' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrapHelpers.cs (373): The type or namespace name 'HtmlHelper' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrapHelpers.cs (375): The type or namespace name 'SelectListItem' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrapHelpers.cs (372): The type or namespace name 'MvcHtmlString' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrapHelpers.cs (481): The type or namespace name 'HtmlHelper' could not be found (are you missing a using directive or an assembly reference?)
 HtmlExtensions\BootStrapHelpers.cs (483): The type or namespace name 'SelectListItem' could not be found (are you missing a using directive or an assembly reference?)
 HtmlExtensions\BootStrapHelpers.cs (480): The type or namespace name 'MvcHtmlString' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrapHelpers.cs (299): The type or namespace name 'HtmlHelper' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrap3Helpers.cs (397): The type or namespace name 'MvcHtmlString' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrap3Helpers.cs (400): The type or namespace name 'SelectListItem' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrap3Helpers.cs (398): The type or namespace name 'HtmlHelper' could not be found (are you missing a using directive or an assembly reference?)

 Filters\HandleModelStateExceptionAttribute.cs (14): The type or namespace name 'FilterAttribute' could not be found (are you missing a using directive or an assembly reference?)

 Filters\HandleModelStateExceptionAttribute.cs (14): The type or namespace name 'IExceptionFilter' could not be found (are you missing a using directive or an assembly reference?)

 Filters\SecurityFilter.cs (15): The type or namespace name 'FilterAttribute' could not be found (are you missing a using directive or an assembly reference?)

 Filters\SecurityFilter.cs (15): The type or namespace name 'IAuthorizationFilter' could not be found (are you missing a using directive or an assembly reference?)

 Framework\base_MembershipProvider.cs (6): The type or namespace name 'WebMatrix' could not be found (are you missing a using directive or an assembly reference?)

 Framework\base_MembershipProvider.cs (23): The type or namespace name 'ExtendedMembershipProvider' could not be found (are you missing a using directive or an assembly reference?)

 Filters\AjaxOnly.cs (18): The type or namespace name 'ControllerContext' could not be found (are you missing a using directive or an assembly reference?)

 Filters\HandleModelStateExceptionAttribute.cs (20): The type or namespace name 'ExceptionContext' could not be found (are you missing a using directive or an assembly reference?)

 Filters\SecurityFilter.cs (25): The type or namespace name 'AuthorizationContext' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrap3Helpers.cs (30): The type or namespace name 'HtmlHelper' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrap3Helpers.cs (29): The type or namespace name 'MvcHtmlString' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrap3Helpers.cs (124): The type or namespace name 'HtmlHelper' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrap3Helpers.cs (123): The type or namespace name 'MvcHtmlString' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrap3Helpers.cs (213): The type or namespace name 'HtmlHelper' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrap3Helpers.cs (212): The type or namespace name 'MvcHtmlString' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrap3Helpers.cs (310): The type or namespace name 'HtmlHelper' could not be found (are you missing a using directive or an assembly reference?)

 HtmlExtensions\BootStrap3Helpers.cs (309): The type or namespace name 'MvcHtmlString' could not be found (are you missing a using directive or an assembly reference?)

 Utils\ModelStateException.cs (52): The type or namespace name 'ModelStateDictionary' could not be found (are you missing a using directive or an assembly reference?)

 Framework\base_MembershipProvider.cs (322): The type or namespace name 'OAuthAccountData' could not be found (are you missing a using directive or an assembly reference?)


WARNINGS ----
 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (983): The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (983): The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Data", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (983): The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Data", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (983): The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Data", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (983): The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Data", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Data", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Transactions", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Web", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (983): The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): Could not resolve this reference. Could not locate the assembly "System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): Could not resolve this reference. Could not locate the assembly "System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): Could not resolve this reference. Could not locate the assembly "WebMatrix.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): Could not resolve this reference. Could not locate the assembly "WebMatrix.WebData, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Data", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Data", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Transactions", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Data", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (983): The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (983): The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Data", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Data", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (983): The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Data", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (983): The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

【问题讨论】:

您是否为解决方案启用了 nuget 包还原? docs.nuget.org/docs/reference/package-restore在VS中右键解决方案,点击“启用NuGet包还原” 在 Visual Studio - 解决方案资源管理器中右键单击解决方案“解决方案名称”,我没有看到“启用 NuGet 包还原”选项。我有 Visual Studio 的最新 Nuget 包管理器。 你能在 Visual Studio 中看到一个 .nuget 文件夹吗?它应该在顶部。 我发现了这个问题。必须安装 MVC 4。它缺少程序集。 我还安装了 - msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx 仅 .NET Framework 4.5.1 并重新启动了服务器和 BAMMMMM !!!!!!构建零错误和零警告。希望这对其他人有所帮助。 【参考方案1】:

感谢大家的帮助。以下信息有助于提供 ASP.NET MVC4 在构建服务器上正确构建。 主要问题是缺少程序集 -

在我们的构建服务器上安装了以下内容以纠正问题

必须通过从以下位置下载 MVC 4 在构建服务器上 - http://www.asp.net/mvc/mvc4

适用于 Windows 8 的 Windows 软件开发工具包 (SDK) - http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx

非常重要我从我的开发机器上复制了目录,因为我们正在使用 Visual Studio 2013 进行开发。

C:\Program Files (x86)\Microsoft Visual Studio 12.0\(我从 *** 上的其他帖子中了解到这一点)

网络

Web 应用程序

在 PROCESS 选项卡中为发送到 MSBUILD 的构建定义添加了以下构建参数

/p:AllowedReferenceRelatedFileExtensions="none" 阻止 .pdb 和 .xml 文件输出

/p:IsAutoBuild="True" - 将以下内容添加到 .csproj

将以下内容添加到 .csproj 或 .vbproj 的末尾,以允许对 .webconfig 进行 xml 转换。您将需要卸载项目文件。

<Target Name="BeforeBuild">
</Target>
<!--<Target Name="AfterBuild">
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)" />
</Target>-->
<Target Name="AfterBuild" Condition="$(IsAutoBuild)=='True'">
 <ItemGroup>
   <DeleteAfterBuild Include="$(WebProjectOutputDir)\Web.*.config" />
 </ItemGroup>
 <TransformXml Source="Web.config" Transform="$(ProjectConfigTransformFileName)" Destination="$(WebProjectOutputDir)\Web.config" />
 <Delete Files="@(DeleteAfterBuild)" />
</Target>

/p:VisualStudioVersion=12.0 - 确保您正在为 VS2013 构建

/p:DebugSymbols=false - Build 一直只推出主项目 .pdb,这导致它停止输出。

/p:DebugType=None 也停止 DEBUG 符号

重新启动服务器和 BAMMMMM !!!!!!构建零错误和零警告。希望这对其他人有帮助。

【讨论】:

【参考方案2】:

很高兴听到您解决了这个问题,但如果您以后遇到问题,我建议您在构建服务器上正确安装 Visual Studio,而不是将开发 PC 的一部分复制到其中。通过零敲碎打,您可能​​会遇到各种损坏,并且不会从诸如 Visual Studio 的 Windows 更新之类的东西中受益(这意味着使您的构建服务器与您的开发 PC 保持同步将更加困难)。随着时间的推移,当您尝试将新版本的 Bulld 系统拼凑在一起时,事情可能会变得越来越不稳定。

【讨论】:

以上是关于Visual Studio 2013 在 TFS 2010 上构建 - 构建问题的主要内容,如果未能解决你的问题,请参考以下文章

Visual Studio 2012与TFS 2013的兼容性

Visual Studio 2013 在 TFS 2010 上构建 - 构建问题

在Visual Studio 2013中更改TFS源代码控制映射

如何将 Visual Studio 2013 连接到 TFS 2018 服务器

筛选 Visual Studio 2013 TFS 合并到仅实际更改的文件

项目未显示为在Visual Studio 2013中签入TFS