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

Exceptions when using Razor class library #12

Open
jaredthirsk opened this issue Mar 27, 2020 · 0 comments
Open

Exceptions when using Razor class library #12

jaredthirsk opened this issue Mar 27, 2020 · 0 comments

Comments

@jaredthirsk
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant