MSBuild Editor's experimental version can make developers' lives easier

It was released on March 27, 2024

Reading time icon 3 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

MSBuild Editor's experimental version can make developers' lives easier

MSBuild is a renowned platform that can be used for Microsoft’s Visual Studio software development apps. However, it is not always easy to use. Therefore, Microsoft has released an experimental version of the MSBuild editor.

It will help developers comprehend their project files and use advanced functionality that requires editing the project file directly. The experimental editor understands MSBuild files more than the existing XML schema allows.

In a blog post, Microsoft says:

Although Visual Studio provides a rich UI for managing your project and its settings, you may need to edit your csproj file directly to access certain advanced features that are not exposed in the UI. You may also need to edit csproj files directly when merging changes from source control, or you may be writing targets and props files for local use or for publishing in a NuGet package. If any of these scenarios apply to you, we’d like your feedback on the new experience.

Let’s check out the features of this new experimental editor:

  1. Helps understand your project file
Quick Info on compiler warning codes
  • Gives you Quick Info for XML elements in MSBuild files, properties, items and metadata in MSBuild expressions.
  • The Quick Info popup is intuitive and has deep links to relevant documentation and hyperlinks to references in other files.
  • To understand more about how a property or item can be used, use Ctrl-Click or the Go to Definition command.
  • You can use the Find References command to perform a specific search across all imported files.
Tool window showing result of Find References

2. Code within the editor

IntelliSense for comparands in condition expressions
  • Has IntelliSense almost everywhere in the file with documentation powered by its schemas.
  • Comes with special support for NuGet packages, which allows you to search for package ID and check the package description and a link to its NuGet.org page.
  • Scans all imported MSBuild files.
  • Provides inferred completion for properties, items, metadata, and targets found within these files.
  • Has Tooltips that come with hyperlinks to where the specific property or item is used

Detects problems easily

Error squiggle on a missing quote character in a condition expression
  • Applies a type system to MSBuild
  • Identifies errors associated with malformed values such as URLs or version strings.
  • Its understanding of the MSBuild expression format enables you to catch flawed conditions and expressions.
  • Features Roslyn-style analyzers and offers corresponding code fixes.
  • Detects issues without executing a build.

Takes MS Build editing experience to another level

  • Uses a specialized JSON-based schema format tailored for MSBuild.
  • Allows the definition of documentation and type annotations for MSBuild properties, items, item metadata, and targets.
  • Comes with pre-installed schemas for popularly-used targets and SDKs like the .NET SDK.
  • Allows you to create custom schemas for their MSBuild targets, allowing the MSBuild editor to provide a substantial experience when editing or consuming them.
  • Authors of NuGet packages that contain build targets can ship the sidecar schema in the NuGet Package for a better editing experience for the consumers.

Microsoft urged all users who use MSBuild files to share feedback after using it, as it will help them improve it and make it available by default for all developers.

If you want to use it, search for MSBuild Editor in the Visual Studio extension manager or get it from the Visual Studio Marketplace.

Would you like to take this experimental editor for a spin? Share your thoughts with our readers in the comments section below.

More about the topics: microsoft, MSBuild Editor

User forum

0 messages