Skip to content
This repository was archived by the owner on Jul 21, 2022. It is now read-only.
This repository was archived by the owner on Jul 21, 2022. It is now read-only.

Exceptions when using Razor class library #12

@jaredthirsk

Description

@jaredthirsk

I got it working within a standalone asp.net project (after realizing it was okay that the /preview page was blank until I changed something) but when trying to use a component in a separate DLL, I get this:

System.Exception: '/App.razor(1,35): warning CS0436: The type 'Counter' in '' conflicts with the imported type 'Counter' in '__Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in ''.
/App.razor(2,46): error CS0246: The type or namespace name 'VosBlazorUtils' could not be found (are you missing a using directive or an assembly reference?)
/App.razor(5,71): warning CS0436: The type 'MainLayout' in '' conflicts with the imported type 'MainLayout' in '__Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in ''.
/App.razor(8,42): warning CS0436: The type 'MainLayout' in '' conflicts with the imported type 'MainLayout' in '__Test, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in ''.
warning CS1702: Assuming assembly reference 'Microsoft.AspNetCore.Components, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' used by 'Microsoft.AspNetCore.Components.Web' matches identity 'Microsoft.AspNetCore.Components, Version=3.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' of 'Microsoft.AspNetCore.Components', you may need to supply runtime policy
warning CS1702: Assuming assembly reference 'Microsoft.AspNetCore.Components, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' used by 'Microsoft.AspNetCore.Components.Web' matches identity 'Microsoft.AspNetCore.Components, Version=3.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' of 'Microsoft.AspNetCore.Components', you may need to supply runtime policy
warning CS1702: Assuming assembly reference 'Microsoft.AspNetCore.Components, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' used by 'Microsoft.AspNetCore.Components.Web' matches identity 'Microsoft.AspNetCore.Components, Version=3.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' of 'Microsoft.AspNetCore.Components', you may need to supply runtime policy
warning CS1702: Assuming assembly reference 'Microsoft.AspNetCore.Components, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' used by 'Microsoft.AspNetCore.Components.Web' matches identity 'Microsoft.AspNetCore.Components, Version=3.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' of 'Microsoft.AspNetCore.Components', you may need to supply runtime policy
warning CS1702: Assuming assembly reference 'Microsoft.AspNetCore.Components, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' used by 'Microsoft.AspNetCore.Components.Web' matches identity 'Microsoft.AspNetCore.Components, Version=3.1.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' of 'Microsoft.AspNetCore.Components', you may need to supply runtime policy'

I tried referencing Microsoft.AspNetCore.Components.Web directly to avoid the warnings, but the key error is it can't find my class "VosBlazorUtils", even though it is found without using BlazorLiveReload.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions