microsoft / azure-devops-extension-tasks

Pipeline tasks for Azure DevOps Extensions
https://marketplace.visualstudio.com/items?itemName=ms-devlabs.vsts-developer-tools-build-tasks
MIT License
180 stars 80 forks source link

Publish Visual Studio Extension task fails to parse manifest #117

Open henrybeen opened 5 years ago

henrybeen commented 5 years ago

Publish Visual Studio Extension task fails to parse manifest, even though it seems to be valid XML. The relevant log lines:

2019-02-25T21:39:53.6656965Z Searching for manifest file '*.vsixmanifest' in 'C:\buildagent_work\r2\a_HenryBeen.RazorAnalyzers CI\package' 2019-02-25T21:39:53.6747674Z Found manifest file: C:\buildagent_work\r2\a_HenryBeen.RazorAnalyzers CI\package\source.extension.vsixmanifest 2019-02-25T21:39:53.6748226Z Publishing 'C:\buildagent_work\r2\a_HenryBeen.RazorAnalyzers CI\package\HenryBeen.RazorAnalysers.vsix' to Visual Studio marketplace 2019-02-25T21:39:53.6766562Z [command]"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe" publish -payload "C:\buildagent_work\r2\a_HenryBeen.RazorAnalyzers CI\package\HenryBeen.RazorAnalysers.vsix" -publishManifest "C:\buildagent_work\r2\a_HenryBeen.RazorAnalyzers CI\package\source.extension.vsixmanifest" -ignoreWarnings "" 2019-02-25T21:39:54.5849950Z VSSDK: error VsixPub0003 : Encountered an exception when reading the publisher manifest: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

jessehouwing commented 5 years ago

Likely BOM indeed... Can you share the manifest file?

jessehouwing commented 5 years ago

@onlyutkarsh

henrybeen commented 5 years ago

Without any change to the definition or the package, this error has now gone away. Maybe it was also fixed by the recent PR of @jessehouwing. I am running into a new issue however, so I will open a new issue and close this one

henrybeen commented 5 years ago

Here is my manifest file. I checked the encoding, it is UTF-8 and no BOM according to Sublime Text...

<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
    <Metadata>
        <Identity Id="HenryBeen.RazorAnalysers.b0790d9a-42fa-4840-b8b4-932dc94afb48" Version="1.0" Language="en-US" Publisher="Henry Been"/>
        <DisplayName>HenryBeen.RazorAnalysers</DisplayName>
        <Description xml:space="preserve">Roslyn Analyzer and code fix for finding Tempdata properties without public getter and/or setter</Description>
    </Metadata>
    <Installation>
        <InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[15.0,17.0)" />
        <InstallationTarget Id="Microsoft.VisualStudio.Enterprise" Version="[15.0,17.0)" />
        <InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[15.0,17.0)" />
    </Installation>
    <Dependencies>
        <Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.6,)" />
    </Dependencies>
    <Assets>
        <Asset Type="Microsoft.VisualStudio.MefComponent" d:Source="Project" d:ProjectName="HenryBeen.RazorAnalysers" Path="|HenryBeen.RazorAnalysers|"/>
        <Asset Type="Microsoft.VisualStudio.Analyzer" d:Source="Project" d:ProjectName="HenryBeen.RazorAnalysers" Path="|HenryBeen.RazorAnalysers|"/>
    </Assets>
    <Prerequisites>
        <Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,)" DisplayName="Visual Studio core editor" />
        <Prerequisite Id="Microsoft.VisualStudio.Component.Roslyn.LanguageServices" Version="[15.0,)" DisplayName="Roslyn Language Services" />
    </Prerequisites>
</PackageManifest>
onlyutkarsh commented 5 years ago

@henrybeen This is vsixmanifest file, seeing the logs closely now I think you are pointing vsixmanifest file for the task. Instead you should point to publishManifestFile. I have also blogged about creating manifest file here

henrybeen commented 5 years ago

Ah.. today I learned.

I can publish my (Roslyn Analyzer) extension perfectly fine without this file manually. So that's probably why I didn't notice my mistake. I will have a look somewhere next week.