radzenhq / radzen-blazor-studio

Sample applications created with Radzen Blazor Studio
https://www.radzen.com/blazor-studio
18 stars 3 forks source link

Cant view .razor files - output with errors #103

Closed markosteger closed 1 year ago

markosteger commented 1 year ago

I get errors when opening project created with Radzen Studio which are preventing me to view/edit .razor files. The output window gives me errors in all files (Pages). Most of the errors are:

"--path to file--.razor.cs(38,39): error CS0115: '--ClassName--.OnInitializedAsync()': no suitable method found to override" and "--path to file--.razor.cs(48,33): error CS0311: The type 'XXXX' cannot be used as type parameter 'T' in the generic type or method 'DialogService.OpenAsync(string, Dictionary<string, object>, DialogOptions)'. There is no implicit reference conversion from 'XXXXX' to 'Microsoft.AspNetCore.Components.ComponentBase'."

The app does run without any troubles though

(radzen studio v1.8.1 on win 11)

akorchev commented 1 year ago

Hi @markosteger,

We would need to check your project's source to see what is happening. You can either provide a minimal reproduction here or share with us the actual code. You can host it somewhere and send us a link to info@radzen.com.

akorchev commented 1 year ago

You can also check here - maybe using the preprocessor would help.

akorchev commented 1 year ago

Closing due to inactivity.

PavelVsl commented 1 year ago

@akorchev I frequently encounter similar issues. Radzen Blazor Studio is highly dependent on proper namespace declarations, requiring all files to be organized accurately based on their corresponding namespaces. In many instances, utilizing ReSharper to correct the project's namespaces proves to be helpful. Reproduction of this problem: Create folder under Pages -> scaffold some forms here -> studio is broken