Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error trying to read the VSIX manifest file... The system cannot find the file specified

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?

like image 845
Julio Casal Avatar asked Sep 13 '25 18:09

Julio Casal


1 Answers

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)

like image 159
Rafał Nowosielski Avatar answered Sep 17 '25 20:09

Rafał Nowosielski