Add Related File is an extension for Visual Studio which allows you to quickly add any of these files using the same name as the selected Razor file:
- Code behind (.cs)
- JavaScript (.js)
- Resource file (.resx)
- SCSS file (.scss)
Download and run Extensions/AddRelatedFile.vsix.
Open a Blazor project, right-click on a Razor file in Solution Explorer, go to 'Add Related File', and choose the file you want to add.