Skip to content
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

Add settings to allow configuration of how extension works #111

Open
markofranjic opened this issue Nov 13, 2019 · 3 comments
Open

Add settings to allow configuration of how extension works #111

markofranjic opened this issue Nov 13, 2019 · 3 comments

Comments

@markofranjic
Copy link

Hi Team,

When I write Task name in string I can run debug task over Visual Studio, but when I add static string name, debut task dissapear

image

@gep13
Copy link
Member

gep13 commented Dec 15, 2020

Currently, the way that Tasks are located in the Cake scripts is done via a hard coded Regular Expression, which you can find here:

https://github.com/cake-build/cake-vs/blob/develop/src/TaskRunner/TaskParser.cs

At some point, it would make sense to provide the ability, via a setting, to control the Regular Expression that is used to identify tasks.

@mrlacey I don't suppose you would have any examples of adding settings into a Visual Studio Extension would you?

@gep13 gep13 added the Feature label Dec 15, 2020
@gep13 gep13 changed the title Debug task doesn't work if add static class in Task name Add settings to allow configuration of how extension works Dec 15, 2020
@gep13 gep13 added this to the 0.4.0 milestone Dec 15, 2020
@mrlacey
Copy link
Contributor

mrlacey commented Dec 15, 2020

@mrlacey I don't suppose you would have any examples of adding settings into a Visual Studio Extension would you?

For simple settings (called Options in VS, such as you'll find under Tools > Options)

  • Create a class that inherits from Microsoft.VisualStudio.Shell.DialogPage [example]

  • Tell VS about the page by adding the ProvideOptionPage attribute on the package. [example]

  • Then call GetDialogPage to access the values. [example]

There are (unexpectedly) lots of other "options" and things that can be done but that should give you the basics.

@gep13
Copy link
Member

gep13 commented Dec 15, 2020

@mrlacey this is great, thank you for all the information!

Will just start with the basics, but if this turns out to be anything like the configuration in the VSCode extension, it could get "interesting" 😄

@gep13 gep13 modified the milestones: 0.4.0, Upcoming Release Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants