Select theme:
Radzen Blazor Studio builds your application in order to show it in design time. Sometimes this build fails and you will see the "Oh, no! The build failed." message which also asks you to check the Output window. The build could fail for two reasons:
Use the RADZEN
preprocessor constant if there is code you don't want Radzen Blazor Studio to include in design-time builds.
#if !RADZEN
// This code will not be included in Radzen Blazor Studio design-time builds
builder.Services.AddScoped<ITradeService, TradeService>();
#endif
@{ #if !RADZEN }
<RadzenButton Text="Hidden in design builds" />
@{ #endif }
Sometimes the design time build would fail with errors such as CS0246: The type or namespace name 'App' could not be found
. This isually means that you have installed a preview or release candidate version
of the .NET framework which Radzen Blazor Studio does not support. Visual Stidio 2022 Preview installs such .NET framework versions.
You can find the latest installed version by running dotnet --info
in command prompt.
To solve this problem you have two options:
{
"sdk": {
"version": "9.0.200"
}
}
Sometimes certain pages may fail to display in Radzen Blazor Studio. You will see the "Oh, no! Page threw exception during rendering." message.
Radzen Blazor Studio does not execute the Blazor lifecycle methods of your pages in order to prevent unwanted side effects such as database access, HTTP requests or file system access. Instead it adds code that initializes the page members (properties and fields) with sample data. This process could fail in some cases. You can use Radzen Blazor Studio to analyze your project for problems and send us the output.
If you get error NU1301: Failed to retrieve information about XXX from remote source
make sure the default NuGet package source is
nuget.org
. Any third party package sources should come after it. You can verify that from Visual Studio.
Radzen Blazor Studio can analyze your project for potential design-time build or render issues. If you experience problems here is how to run the analysis.
Note: The analyze option requires Radzen Blazor Studio 1.0.6+.
You can terminate the analysis at any time by pressing CTRL+C (Windows) or CMD+C (macOS).
Open a command prompt. Then run the following command
dotnet "c:\Program Files\Radzen Blazor Studio\resources\Radzen.Server\Radzen.Server.dll" --analyze <path to the .sln or .csproj of your application> -o <log file>
For example
dotnet "c:\Program Files\Radzen Blazor Studio\resources\Radzen.Server\Radzen.Server.dll" --analyze c:\apps\BlazorApp\BlazorApp.sln -o log.txt
This command will analyze the c:\apps\BlazorApp\BlazorApp.sln
solution and output the information to the log.txt
file. You can omit the -o log.txt
parameter if you
want to see the output in the console.
Open a terminal. Then run the following command
dotnet /Applications/Radzen\ Blazor\ Studio.app/Contents/Resources/Radzen.Server/Radzen.Server.dll --analyze <path to the .sln or .csproj of your application> -o <log file>
For example
dotnet /Applications/Radzen\ Blazor\ Studio.app/Contents/Resources/Radzen.Server/Radzen.Server.dll --analyze ~/apps/BlazorApp/BlazorApp.sln -o log.txt
This command will analyze the ~/apps/BlazorApp/BlazorApp.sln
solution and output the information to the log.txt
file. You can omit the -o log.txt
parameter if you
want to see the output in the console.
If you hit a problem with Radzen Blazor Studio you can report it by:
If you have a log file from analyzing your project attach it to your report.
Radzen Blazor Studio logs various info (including unexpected exceptions and other problems). The location depends on the host OS:
%APPDATA%\Radzen Blazor Studio\log.txt
~/Library/Application Support/Radzen Blazor Studio/log.txt
~/.config/Radzen Blazor Studio/log.txt
or $XDG_CONFIG_HOME/Radzen Blazor Studio/log.txt
Radzen Blazor Studio will search for _Host.cshtml
or index.html
files in your application and parse them for CSS and JS.
It also supports component specific CSS files (*.razor.css
).
If you are including a CSS file by other means they may not display in design-time.
Radzen Blazor Studio does not execute the Blazor lifecycle methods of your pages in order to prevent unwanted side effects such as database access, HTTP requests or file system access. Instead it adds code that initializes the page members (properties and fields) with sample data.
You can enable the Blazor lifecycle from Radzen Blazor Studio settings (the button in the bottom left corner). Do so at your own risk.
Radzen Blazor Studio does not automatically save file changes. Press ctrl+S
to save the current file or ctrl+alt+S
to save all open files.
Radzen is free to use. You can also test the premium features for 15 days.
Download NowSelect theme: