Skip to content

[Question] Plugin depends on NuGet  #300

@Richy1989

Description

@Richy1989

Hello,

I want to create a Plugin system for my Blazor Server application.

What if the Plugin itself depends on a Nuget Package in my case: BlazorCodeMirror6.
I need to Load the depended DLL as well as all the static files (.js and css etc).

When I load the Razor Page dynamically it expects to find the static files in wwwroot/_content/GaelJ.BlazorCodeMirror6.

Is there a way to achieve that with this framework?

I get the following error after trying to render my plugin:

Failed to fetch dynamically imported module: https://localhost:7258/_content/GaelJ.BlazorCodeMirror6/index.js
TypeError: Failed to fetch dynamically imported module: https://localhost:7258/_content/GaelJ.BlazorCodeMirror6/index.js

Source: System.Private.CoreLib

StackTrace: at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args) at GaelJ.BlazorCodeMirror6.CodeMirror6WrapperInternal.CodeMirrorJsInterop.ModuleInvokeVoidAsync(String method, Object[] args)

PS:
I got it working by publishing the plugin and copy the files to the right location (wwwroot) at startup of the main project, but this is a very dirty way in my opinion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions