Comments (13)
In this issue, they seem to have fixed their issue by updating NuGet packages. Checking the project in your archive, it seems indeed that Microsoft.AspNetCore.Components.WebAssembly v6.0.0 is still being referenced instead of v7.0.0. I got the project running by explicitly upgrading it in Client.fsproj:
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.0" />
It's quite annoying to have to do that explicitly though. I think it'll be better if I add the above line in the project template when I upgrade it to net7.0 (I'd rather not raise the requirement in the Bolero package itself).
from bolero.
There is now an explicit reference to Microsoft.AspNetCore.Components.WebAssembly 7.0.* in v0.21 of the project template.
from bolero.
Bolero 0.21.25 should now be working without an explicit dependency on Microsoft.AspNetCore.Components.WebAssembly.
from bolero.
Thank you. That finally solves it. Strange I didn't connect things, though I've been thinking about checking the assembly versions next.
I thought the system - dotnet that is - was better than this, in this area. I know there are shortcomings, but I can see now that most of AspNetCore assemblies are not version 7.0.0! I need a lot of explicit references for that. But System.* seems to be ok. I noticed yesterday that HtmlAgilityPack.dll is not the latest. Possibly also not FSharp.SystemTextJson.dll.
Maybe I need to consider using Paket after all, even though I feel it's such an incredible hassle.
from bolero.
There is one more thing to note. The sample produces this for the client project file:
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.*" />
If you just change 6.0.*
to be 7.0.*
the problem still occurs. It seems that you also have to remove the .DevServer
piece.
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.*" />
Then it works.
from bolero.
That's odd, in my attempt on the TodoMVC project, I updated DevServer to 7.0.0 and it worked.
from bolero.
@Bananas-Are-Yellow, I don't understand your point.
If you "remove the .DevServer
piece", you are no longer referencing Microsoft.AspNetCore.Components.WebAssembly.DevServer
, but instead referencing Microsoft.AspNetCore.Components.WebAssembly
, version 7.0.0, and that's exactly the solution @Tarmil suggested.
But the Microsoft.AspNetCore.Components.WebAssembly.DevServer
is no longer brought in. The application still runs successfully, but I guess there's a reason the DevServer should be there.
from bolero.
Hmm... maybe I'm beginning to understand your point. I don't see a *.DevServer.dll when trying to get it back. Perhaps it's just a namespace in *.WebAssembly.dll ? Sorry, don't have time to figure this out now, but just thought I'd let you know how this ended here.
from bolero.
It seems that a package reference to Microsoft.AspNetCore.Components.WebAssembly
is required to fix the import.data
error in the browser console.
It also seems that Microsoft.AspNetCore.Components.WebAssembly.DevServer
is not required for the HelloWorld client project (or for my own project), but it might be that it is required for certain server options that I do not have set.
So my conclusion is that both references should be present in the client project file.
(Remember to do a dotnet clean
if you remove a package reference, otherwise, it is still present in the output folder, or at least that seems to be the case for me.)
from bolero.
DevServer
isn't actually a package that adds any dll references; it contains msbuild scripting to run a client project directly with dotnet run
. So you don't need it if you have a server project. Maybe we should make its inclusion in the project template conditional, and only add it with --server=false
.
from bolero.
If I remove the explicit reference
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.*" />
from the client project file, then the problem import.meta may only appear in a module
is still there. Do I need to do something else?
from bolero.
Actually, I realize that I could make the dependency on Components.WebAssembly change based on the framework in the Bolero package itself. That would make things simpler than having to keep the right version in the project file.
from bolero.
Works now.
Thanks.
from bolero.
Related Issues (20)
- OnWheel and OnMouseWheel should have type WheelEventArgs
- Razor hosting template seems to be broken with 7.x asp.net bits HOT 2
- It seems to be possible to debug wasm bolero code in VS Code HOT 2
- Authorization broken with Server Side Hosting
- External JS scripts do not work inside the Bolero "program" HOT 2
- After Upgrading to to 0.23: WebAssembly error - Unhandled exception rendering component: Cannot read properties of null (reading 'insertBefore') HOT 15
- Upgrading to .net 8.0 client wasm hosted project, compiler errors: failing 'open Bolero.Html' HOT 6
- HTML templates autocomplete
- Update v0.23 dependencies to .NET 8 RTM HOT 1
- Scoped CSS not working with HTML templates HOT 2
- [Hot reload] of HTML pages does not work if you start client only HOT 1
- Trigger CSS recompilation for C# razor project HOT 3
- [CSS isolation] attributes do not apply to components generated in code HOT 3
- Custom Bolero node HOT 3
- Add Server-project retroactively? HOT 1
- [`OnParametersSet`] happens after `OnInitalized` if navigation happens through `NavigationManager` HOT 2
- Blazor interactive render modes compatibility HOT 5
- Preserve focus between fields change
- Web worker with F# HOT 3
- Hot reload causing template to drop class attribute HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bolero.