Author |
Topic |
|
grandchain
Junior Member
United Kingdom
22 Posts |
Posted - Dec 27 2020 : 09:29:49 AM
|
Hi,
Blazor is C# in Visual Studio. It includes Razor for markup.
It would be really good if I could have at least some of the features of Visual Assist during my Razor editing, with the following priority order: 1 Snippets 2 Refactor->Rename (including in the C# code-behind) 3 Go to definition
Thanks,
Ian |
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Dec 28 2020 : 08:34:43 AM
|
I have never heard of Razor / Blazor. Do you have a good link offering a simple description of what is going on here?
You say that Blazor is C#, do you mean this is actually just C# code? If so, then what file extension is being used, since if this was a .cs file then VA should already be working normally in this C# code. |
zen is the art of being at one with the two'ness |
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Jan 06 2021 : 09:36:15 AM
|
Thank you for that.
One very simple test project later, I am looking at the files.
"_Imports.razor.g.cs" is C# format, and VA is active, and snippets work as expected. "SurveyPrompt.razor" is HTML, or a close relative.
So you want to enable VA for additional programming languages, and add the razor file extension to one of these languages, which one depends on how you want VA to try and understand the files:
https://support.wholetomato.com/default.asp?W353 |
zen is the art of being at one with the two'ness |
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Jan 06 2021 : 10:32:12 AM
|
.razor files are basically HTML with C# snippets in it, not sure if VA can handle that. Kind of partial classes but outside a .cs file. |
Edited by - Uniwares on Jan 06 2021 10:54:56 AM |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Jan 07 2021 : 06:33:46 AM
|
It won't get any "proper" support, but with VA active in the files, so long as the symbols are recognised, you should get some help. |
zen is the art of being at one with the two'ness |
|
|
Scot
Junior Member
USA
10 Posts |
Posted - Dec 06 2021 : 2:39:06 PM
|
I was hoping to see a better response about Razor/Blazor support. .razor and .cshtml files are not just HTML, and not just C#, they are a hybrid of the two. I expect you'll be seeing more and more of this. Please take another look at adapting VA to parse these files and apply the appropriate HTML or C# features as required. |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Dec 14 2021 : 12:32:57 PM
|
The problem is that they are hybrid files, so basically would need to be parsed as a different file type. I am also a little concerned by the HTML side of things, simply because HTML seems to still be an evolving standard. Useful when you are a developer, more tricky when you are parsing the moving target language.
We will certainly consider Razor/Blazor support more closely if there is enough interest. For now C, C++ and C# are keeping us busy enough. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|