[2023-03-24T12:58:17.920Z] Error: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.CSharp, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'Microsoft.CSharp, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Radzen.DropDownBase1.OnParametersSet() at Microsoft.AspNetCore.Components.ComponentBase.CallOnParametersSetAsync() at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync() at Radzen.RadzenComponent.SetParametersAsync(ParameterView parameters) at Radzen.DataBoundFormComponent
1.SetParametersAsync(ParameterView parameters)
at Radzen.DropDownBase1.SetParametersAsync(ParameterView parameters) at Radzen.Blazor.RadzenDropDown
1.SetParametersAsync(ParameterView parameters)
log @ blazor.server.js:1
blazor.server.js:1 [2023-03-24T12:58:17.921Z] Information: Connection disconnected.
blazor.server.js:1 Uncaught (in promise) Error: Cannot send data if the connection is not in the 'Connected' State.
at Nt.send (blazor.server.js:1:54583)
at Ft._sendMessage (blazor.server.js:1:71306)
at Ft._sendWithProtocol (blazor.server.js:1:71347)
at Ft.send (blazor.server.js:1:71455)
at Object.beginInvokeDotNetFromJS (blazor.server.js:1:134889)
at w (blazor.server.js:1:2167)
at C.invokeMethodAsync (blazor.server.js:1:4035)
at MediaQueryList.callback (Radzen.Blazor.js:1292:20)
ds-cat-link-keys:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
blazor.server.js:1 Uncaught (in promise) Error: Cannot send data if the connection is not in the 'Connected' State.
at Nt.send (blazor.server.js:1:54583)
at Ft._sendMessage (blazor.server.js:1:71306)
at Ft._sendWithProtocol (blazor.server.js:1:71347)
at Ft.send (blazor.server.js:1:71455)
at Object.beginInvokeDotNetFromJS (blazor.server.js:1:134889)
at w (blazor.server.js:1:2167)
at C.invokeMethodAsync (blazor.server.js:1:4035)
at MediaQueryList.callback (Radzen.Blazor.js:1292:20)
This is what Iβve found, might be related also:
Thank you,
I'm logged in as administrator.
I could prepare a windows for you to verify the problem.
I've never seen such error before and honestly I'm not sure where to start. Looks like it is related to dynamics, Windows Hosting Bundle and IIS however I'm not sure how.
Please try to deploy the app to Folder, go to that folder and execute dotnet yourapp.dll to see if it will work normally.
Can you send us the page with the entire code where you have the error with the DropDown? Do you have any usage of dynamic
keyword in this page?
I will send you the whole freshly generated project by email.
Use Google Drive or similar if itβs too big. Does it work for you when deployed in folder?
Hi, the email is sent.
Runnig from console dotnet yourapp.dll results the same.
Chris
I'm having the same problem. Hours and hours trying to solve it. I couldn't solve the problem.
Update:
It seems to me that there's as dedployment setup configuration, which triggers the error int the Radzen Dropdown component.
Please verify:
At Visual Studio the Publish Deployment Mode
- "Self-contained" OR
- "Framework-dependent"
Mode
- The error seems to be triggered
- The error seems not to be triggered
So my current workaround is case 2).
Hi @techsc,
I see, unfortunately I'm afraid this is beyond our control - it's more likely an issue with the .NET in general. From what I've saw so far the issue is related to dynamics however after our last update Radzen.Blazor will not longer refer Microsoft.CSharp for .NET 7:
Even if we stop using dynamic
keyword in our assembly (it's going to be breaking change) you might have the same problem if you use it in your own code or in other third party libraries.
For the time being: I will publish as framework-dependent then.
But I'd like to add:
The problem is still present with the latest Radzen 4.8.0 Release.
So, my workaround to publish as framework-dependent is required with that Radzen version as well.
The problem, very likely, cannot be resolved with Radzen.Blazor update in my opinion.
Thank you for the clarification.
Thanks again for your investigation work on this. My application worked for about two days following my update to 4.8.0 before breaking again. I'll see if I can get our IT department to install the hosting bundle on the server and try a framework dependent deployment instead.
Oddly enough, I've just tried the application again this morning and it's working. It seems to be a rather intermittent problem.
Yes, it is unpredictable. But after some time, the error comes up while sticking on the self-contained deployment. I promise
Has anyone come any further on this? This is the only hit on this topic on google
My team and I are developing a .Net core application, and it works up until a specific commit.
What is increasingly weird is that it works locally, does not work when published locally and deployed to a customer server, does work when using Azure DevOps to build the artifact.
Could it be a difference in version of the build program? Anyone else experienced this?
Hi @Bjorn_at_Eton,
It was discovered that self-contained deployments do not include all the required files such as Microsoft.CSharp.dll (used when the application relies on the dynamic
keyword). The workaround is to not use self-contained deployment but to rely on the .NET framework installed on the server.