4

I am trying to build a Visual Studio Package project via Hudson CI. This is a Visual Studio 2010 project. The project builds fine in my dev box, but for some reason, I keep getting the following error only when building in Hudson:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\VSSDK\Microsoft.VsSDK.targets(378,5): error : Error trying to read the VSIX manifest file "obj\Release\extension.vsixmanifest". The system cannot find the file specified. (Exception from HRESULT: 0x80070002) [C:\hudson\workspace\MyProject_Daily_Compilation\Source\MyProject.VisualStudio\MyProject.VisualStudio.csproj]

I have verified that the file exists on disk in the following location:

C:\Hudson\workspace\MyProject_Daily_Compilation\Source\MyProject.VisualStudio\obj\Release\extension.vsixmanifest

What could be causing this issue?

Julio Casal
  • 276
  • 3
  • 13

2 Answers2

10

You are likely to experience such error if the user you are running your build as does not have administrative privileges.

So there are 2 solutions:

1) Run your build (build server) with administrative privileges.

or if you can't really change the user your build server is running on

2) and you actually don't need to deploy the VS extension on the build server itself, set the DeployExtension property in your *.csproj file to false.

Microsoft.VsSDK.targets sets that property by default to true

<DeployExtension Condition="'$(DeployExtension)' == ''">true</DeployExtension>

but if you don't need to deploy that extension locally (but rather would prefer to get the *.vsix bundle built you can safely put

<PropertyGroup>
    <DeployExtension>false</DeployExtension>
</PropertyGroup>

The original error is basically happening because the attempt to get the deployment path fails at some point in the build and disrupts successful vsix package generation. By setting the property to false the build doesn't attempt to deploy the extension locally (but a valid *.vsix is generated)

Rafał Nowosielski
  • 810
  • 10
  • 23
  • 2
    You don't have to edit the actual project. It's a property on the project. However, this did fix my issue with TeamCity. – Hank Schultz Jul 17 '14 at 21:32
2

I am guessing you running hudson as a service. If so the "0x80070002 - The system cannot find specified file" could well be due to the user being used to run hudson does not have access.

The quick solution to this is change the "Log on" user for the Hudson service to be your normal account.

Stephen Gennard
  • 1,910
  • 16
  • 21
  • Actually solved it by creating a new machine administrator account for Hudson and using it as the Log On user for Hudson service, but yes this is pretty much the idea. – Julio Casal Oct 05 '11 at 12:26
  • So can anyone say *why* this is happening? Experiencing pretty much the same on TeamCity. – Dmitri Nesteruk Dec 05 '11 at 17:13