Skip to content

Allow Microsoft.ManifestTool -bl option to read files from any directory #988

Open
@matteo-prosperi

Description

@matteo-prosperi

My team is responsible for packaging VSIX files (normally used for VS extensions).
I have been trying to use the -bl option to supply a list of the files that are packaged into the VSIX.

Unfortunately, it is possible, and indeed very common, to package files from different folders into the VSIX without first copying them into the VSIX project output folder.

If the files passed to -bl comes from a different folder like

C:\MyRepo\obj\SomeProject\Debug\net472\SomeFile.xx

or even

C:\Nuget\SomePackage\17.13.39708\build\SomeFile.xx

Microsoft.ManifestTool.dll fails with the following error:

##[error]Encountered an error while generating hash for file [...] The file at [...] is outside the root path [...]

Using -b to point to a higher level directory is not an option because:

  1. If Microsoft.ManifestTool doesn't have write access to the higher level directory, we get this error:
BuildDropPath directory does not have write permissions 'C:\'
  1. Files could be sourced from different drives, so there wouldn't be a common higher level directory
  2. I believe that changing the -b option would affect the relative paths in the generated manifest.

Since the files packaged in a VSIX don't need to be sourced from the same folder, would it be possible to:

  1. Allow Microsoft.ManifestTool to accept files that are outside of the root path in the -bl list?
  2. Change the -bl option to accept pairs of a full local path and a relative path: the former being the source file on disk and the latter being the relative path inside the VSIX?

So, I would propose that the file passed to -bl option looked like the following:

C:\MyRepo\obj\SomeProject\Debug\net472\SomeFile.xx;./SomePathInTheVsix/SomeFile.xx
C:\Nuget\SomePackage\17.13.39708\build\SomeOtherFile.xx;./SomeOtherFile.xx

Metadata

Metadata

Assignees

Labels

needs investigationOur team will investigate and determine next actions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions