-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request for Updated VisualStudio.Extensibility Extension Publishing Guidelines and Improvements to GetSelectedPathAsync Method Behavior #462
Comments
@ynanech - publishing a VisualStudio.Extensibility extension is the same as publishing a VSSDK one. You can find the documentation here: https://learn.microsoft.com/en-us/visualstudio/extensibility/walkthrough-publishing-a-visual-studio-extension?view=vs-2022 Regarding your other questions, throwing an exception when no path is selected does seem unexpected. I'll follow up with the team to see if it's a bug. As to why we're always normalizing the URI to be lowercase, can you tell us why you'd prefer the casing to be preserved? We normalize since there are intermediate services that use the the URI as a key or moniker. If there's a valid scenario where casing should be preserved, we'd love to know so we can discuss whether how this can be supported. |
@tinaschrepfer thank you . URI retains the original character case, and I mainly use it for obtaining the original file name in the currently selected path. |
@tinaschrepfer regarding normalizing filesystem URIs has two potential problems, but only if the extension persists the file URI somewhere:
Unfortunately, Windows doesn't appear to have an API to get the canonical name for a file. All the suggestions I can find online involve getting the directory listing of every directory in the path, and then finding the match to find the canonical directory or file name. Therefore, I suggest not normalizing the path at all. Use the path as provided by MSBuild. That way if the project file includes a file via a glob (for example My feedback doesn't apply if you're absolutely certain that VS extension developers will not persist the filename either to the project file, or any other file, which will later be read and then used to open a file. Finally, I recommend against the use of |
While developing an extension with VisualStudio.Extensibility, I've encountered several issues.
Firstly, regarding the release process of extensions, I couldn't find any up-to-date official documentation or guidelines. The resources I found (like the link #233) seem outdated.
Secondly, when using the
await context.GetSelectedPathAsync(cancellationToken)
method, I noticed that it throws an exception if no path is selected by the user, instead of returning a nullable URI. Moreover, when the method returns a URI, it should preserve the original case of the path rather than converting everything to lowercase.The text was updated successfully, but these errors were encountered: