huserben / TfsExtensions

Extensions for TFS 2015+ such as custom Widgets (require TFS 2017) and Build Tasks
MIT License
44 stars 22 forks source link

Installing Trigger Build .vsix in TFS causes Error: XML Document- 'public' is not a valid value for global::Microsoft.VisualStudio.Services.Gallery.WebApi.PublishedExtensionFlags. #90

Closed jawn closed 5 years ago

jawn commented 5 years ago

Steps:

  1. Download benjhuser.tfs-extensions-build-tasks-3.0.2.vsix from the marketplace.
  2. Install in the on premise TFS (in my case, TFS 2017 Update 1)

Expected result:

Actual result: Error message:

Extension package contains invalid character(16, 40). Error: XML Document- 'public' is not a valid value for global::Microsoft.VisualStudio.Services.Gallery.WebApi.PublishedExtensionFlags.

image

Likely cause: extension.vsixmanifest contents: image

I couldn't locate this file in the repo, hence no PR

huserben commented 5 years ago

Hi @jawn

thank you for the input. I think the file is created out of the vss-extension.json

I will change it and then update the extension. However, upon uploading in the marketplace the extension is verified, and I would assume at least there it could/should be detected, I wonder whether we should check with Microsoft if we can detect this before it gets published. As I don't have an on Prem TFS I sadly cannot really easily test these cases.

huserben commented 5 years ago

@jawn I uploaded a new version now where the Public flag is written in uppercase. Do you mind give it another try and let me know whether it worked or not?

jawn commented 5 years ago

@huserben Tested with version 3.0.3. The extension is now listed with the following warning and error message:

The task.json file was not found in contribution triggerbuildtask.

image

huserben commented 5 years ago

hmm i quickly checked the package (one can simply unzip it as the vsix is nothing else but a zip file) and for every task in every version a task.json is there. I wonder if maybe your version of TFS is not supporting to have multiple versions of one task in the same extension. I could try to create a custom package for you if you are willing to download it from another source than the marketplace. I assume you'll need the vsix file in the end to upload it to TFS?

I quickly tried and created a package with just the newest versions of the tasks. Github only let me upload zip files, so please just remove the .zip at the end to get the "regular" vsix. benjhuser.tfs-extensions-build-tasks-3.0.3.vsix.zip

jawn commented 5 years ago

That worked!

huserben commented 5 years ago

Ok very good, thanks for your input @jawn

I will try in that case from now on to create a dedicated package containing only the newest versions, as there seems to be a problem with (older?) versions of TFS with the multiversion packages. I shall accordingly update the docs so other people hopefully don't run into the problem.

As well I'll try to check with Microsoft whether this is a known problem for on Prem TFS versions or its just specific to 2017 Update 1, so we would known when you could actually go back and use the "official" version from the Marketplace

huserben commented 5 years ago

Hi @jawn the newest version of the package will from now on be available under https://github.com/huserben/TfsExtensions/tree/master/BuildTasks/Releases/singleversion in a version that only includes the newest versions of the tasks.

Futhermore I updated the Supported TFS section in the Overview that is as well displayed on the marketplace with the information about possible problems with TFS.

Thanks again for that input.