Blazored / Modal

A powerful and customizable modal implementation for Blazor applications.
https://blazored.github.io/Modal/
MIT License
786 stars 186 forks source link

[Bug] namespace Blazored.Modal not found #566

Open omarceloribeiro opened 8 months ago

omarceloribeiro commented 8 months ago

Describe the bug I just installed the package 7.3.1 in a .net 7.0 blazor webassembly, and the namespace Blazored.Modal can not be found. dowgraded to 7.2.0 and it works. the error occurrs with the version 7.3.0 and 7.3.1

To Reproduce Steps to reproduce the behavior:

  1. create a blazor web assembly in .net 7.0
  2. install blazored.modal
  3. try to add the using Blazored.Modal in the program.cs

Expected behavior the namespace is recognized.

Screenshots

Hosting Model (is this issue happening with a certain hosting model?):

Additional context dowgraded to 7.2.0 and it works. the error occurrs with the version 7.3.0 and 7.3.1

<PropertyGroup>
  <TargetFramework>net7.0</TargetFramework>
  <Nullable>enable</Nullable>
  <ImplicitUsings>enable</ImplicitUsings>
  <ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
</PropertyGroup>

<ItemGroup>
  <PackageReference Include="Blazored.Modal" Version="7.2.0" />
zootius commented 8 months ago

Seconded - this happens for me in my Blazor WASM project too. Has been happily working for many months with Blazored.Modal 7.1 and 7.2 - but with 7.3.x it reports Blazored.Modal namespace not found.

MilesGibson commented 8 months ago

me as well! I had to downgrade...

chrissainty commented 8 months ago

I can't repro this issue on my machines. Can anyone provide a link to a repo showing the issue?

abbottmw commented 8 months ago

Ah is it because 7.3.1 required .net 8?

I built a quick WASM this way and can duplicate the issue.

dotnet new blazorwasm -o BlazorModalApp --framework "net7.0"

cd BlazorModalApp

dotnet add package Blazored.Modal --version 7.3.1

Then in Program.cs

using Blazored.Modal;

then in the services

builder.Services.AddBlazoredModal();

Blazored.Modal shows error that it cannot be found.

blazoredModal-error

abbottmw commented 8 months ago

Are there plans to make it work for .net 7 or going to be 8.0 minimum moving forward?

chrissainty commented 7 months ago

@abbottmw I don't think that I'll add .NET 7 support. It goes out of support in May so people should be moving to .NET 8.

ChrisASearles commented 7 months ago

Had the same problem, any chance of updating the versioning scheme to match .NET's? I didn't expect a breaking change like that in my .NET 7 project going from one 7.x minor version to another.