Chronostasys / Blazor.Cropper

A blazor library provides component to crop image
MIT License
84 stars 19 forks source link

OnSizeChanged invalid identifier #55

Closed egarim closed 1 year ago

egarim commented 1 year ago

After downloading the source I always get these 2 errors

C:\Users\manu\Source\Repos\Blazor.Cropper\CropperSample\obj\Debug\net5.0\Razor\Pages\CropperExample.razor.g.cs(352,201,352,202): error CS1001: Identifier expected 1>C:\Users\manu\Source\Repos\Blazor.Cropper\CropperSample\obj\Debug\net5.0\Razor\Pages\CropperExample.razor.g.cs(352,311,352,312): error CS1001: Identifier expected

for both projects CropperSample and CropperSampleV6 to fix it I always remove the OnSizeChanged event from the component, but in the end is not a fix.

Any idea why this error happens and how can it be fixed?

Chronostasys commented 1 year ago

Failed to reproduce, could you provide your system and machine info?

egarim commented 1 year ago

Machine Host Name: MSI OS Name: Microsoft Windows 11 Enterprise OS Version: 10.0.22000 N/A Build 22000 OS Manufacturer: Microsoft Corporation OS Configuration: Standalone Workstation

VS Microsoft Visual Studio Community 2022 (64-bit) - Preview Version 17.4.0 Preview 1.0

Dotnet 5.0.214 [C:\Program Files\dotnet\sdk] 6.0.400 [C:\Program Files\dotnet\sdk] 7.0.100-preview.7.22377.5 [C:\Program Files\dotnet\sdk]

kubaizi commented 1 year ago

same problem here, any fix?

Chronostasys commented 1 year ago

HI @egarim @kubaizi , after spending some time dig into it, I found it might be a but with dotnet 7 https://github.com/dotnet/razor-compiler/issues/215 .
I think you can avoid this issue by setting the dotnet version to dotnet 6 in a global.json config file.

egarim commented 1 year ago

Yes I think is related to the environment I tried in a VM with this characteristics and it did work SDK 6.0.400 [C:\Program Files\dotnet\sdk]

VS Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.3.0

kubaizi commented 1 year ago

i am stuck on .net7, i think i need to wait until the next release