New projects created with abp suite Blazor WebAssembly template does not compile:
C:\Program Files\dotnet\sdk\5.0.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(415,5): error NETSDK1112: The runtime pack for Microsoft.NETCore.App.Runtime.browser-wasm was not downloaded. Try running a NuGet restore with the RuntimeIdentifier 'browser-wasm'.
Chaning the blazor project file as follows can make it compile.
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<UseBlazorWebAssembly>true</UseBlazorWebAssembly>
</PropertyGroup>
</Project>
WIth the problem above fixed, the app can run now, but the blazor website does not work because the file /_framework/blazor.boot.json
cannot be found (404). It seems this file was not generated at all at build time.
The problem is caused by the mismatch between the version of the Microsoft.AspNetCore.Components.WebAssembly
and Microsoft.AspNetCore.Components.WebAssembly.DevServer
packages referenced by the blazor project, and the version of the .NET SDK. In the ABP template, these packages are referenced with a wildcard version (5.0.*), so the latest matching version (5.0.9) was restored; but I didn't have .NET SDK 5.0.9 installed (my latest was 5.0.3). Installing .NET SDK 5.0.9 has fixed the problem.
It's not about what class (in the commercial assemblies) to use. As soon as any of these assemblies is referenced in my project, their obfuscated namespaces contaminate the intellisense popup, they appear whenever I type any code.
Oh I forgot to mention it was ReSharper's intellisense popup. I haven't checked if the default intellisense shows them. For now the workaround is to disable namespace suggestions in ReSharper's intellisense settings, which obviously is not a smart idea.
True, but I can still see their namespaces in the intellisense popup, that's the concern here. I'm totally okay that you obfuscate the classes, but please leave the namespaces alone.
npm i
in the angular. Fails with errors. Here's the output:npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: MyProject@0.0.0
npm ERR! Found: @angular/compiler@12.0.5
npm ERR! node_modules/@angular/compiler
npm ERR! @angular/compiler@"~12.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/compiler@"12.2.13" from @angular/localize@12.2.13
npm ERR! node_modules/@angular/localize
npm ERR! peer @angular/localize@"^12.0.0" from @ng-bootstrap/ng-bootstrap@10.0.0
npm ERR! node_modules/@ng-bootstrap/ng-bootstrap
npm ERR! peer @ng-bootstrap/ng-bootstrap@">=6.0.0" from @abp/ng.components@4.4.4
npm ERR! node_modules/@abp/ng.components
npm ERR! @abp/ng.components@"~4.4.4" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm i --force
, passes with many warningsnpm start
. Fails with errors. Here's the output:> MyProject@0.0.0 start
> ng serve --open
⠋ Generating browser application bundles (phase: setup)...An unhandled exception occurred: ENOENT: no such file or directory, lstat 'MyProject\angular\node_modules\@swimlane'
Here's what angular-errors.log
says:
[error] Error: ENOENT: no such file or directory, lstat 'MyProject\angular\node_modules\@swimlane'
at Object.realpathSync (node:fs:2486:7)
at resolveGlobalStyles (MyProject\angular\node_modules\@angular-devkit\build-angular\src\webpack\configs\styles.js:34:31)
at Object.getStylesConfig (MyProject\angular\node_modules\@angular-devkit\build-angular\src\webpack\configs\styles.js:67:70)
at MyProject\angular\node_modules\@angular-devkit\build-angular\src\dev-server\index.js:132:23
at generateWebpackConfig (MyProject\angular\node_modules\@angular-devkit\build-angular\src\utils\webpack-browser-config.js:40:49)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async generateBrowserWebpackConfigFromContext (MyProject\angular\node_modules\@angular-devkit\build-angular\src\utils\webpack-browser-config.js:97:20)
at async Object.generateI18nBrowserWebpackConfigFromContext (MyProject\angular\node_modules\@angular-devkit\build-angular\src\utils\webpack-browser-config.js:47:20)
at async setup (MyProject\angular\node_modules\@angular-devkit\build-angular\src\dev-server\index.js:128:47)
Thanks @muhammedaltug, uninstalling node 16 and replace it with node 14 instead did the trick.