Skip to content

Useful and snap Extensions for Visual Studio 2022 with the new API focusing on automating and assisting on daily tasks

License

Notifications You must be signed in to change notification settings

luislhg/BrightExtensions

Repository files navigation

Bright Extensions Suite

Bright Extensions Suite is a collection of Visual Studio extensions designed to enhance productivity for .NET developers in general. The suite includes two main projects at the moment: BrightGit and BrightXaml.


Projects

Bright Xaml

BrightXaml offers features specifically for C# XAML developers working with WPF, MAUI, and WinUI. It includes the following features:

  • Show View and ViewModel: Easily open and switch between View and ViewModel files (CTRL+E+Q).

    Click to see demo (gif)
  • Convert Properties to Properties with Set Method: Converts regular properties to properties with a Set (INPC) method - easily use bindings with your properties (CRTL+E+P).

    Click to see demo (gif)
  • Go To Binding Definition: When pressing F12 for a Command generated by MVVM Toolkit [RelayCommand], automatically open the ViewModel where the actual method is - instead of the generator source.

    Click to see demo (gif)

    Note: Only works for [RelayCommand]. Doesn't work for [ObservableProperty] yet due to a limitation of the VS API.

  • Format XAML: Simple and quick Format Xaml which respects your lines, tags and indentation preferences - improving code readability and maintainability.

    Click to see demo (gif)
  • Clean Bin and Obj: Cleans the solution for real by removing bin and obj folders from all projects.

  • Kill XAML Designer: Kills the XAML designer process to fix/restart any issues with the designer.

(BETA) Bright Git

BrightGit provides a set of features to streamline daily VS/Git operations and Entity Framework (EF) migrations within Visual Studio. It includes the following features:

  • Auto Apply EF Migrations: Automatically detects and applies EF migrations (if any) when changing branches.
  • Auto Save/Restore Tabs: Saves and restores all open tabs when switching branches, preserving the context of each branch/issue.

Download Extension

BrightXaml: https://marketplace.visualstudio.com/items?itemName=luislhg.BrightXaml

BrightGit: This is still in beta and can only be installed via local release at this moment


Roadmap / FAQ

The roadmap is subject to change based on feedback and development progress.

  • Several tweaks and QoL improvements are dependent on the new Visual Studio 2022 API.
  • Save/Restore Tabs should be more sophisticated, with a window for manual tab handling.
  • BrightGit could eventually be renamed to BrightVS (includes everything that most .NET developers use).
  • Adding Visual Studio templates for items and projects is under consideration.
  • A third extension to the suite is under consideration.
Visual Studio already has a Format Document, why another Format Xaml? Visual Studio Format Document has only two options to format the Xaml. It will either MERGE ALL Tags into a single line or SPLIT ALL Tags into separate lines, it doesn't respect your line indentation or structure preferences.

The extension's Format Xaml is supposed to be very quick and straight forward, to simply fix this lackluster Visual Studio native format document.

Can you add a ton of options to Format Xaml to customize it? The extension's Format Xaml is supposed to be very quick and straight forward, to simply fix this lackluster Visual Studio native format document.

Very simple customizations and options are welcome, but, if you need something more tuned to your needs, please refer to XamlStyler which is an extension specifically made for this.


Principles guiding this project

  • Developers should focus on bringing ideas to life and not on repetitive tasks.
  • Extension won't do things that Visual Studio can already do.
  • Extension only uses the new Extensibility API (out-of-proc).
  • Extension only supports projects .NET 6.0 or above.
  • Extension should only perform fast and snap actions.
  • Extension should be easy to use and/or integrate with Visual Studio workflow.
  • Everything that is generated (output) should be standard and/or EASILY configurable.

Getting Started to Build / Contribute

Prerequisites

  • Visual Studio 2022 (>= 17.10)
  • .NET 8.0 SDK

Projects Structure

  • BrightExtensions.sln: The solution file.
  • BrightGit: The project containing the BrightGit extension.
  • BrightXaml: The project containing the BrightXaml extension.
  • BrightGit.SharpCommon: A shared library for common models and enums used by BrightGit and BrightGit.SharpRun.
  • BrightGit.SharpAutoMigrator: A console application to be used implicitly by git hooks and auto apply EF Core migrations when branches have been switched.
  • BrightGit.SharpRun: A console application to handle Git operations using LibGit2Sharp.
  • BrightGit.SharpHook: A console application to handle Git events (hooks) using LibGit2Sharp (VS API lacks git events, this project adds native git hook handling).

Contributing

Contributions are welcome! Please follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/YourFeature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin feature/YourFeature).
  5. Create a new Pull Request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions or suggestions, please open an issue or contact the repository owner (luislhg).

About

Useful and snap Extensions for Visual Studio 2022 with the new API focusing on automating and assisting on daily tasks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published