Here is my situation:
- I have an existing solution. I used Radzen for VS to add a new Radzen Blazor project to the existing solution. The process modified the solution file. but I fixed it and the new Radzen project and existing projects work fine.
- I then opened the Radzen Studio to try to work on the newly added project, but the "Data" button that allows me to add connection is not activated.
- I followed the instruction and checked the Radzen project, and it looks fine (it is added by Radzen for VS and it should meet all the requirements).
Please help,
Thanks!
David
Hi @David_Yu,
This isn't directly supported. You can only create new applications at the moment.
This means that Radzen Blazor Studio couldn't find a project that it can extend. At the moment Radzen Blazor Studio would use the first project from the solution that has its Sdk attribute in the .csproj file set to "Microsoft.NET.Sdk.Web":
<Project Sdk="Microsoft.NET.Sdk.Web">
Most probably a different project is returned for your solution hence the Data button is disabled.
A possible workaround is to create a new solution that contains just the Radzen Blazor app. All Radzen Blazor Studio features should work as expected. Then you can refer the *.csproj file in your existing solution.
Hi @korchev, thanks for the quick response. This is very helpful. So, I should start with Radzen studio and use it to create a new Radzen project.
Are you saying its more common to have two solutions instead of one when using Radzen? This is probably a matter of preference but just want to confirm. Please let me know.
In the most common case people have one solution with only one project that matches this requirement (start with <Project Sdk="Microsoft.NET.Sdk.Web">
in its csproj file).
I see. My existing solution is for a web API, and it already includes a project with <Project Sdk="Microsoft.NET.Sdk.Web">
. What would you advise for this situation? I suppose this is not an uncommon situation.
My goal is to create a quick and functional GUI, and I like the scaffolding. But it may require access to the infrastructure project of the existing solution. I want to generally stick to DDD if possible.
Did you try my initial suggestion? You can add the infrastructure project to it.
Have in mind that scaffolding requires a data source - either a database or some support API (REST, OData, OpenAPI).
Thanks @korchev. I tried that and it seems to be working.