-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not find 'BlazorExtensions.Canvas2d.add' ('BlazorExtensions' was undefined) #112
Comments
Sorry to be late to the party. I ran into this same issue. The fix was to add this to my index.html. Hope it helps.
|
Even it you do add the script to a client's project's index.html it only seems to work properly if the server project also has the Blazor.Extensions.Canvas installed. If not, drawing will result in faults until the browser is refreshed. |
<script src="_content/Blazor.Extensions.Canvas/blazor.extensions.canvas.js"></script> Fixed it for me, thanks ! |
I retried thing about 100 times and rebuilding and it didn't work. I'd given up but after few days came back and it was just working. So clearly something was just stale. |
Hello everyone, I encountered the same problem. My csproj: <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Blazor.Extensions.Canvas" Version="1.1.1" />
<PackageReference Include="BlazorPanzoom" Version="0.2.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\libs\BIDTP.Dotnet.Core\BIDTP.Dotnet.Core.csproj" />
<ProjectReference Include="..\..\Modules\Example.Schemas\Example.Schemas.csproj" />
</ItemGroup>
</Project> My _Host.cshtml:
App.razor:
I would be grateful to understand what's wrong, what I'm doing wrong |
I followed the steps in the ReadMe to create a 2D canvas component. However, when I run my application on localhost using IIS, I get the following error in the console:
I've added
usings
everywhere I'm supposed to, and Googling this issue turned up just about nothing, so I'm not sure what else to try. Any help would be appreciated.The text was updated successfully, but these errors were encountered: