Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Add support for Razor/Blazor
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

grandchain
Junior Member

United Kingdom
22 Posts

Posted - Dec 27 2020 :  09:29:49 AM  Show Profile  Reply with Quote
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
18750 Posts

Posted - Dec 28 2020 :  08:34:43 AM  Show Profile  Reply with Quote
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
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2320 Posts

Posted - Jan 06 2021 :  06:30:20 AM  Show Profile  Reply with Quote
https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor

Basically ASP.NET HTML pages with C# code integrated. File extension is ".razor"
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Jan 06 2021 :  09:36:15 AM  Show Profile  Reply with Quote
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
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2320 Posts

Posted - Jan 06 2021 :  10:32:12 AM  Show Profile  Reply with Quote
.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
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Jan 07 2021 :  06:33:46 AM  Show Profile  Reply with Quote
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
Go to Top of Page

Scot
Junior Member

USA
10 Posts

Posted - Dec 06 2021 :  2:39:06 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Dec 14 2021 :  12:32:57 PM  Show Profile  Reply with Quote
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000