简体   繁体   English

是否可以通过TFS Build自动安装Visual Studio 2012 C ++可再发行组件?

[英]Can the Visual Studio 2012 C++ Redistributable be installed automatically with a TFS Build?

I have an ASP.Net project that's using the ClearScript.V8 library which relies on the Visual Studio 2012 C++ Redistributable to work. 我有一个使用ClearScript.V8库的ASP.Net项目,该库依赖于Visual Studio 2012 C ++可再发行组件来工作。 I'm faced with the prospect of having to install this on 50+ machines and I'm curious if I can get TFS to do it for me. 我面临必须将其安装在50台以上的计算机上的前景,我很好奇是否可以让TFS为我做这件事。

I realize this straddles somewhere between Stack Overflow and Server Fault so I'm asking on both sites. 我意识到这跨越了堆栈溢出和服务器故障之间的某个地方,所以我在两个站点上都问过。

Assuming that the binaries for ClearScript.V8 is included in your project (either as files copied to the bin folder or as a NuGet package) you should be able to also include the necessary Visual C++ redistributables files as binary files in your project. 假设ClearScript.V8的二进制文件包含在您的项目中(作为复制到bin文件夹中的文件或作为NuGet包),您还应该能够在项目中包含必要的Visual C ++可再发行文件作为二进制文件。 They will then be stored in TFS. 然后将它们存储在TFS中。

If you prefer NuGet packages you can to set up a local NuGet repository within your organization and create a NuGet package with the necessary DLLs which you then can reference from your project. 如果您更喜欢NuGet软件包,则可以在组织内设置本地NuGet仓库,并创建一个具有必要DLL的NuGet软件包,然后可以从您的项目中引用这些DLL。 If NuGet package restore is configured for your solution the package will be downloaded before the solution is built. 如果为您的解决方案配置了NuGet软件包还原,则将在构建解决方案之前下载软件包。 In VS2012 you will have to make some customizations for this to happen on a Team Foundation Build server. 在VS2012中,您将必须进行一些自定义,以使其在Team Foundation Build服务器上进行。

If you are unsure which DLLs you need to include you can use a tool like Dependency Walker to discover which DLL's are required, or you can debug the application and see which DLLs are loaded in the modules window. 如果不确定需要包含哪些DLL,则可以使用Dependency Walker之类的工具来查找所需的DLL,或者可以调试应用程序并查看模块窗口中加载了哪些DLL。 Microsoft has some information which DLLs to redistribute . Microsoft具有一些要重新分发DLL的信息。

If you are having problems with conflicting versions of a redistributable DLL getting loaded you can create a side-by-side manifest to ensure that the correct DLL version is loaded into your application. 如果在加载可再发行的DLL版本冲突时遇到问题,则可以创建并排清单以确保将正确的DLL版本加载到您的应用程序中。 However, as your application is hosted within ASP.NET this is somewhat tricky because w3wp.exe is executed by IIS outside your direct control. 但是,由于您的应用程序托管在ASP.NET中,因此有些棘手,因为w3wp.exe是由IIS直接控制之外执行的。 You will have to create an activation context to configure the manifest used by your application. 您将必须创建一个激活上下文来配置应用程序使用的清单。

If you need to have things installed on your server for a build I would recommend that you use Chocolatey. 如果您需要在服务器上安装某些东西以进行构建,我建议您使用Chocolatey。

  • chocolatey.org/ Chocolatey.org/

This is an implementation of NuGet in PowerShell to explicitly solve the issue that you face. 这是PowerShell中NuGet的实现,用于显式解决您面临的问题。 You can create a powershell file that installs all of the bits that you need and easily include it as a pre build step in TFS 2013. You can use the PowerShell activity from the TFS Community Build Tools to call the PowerShell in TFS 2010 or 2012. 您可以创建一个Powershell文件来安装所需的所有位,并轻松地将其包含在TFS 2013中作为预构建步骤。您可以使用TFS社区构建工具中的PowerShell活动在TFS 2010或2012中调用PowerShell。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual C ++可再发行软件包在哪里安装? - Where are the visual C++ redistributable packages installed? 用于Visual Studio 2012 Update 4安装程序的Microsoft Visual C ++ Redistributable以中文显示 - Microsoft Visual C++ Redistributable for Visual Studio 2012 Update 4 Installer displaying in Chinese C++ Visual Studio 2019 可再发行组件 - C++ Redistributable for Visual Studio 2019 如何自动安装用于Java代码的Visual Studio 2015的Visual C ++可再发行组件 - how to automatically install Visual C++ Redistributable for Visual Studio 2015 used in a java code Visual C ++ 2012可再发行版向后兼容2010版本吗? - Is Visual C++ 2012 redistributable backwards compatible with the 2010 version? 将Visual Studio 2015的Visual C ++ Redistributable添加到InstallShield - Add Visual C++ Redistributable for Visual Studio 2015 to InstallShield Visual Studio 2015 的 C# 和 C++ Redistributable 缺少依赖项 - Missing dependencies with C# and C++ Redistributable for Visual Studio 2015 使用Visual Studio 2012构建Eclipse C ++ Docfrac项目 - Build Eclipse C++ Docfrac project using Visual Studio 2012 我可以将 Visual Studio 2015 C++ Redistributable DLL 与我的应用程序捆绑在一起吗? - Can I bundle the Visual Studio 2015 C++ Redistributable DLL's with my application? Visual c + +可再分发的再分发 - Visual c++ redistributable redistribution
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM