Compile errors CS0400 and CS1503 using RadzenNumericRangeValidator

When I create a new project: Blazor Server, .NET, and Radzen.Blazor.4.4.6 with Visual Studio 2022 Comunity

using your demo Blazor range validator component, I'm getting the following errors:

Error (active) CS1503 Argument 1: cannot convert from 'int' to 'dynamic'
Error (active) CS0400 The type or namespace name 'dynamic' could not be found in the global namespace (are you missing an assembly reference?)
Error (active) CS1662 Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type

The project runs well but I can not get rid of these errors.

P.S. I can send you the demo project if you need it.

Our demo is strongly typed while in your case you have dynamics most probably (the code is not visible in your screenshots) and the razor compiler cannot resolve the correct types.

UPDATE: Actually these errors might appear in the Visual Studio only while everything works normally runtime. We will do our best to improve this in our next update later today.

1 Like

Hi Vladimir,

Thank you for your response.

I loaded your demo project but I still get this error:

This might be an issue with my Visual Studio and environment if you do not see these errors on the same project. I disabled all the extensions of my project but no effect.

We decided to change the type of Min and Max from dynamic to IComparable. It should resolve this problem. Other than that this is only a UI problem in Visual Studio - the application should build and run fine.

Hi Atanas,

Thanks for the quick reactions. When these changes will take place?

Yes, the application builds and runs fine but sometimes these compile errors break the Hot Reload function of VS2022.