azure-devops-extension-tasks icon indicating copy to clipboard operation
azure-devops-extension-tasks copied to clipboard

Publish Visual Studio Extension task fails to parse manifest

Open henrybeen opened this issue 6 years ago • 6 comments

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.

henrybeen avatar Feb 26 '19 20:02 henrybeen

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

jessehouwing avatar Mar 04 '19 21:03 jessehouwing

@onlyutkarsh

jessehouwing avatar Mar 04 '19 21:03 jessehouwing

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 avatar Mar 09 '19 08:03 henrybeen

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>

henrybeen avatar Mar 09 '19 14:03 henrybeen

@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

onlyutkarsh avatar Mar 09 '19 14:03 onlyutkarsh

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.

henrybeen avatar Mar 09 '19 16:03 henrybeen