简体   繁体   English

Visual Studio软件包(vsix)-未安装Visual Studio的Team City

[英]Visual Studio Package (vsix) - Team City without Visual Studio installed

I'm creating a Visual Studio Package (vsix) (shameless plug: pMixins ) and I want to build the vsix package using the TeamCity continuous integration server. 我正在创建一个Visual Studio软件包(vsix)(无耻的插件: pMixins ),并且我想使用TeamCity持续集成服务器来构建vsix软件包。 TeamCity uses MSBuild in the background. TeamCity在后台使用MSBuild。

I am comfortable installing the Visual Studio SDK on my build agent, but I do not want to install a full version of Visual Studio. 我很舒服在安装Visual Studio的SDK我生成代理,但我不想安装完整版本的Visual Studio。 When I run the Visual Studio SDK installer, it complains that Visual Studio isn't present. 当我运行Visual Studio SDK安装程序时,它抱怨Visual Studio不存在。

How can I use MSBuild (via TeamCity) to build my vsix without having to install Visual Studio?

I have copied over the C:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v11.0\\VSSDK\\Microsoft.VsSDK.targets targets file, but now I'm stuck on how to install the required assemblies: 我已经复制了C:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v11.0\\VSSDK\\Microsoft.VsSDK.targets目标文件,但是现在我被困在如何安装所需程序集上:

    [MSBuild output] (ResolveAssemblyReferences target) ->
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "extensibility". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.Designer.Interfaces". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.OLE.Interop". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.Shell.Interop". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.Shell.Interop.8.0". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.Shell.Interop.9.0". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.Shell.Interop.10.0". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.Shell.Interop.11.0". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.TextManager.Interop". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.Shell.11.0". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.Shell.Immutable.10.0". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.Shell.Immutable.11.0". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "VSLangProj, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "VSLangProj80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output]
        [22:25:37][MSBuild output]
        [22:25:37][MSBuild output] "D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity" (Build target) (1) ->
        [22:25:37][MSBuild output] (ResolveComReferences target) ->
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2015,5): warning MSB3284: Cannot get the file path for type library "80cc9f66-e7d8-4ddd-85b6-d9e6cd0e93e2" version 8.0. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2015,5): warning MSB3284: Cannot get the file path for type library "26ad1324-4b7c-44bc-84f8-b86aed45729f" version 10.0. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2015,5): warning MSB3284: Cannot get the file path for type library "1a31287a-4d7d-413e-8e32-3b374931bd89" version 8.0. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2015,5): warning MSB3284: Cannot get the file path for type library "2ce2370e-d744-4936-a090-3fffe667b0e1" version 9.0. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2015,5): warning MSB3284: Cannot get the file path for type library "1cba492e-7263-47bb-87fe-639000619b15" version 8.0. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2015,5): warning MSB3283: Cannot find wrapper assembly for type library "stdole". Verify that (1) the COM component is registered correctly and (2) your target platform is the same as the bitness of the COM component. For example, if the COM component is 32-bit, your target platform must not be 64-bit. [D:\BuildServer\TeamCity_Agent\work\d059d781c29b14d2\pMixins.VSPackage\pMixins.VSPackage.csproj.teamcity]
        [22:25:37][MSBuild output]
        [22:25:37][MSBuild output] 20 Warning(s)
        [22:25:37][MSBuild output] 0 Error(s)

Nicodemeus is right, it is a non trivial task, but it is possible. Nicodemeus是正确的,这是一项不平凡的任务,但是有可能。

This MSDN article Visual Studio Extensions and Build Servers walks through the process for Visual Studio 2010. 此MSDN文章Visual Studio扩展和构建服务器逐步介绍了Visual Studio 2010的过程。

It looks like you are trying to build a VS 2013 package so there will be some modifications: 您似乎正在尝试构建VS 2013软件包,因此将进行一些修改:

You're going to find this to be a daunting task with many catches along the way and your ultimate solution will be to just install the required assemblies if you have access. 您将发现这是一项艰巨的任务,一路上有很多陷阱,您的最终解决方案将是仅在需要访问权限时安装所需的程序集。

Even if you create the package, the underlying build tasks will be searching for environment variables and registry keys in order to detect the VsSdk install path (seriously, reflect on the VsSdk build task assemblies for Microsoft.VsSDK.Build.Tasks.FolderLocator GetSDKInstallationPath() for an example). 即使您创建了程序包,底层的构建任务也会搜索环境变量和注册表项,以检测VsSdk的安装路径(认真地,对Microsoft.VsSDK.Build.Tasks.FolderLocator GetSDKInstallationPath( )作为示例)。

So to get the VsSdk working without the installer you will need administrative access to the machine and be able to put together an installation package to put in place the necessary registry keys and environment variables and their corresponding bits and created a custom NuGet package to deploy, but when you've gotten to that point you'll see you've reinvented the wheel and should have just installed the requisite VsSdk MSI. 因此,要使VsSdk在没有安装程序的情况下工作,您将需要对计算机的管理访问权限,并且能够将一个安装程序包放在一起以放置必要的注册表项和环境变量及其对应的位,并创建一个自定义的NuGet程序包进行部署,但是到了这一点,您会发现您已经重新发明了轮子,应该已经安装了必需的VsSdk MSI。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM