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

dotnet - set current solution/project #6

Open
sebasmonia opened this issue Apr 26, 2019 · 4 comments
Open

dotnet - set current solution/project #6

sebasmonia opened this issue Apr 26, 2019 · 4 comments

Comments

@sebasmonia
Copy link

In the last few days I've using dotnet in a multi-project repo.

I've found myself using the prefix args submitted in my last pull request. Also in my local dotnet.el I added more variables to keep track of the last project for build, run, etc. At this rate each function will have it's own variable!!!

I think it would be convenient to have a way to setup a default project so that all commands use it, and allow overrides with C-u.

Sample workflow:

  1. Open some .cs files. Start working
  2. Call dotnet-build, get prompted for csproj/solution
  3. [Maybe?] Get prompted to make this the default for subsequent calls with y/n question
  4. Keep using the same default (if set) unless the command is called with C-u prefix

I think most commands could share the same default, except dotnet-run: build, add reference, etc can work on a whole solution but you usually run only one project within the solution directories.

So in essence we would need 2 variables to track the "current project".
I also think it would be great to show the current projects in the echo area when the dotnet-mode keymap is active, if possible, so you know that you need to add an arg to your call.

This adds some complexity to the package, though, and changes it's behaviour quite a bit. So unless you see an use for these changes yourself, I can keep these in my own branch (when I get around to making them hehe)

@julienXX
Copy link
Owner

I don't have the need for myself but I can see why you would need it though.
It seems like great proposals to me but honestly I don't think I'll have the time to implement them so if feel free to submit a PR if you achieve it :)

@sebasmonia
Copy link
Author

Yeah I've been thinking about it and I would change maybe too many things of how the package currently works.
On the other hand creating a new package sounds like bad for the community.

You might see a PR coming from my end at some point in the future, when I get the time.

@madorian
Copy link

madorian commented Jun 8, 2023

There is no way to set the solution? It asks every time I dotnet-build, it asks for a solution file. Can this be a parameter to the call, maybe, so that I can define my own function?

@sebasmonia
Copy link
Author

I stopped using dotnet last year, that said, I built another interface, based on Transient (Magit) that is pretty different from this one. It includes support for NuGet, handling references. And, after you run a solution, you can re-run the same one every time.

You can find it here: https://github.com/sebasmonia/sharper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants