mhutch / MonoDevelop.MSBuildEditor

Improved MSBuild editing support
Other
228 stars 26 forks source link

Getting Started? #244

Open laultman opened 3 months ago

laultman commented 3 months ago

Brand new to your tool. Just installed. Read the blog and the ReadMe. Where is the getting started?

A very long time ago, fresh out of college '76, I wrote an application for a customer. I documented it fully on every little nuance of the code and user interface. Back then you had to insert the floppy disk, close the disk drive door, and type in a command. I failed to tell him to insert the disk and close the door. Naturally the command did not work. He was unhappy.

laultman commented 3 months ago

I don't know if this is the intended method of working with this extension or not. But, I opened a second VS instance and instead of opening a solution/project like I normally would, I chose the open folder and navigated to the location where my solution is located. In my case I have Directory.Build.props and Directory.Build.targets. Double-click on a file seems to be the trick. On a side note it is really useful to know something about MSBuild, its reference is here.

mhutch commented 3 months ago

Once installed, this should work automatically for any MSBuild file you open in the Visual Studio source editor. This includes targets and props files, and also MSBuild-based project files such as .csproj files. You don't need to do anything special. It replaces Visual Studio's existing XML schema based IntelliSense for MSBuild files.

For modern "SDK-style" projects, Visual Studio supports editing the backing project file for open projects via right clicking on the project in the Solution Explorer and selecting Edit Project File. For projects using the older MPS project system, you would need to right click on the project and choose to unload it, as the older project system does not allow the file to be open in the editor while it is loaded in the project system.

laultman commented 3 months ago

AH! Good information, "modern" and "SDK-style". Most of our code and templates date back many years or were inherited from other companies. I routinely keep VSC open as my project or solution editor while working in VS. Strange as it seems, we are attempting to modernize our own code base. It is amazing how much plain old C is in our code. "Modern C++ 20" does not get along well with these old libraries. Our reason for this undertaking is to try and reduce the dependency nightmares in multi-architecture support. I spend so much time trying to figure out why/where a procedure call fails. In C++ all these references, conventions, and directives are scattered across every platform that has existed and championed by some developer along the way! This tool brings these outside directives, etc. into view.