Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

SourceLink and BitBucketServer - not using correct URL #377

Closed
russellcoombes opened this issue Oct 9, 2018 · 1 comment
Closed

SourceLink and BitBucketServer - not using correct URL #377

russellcoombes opened this issue Oct 9, 2018 · 1 comment

Comments

@russellcoombes
Copy link

Hi,

I am attempting to utilise SourceLink for packages that I am hosting in the company Bitbucket server ( which is on version 4.9.1.) This version requires the SourceLink URL to be created with the suffix "?at=my_commit_number".

The libraries are targeting .net Framework 4.5.2 (we are not using dotnet core), and I have included the package microsoft.sourcelink.bitbucket.git (plus supporting packages - all version 1.0.0-beta-63401-01) in the project that I am looking to package up. The project is also using SourceLink.Create.CommandLine version 2.8.3. I have also tried using microsoft.sourcelink.bitbucket.git versions 1.0.0-beta-63127-02 with no difference in results.

I am using a cake script to call into MSBuild (version 15.7.180.61344), specifically setting the MSBuildSettings to contain the following properties:

`settings

.WithProperty("SourceLinkCreate", "true")
.WithProperty("SourceLinkServerType", "BitBucketServer")
.WithProperty("SourceLinkUrl", "ssh://git@my.company.bitbucketserver/projectname/projectname.git")`

However, no matter what I change, the package is always created with PDBs that contain a URL in the BitBucket format, not the BitBucketServer format. Additionally - I have also tried setting the SourceLinkUrl and SourceLinkServer type in the project's csproj file as well as the project's nuspec file. The result is always the same - a URL that cannot be resolved as the commit number is presented halfway through the URL and not with the suffix "?at=my_commit_number". And then obviously, the module cannot be loaded in Visual Studio.

I have read several articles, one of which you have noted that you have released the BitBucketServerUrlConverter . Can you please advise if there is any problem in using the SourceLinkUrl that I provide to convert to a valid BitBucketServer URL using the above converter when being set into the package?

Many thanks,
Russell

@ctaggart
Copy link
Owner

ctaggart commented Mar 8, 2019

Pretty sure this is solved with dotnet/sourcelink#246

@ctaggart ctaggart closed this as completed Mar 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants