-
-
Notifications
You must be signed in to change notification settings - Fork 39
feat(bau): add msbuild support #68
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
base: main
Are you sure you want to change the base?
Conversation
I should also note, I haven't written much lua code before, so there's a chance I made some rookie mistakes or wrote things in a way that could be improved. Please don't be afraid to say so if this is the case anywhere! |
@PowerUser64 I've pinned your repo in my config to test this out, but I'm not having much luck. I have a solution with upwards of 70 .csproj projects in it. When I open Compiler and choose to build, it reports
I was hoping it would build the project in which the current file resides. Is this what should be happening? Or do I need to specify the project somehow? I've tried running the build command with a .csproj as the active buffer as well to no avail. Any help would be appreciated. Thanks for all your work on this! |
I've written this integration with compiler.nvim for MSBuild to ease the pain of having to use MSBuild on windows. I've based this work on @Gaweringo's work on adding windows support in #58, since MSBuild only runs on windows. I can change this and/or rebase pretty easily if needed, since I just have one commit here.
This integration provides the following functionality
.sln
) in the same directory (this jkhappens sometimes).sln
fileAlso of note is that msbuild provides LOTS of default targets for each project (there are 438 in one project I have), so I'm only scratching the surface by including the build, run, and clean targets. There are others (like Rebuild), that could potentially be useful too, but so far I've only added these ones so far to bring parity with the default C/C++ configuration. I could add others if it'd be welcome.
The only thing this requires is that
msbuild.exe
be accessible through the user's PATH, which it isn't the case by default on windows. It'd be possible (and likely not very hard) to make some basic logic to find the executable on the filesystem with globing (more about this on SO), but it somewhat feels like stepping outside the scope of this plugin since it adds some potential for variability. I can write some documentation on the wiki to explain this PATH stuff if needed.I'm marking this as a draft for now since #58 is unmerged and I have code from it. Also, I'd like to use this for a bit longer before it gets merged (maybe two weeks from now at most). There could be a bit more tweaking to do with the default list of targets.
Also, thank you to @Gaweringo for all your work on adding windows support to begin with! I might not have attempted this if it weren't for that.