I just installed the Alpha kit, and created a new server project, which fails to build with the output window showing the error: Could not load file or asssembly 'Nuget.Frameworks, Version=126.96.36.199'
dotnet nuget --version shows 188.8.131.52
I have the current SDK installed. (6.0.400 and 7.0.100-preview)
Found this in the log: [2022-09-06 06:50:08.666] [error] Error: System.NullReferenceException: Object reference not set to an instance of an object.
at Radzen.Server.RazorProjectEngineExtensions.GetComponentDescriptors(RazorProjectEngine engine, Compilation compilation) in /Users/korchev/github/radzen-next/Radzen.Server/RazorProjectEngineExtensions.cs:line 27
at Radzen.Server.RazorProjectEngineExtensions.SerializeComponentDescriptors(RazorProjectEngine engine, Compilation compilation) in /Users/korchev/github/radzen-next/Radzen.Server/RazorProjectEngineExtensions.cs:line 71
at Radzen.Server.ProjectServer.Toolbox() in /Users/korchev/github/radzen-next/Radzen.Server/ProjectServer.cs:line 109
Unfortunately this isn't a known issue. Getting this error means that for some reason this package cannot be restored. Does the application run from command line via dotnet run? There is a chance .NET 7 preview interferes in some way but we are not sure.
Just tried the dotnet run and the site works. I uninstalled the .NET 7 preview, but that didn't solve the problem.
I did finally find the cause. The latest version of VS 2022 has been updated to 17.3.3 which includes support for .NET MAUI. It appears that in order to support MAUI, VS still requires a pre-release of MSBuild. So, when a project is opened in RBS, the first line in the Output box shows the version - MSBuild version 17.3.0-preview-22329. If I uninstall VS, the build is successful.
Hmmm, should I do my Blazor development in Visual Studio or RBS?
I'm excited to start learning RBS. I have our software engineering manager interested in getting off of Web Forms and moving to Blazor. One of his directives from the CEO is to cut the cost of developing software, so I am anxious to show that this is the product for them. Hopefully all the developers will have their own copy.
Thank you for investigating further! We will try installing the same version of VS2022 and hopefully this will allow us to reproduce this problem and release a fix for it. RBS is intended to work side by side with Visual Studio.
After many hours of cleanup of installed SDKs, reinstalling Visual Studio multiple times, I finally have been able to get the $dotnet nuget to the correct version. (I just love troubleshooting by trial and error)
It all that had to do with the preview of Visual Studio that was installed. Even though I uninstalled the preview, the preview 7 SDK remained in the folder:
Test of a RBS server project worked properly. On the other hand, the WASM project failed. I created a new WASM project with RBS, clicked Run and the browser displayed the unhandled exception Reload message. The dev tools Console shows:
System.ArgumentException: Hashtable's capacity overflowed and went negative. Check load factor, capacity and the current size of the table. (Parameter 'capacity')
There was nothing in the log file (other than the checking for update messages).
Created a new Blazor WASM project with VS2022, and it ran properly. Opened and ran the project with RBS, and the same System.ArgumentException occurred. No errors in the log.