Visual Studio Package (vsix) - Team City without Visual Studio installed

1

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. TeamCity uses MSBuild in the background.

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. When I run the Visual Studio SDK installer, it complains that Visual Studio isn't present.

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:

    [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)
c#
visual-studio
msbuild
teamcity
vsix
asked on Stack Overflow Jun 11, 2014 by Philip Pittle

2 Answers

4

Nicodemeus is right, it is a non trivial task, but it is possible.

This MSDN article Visual Studio Extensions and Build Servers walks through the process for Visual Studio 2010.

It looks like you are trying to build a VS 2013 package so there will be some modifications:

answered on Stack Overflow Jun 13, 2014 by (unknown user) • edited May 23, 2017 by Community
1

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).

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.

answered on Stack Overflow Jun 11, 2014 by Nicodemeus

User contributions licensed under CC BY-SA 3.0