renevanosnabrugge / vsts-promotepackage-task

Promote a package in VSTS to a Release View
MIT License
21 stars 25 forks source link

Package not found because of XML namespace #27

Closed georgeslegros closed 4 years ago

georgeslegros commented 5 years ago

I know that this issue looks a lot like #26 but as I cannot confirm that, I decided to create a separate issue.

We are trying to use the task but it seems that the xmlns looked up in this line is as follow:

http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd

In our nupkg, the package xmlns is as follow:

http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd

Therefore, the package is no found.

For reference, here is the task output:

2019-07-25T08:39:26.7316319Z ##[section]Starting: Promote package to Release View
2019-07-25T08:39:26.7320036Z ==============================================================================
2019-07-25T08:39:26.7320224Z Task         : Promote package to Release View
2019-07-25T08:39:26.7320400Z Description  : Promotes a package to a Release View in VSTS Package Management
2019-07-25T08:39:26.7320549Z Version      : 1.4.2
2019-07-25T08:39:26.7320686Z Author       : Rene van Osnabrugge
2019-07-25T08:39:26.7320853Z Help         : Version: 1.4.2. [More Information](https://github.com/renevanosnabrugge/vsts-promotepackage-task/wiki)
2019-07-25T08:39:26.7321050Z ==============================================================================
2019-07-25T08:39:27.9444650Z Promoting package(s) by reading metadata from package file(s) matching pattern '**/*.nupkg' from root directory 'C:\agent\_work\r19\a\MYPROJECT - CI\nupkg'
2019-07-25T08:39:28.3904276Z Matching paths found:
2019-07-25T08:39:28.3906111Z C:\agent\_work\r19\a\MYPROJECT - CI\nupkg\MYPROJECT.1.0.1.12130.nupkg C:\agent\_work\r19\a\MYPROJECT - CI\nupkg\MYPROJECT.Models.Datapoints.1.0.1.12130.nupkg
2019-07-25T08:39:28.4719812Z Promoting version  of package  from feed 9c2c3b50-7372-47ad-8488-3466abcf77bd to view 5aeb47e9-d571-47bc-a577-d10505f91b37
2019-07-25T08:39:29.0270185Z ##[error]Package  could not be found
2019-07-25T08:39:29.0507855Z ##[section]Finishing: Promote package to Release View

So as you can see, there are 2 .nupkg found but it cannot find any package to promote.

Thanks.

renevanosnabrugge commented 5 years ago

Currently on holidays so it has to wait :)

Verstuurd vanaf mijn iPhone

Op 25 jul. 2019 om 11:06 heeft georgeslegros notifications@github.com<mailto:notifications@github.com> het volgende geschreven:

I know that this issue looks a lot like #26https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frenevanosnabrugge%2Fvsts-promotepackage-task%2Fissues%2F26&data=02%7C01%7C%7C106996eb1ee9469df0f108d710df4f50%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636996423596274575&sdata=pyExX1BYRsvccrZmmBN8bGuI8sC3yVuw2L3Sg7YzyMA%3D&reserved=0 but as I cannot confirm that, I decided to create a separate issue.

We are trying to use the task but it seems that the xmlns looked up in thishttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frenevanosnabrugge%2Fvsts-promotepackage-task%2Fblob%2Fmaster%2Fvsts-promotepackage-task%2Fvsts-promotepackage-task.ps1%23L212&data=02%7C01%7C%7C106996eb1ee9469df0f108d710df4f50%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636996423596284580&sdata=prFeDym86ysW%2FALdjxjsL8aswneg4f67%2B2awkuViNtU%3D&reserved=0 line is as follow:

http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd

In our nupkg, the package xmlns is as follow:

http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd

Therefore, the package is no found.

For reference, here is the task output:

2019-07-25T08:39:26.7316319Z ##[section]Starting: Promote package to Release View 2019-07-25T08:39:26.7320036Z ============================================================================== 2019-07-25T08:39:26.7320224Z Task : Promote package to Release View 2019-07-25T08:39:26.7320400Z Description : Promotes a package to a Release View in VSTS Package Management 2019-07-25T08:39:26.7320549Z Version : 1.4.2 2019-07-25T08:39:26.7320686Z Author : Rene van Osnabrugge 2019-07-25T08:39:26.7320853Z Help : Version: 1.4.2. More Information 2019-07-25T08:39:26.7321050Z ============================================================================== 2019-07-25T08:39:27.9444650Z Promoting package(s) by reading metadata from package file(s) matching pattern '*/.nupkg' from root directory 'C:\agent_work\r19\a\MYPROJECT - CI\nupkg' 2019-07-25T08:39:28.3904276Z Matching paths found: 2019-07-25T08:39:28.3906111Z C:\agent_work\r19\a\MYPROJECT - CI\nupkg\MYPROJECT.1.0.1.12130.nupkg C:\agent_work\r19\a\MYPROJECT - CI\nupkg\MYPROJECT.Models.Datapoints.1.0.1.12130.nupkg 2019-07-25T08:39:28.4719812Z Promoting version of package from feed 9c2c3b50-7372-47ad-8488-3466abcf77bd to view 5aeb47e9-d571-47bc-a577-d10505f91b37 2019-07-25T08:39:29.0270185Z ##[error]Package could not be found 2019-07-25T08:39:29.0507855Z ##[section]Finishing: Promote package to Release View

So as you can see, there are 2 .nupkg found but it cannot find any package to promote.

Thanks.

ā€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frenevanosnabrugge%2Fvsts-promotepackage-task%2Fissues%2F27%3Femail_source%3Dnotifications%26email_token%3DABOH2WQICCVXUBZRVNP6MHLQBFUHNA5CNFSM4IGYPSL2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBNS7CA&data=02%7C01%7C%7C106996eb1ee9469df0f108d710df4f50%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636996423596294591&sdata=qAILbecBVfWNWNDZp3UaXf87GqlwAZ5XTPIrvPvaG9E%3D&reserved=0, or mute the threadhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABOH2WSDF7UR7ABTTWY6WVTQBFUHNANCNFSM4IGYPSLQ&data=02%7C01%7C%7C106996eb1ee9469df0f108d710df4f50%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636996423596314613&sdata=dzmasjVdzCzQr0lUU0gz3KPm9mUNrr5VgkKE0zmK%2FD4%3D&reserved=0.

NightOwl888 commented 5 years ago

@georgeslegros

I submitted a PR #30 with a fix for this. I had no idea that there was more than one nuspec schema in use.

If you need it immediately, you can build the package locally and then share it with your own organization. See the Package your extension instructions here.

georgeslegros commented 5 years ago

This is awesome! Not sure I'll go through deploying it myself, it can definitely wait as we've found a workaround by specifying exactly what packages needs to be created but that will definitely simplify the builds when it's released!

Thanks!

clairernovotny commented 5 years ago

There are many nuspec schema's in use, you don't want to hardcode them. I would recommend dynamically using the root namespace.

abergie commented 5 years ago

@NightOwl888 Thanks for the fix! Packaged and published extension from your PR branch #30 and verified it has resolved this issue.

rpearson-catdevnull commented 5 years ago

I've just hit this issue too. Would be good to see this PR included when @renevanosnabrugge is back from holidays šŸ˜„

rpearson-catdevnull commented 5 years ago

So this issue appears to be resolved. I can see that version 2.0.4 of the extension is now in use and this is working as expected (was broken in 2.0.2). Thanks for resolving this so quickly!