Closed hoeyi closed 4 months ago
Looks similar to the issues described in this thread on @typeparam
use in Blazor: https://github.com/dotnet/razor/issues/8572.
I confirmed the method described in this thread for temporarily resolving the issue works: .NET6 Blazor @typeparam where constraint ERROR RZ1017. The temporary fix for VS appears to have no affect on the docker build process.
I was able to resolve build error by updating the SDK version to 7.0.402 via the .NET 7 image: mcr.microsoft.com/dotnet/sdk:7.0
.
Looks to be a bug in the 6.0 SDK, but is not expected to be resolved based on dotnet/razor#8770. Issue is resolved in versions 7.0 and 8.0.
Try to resolve this by updating the target runtime to .NET 8.0.
Describe the bug
Using the included Docker file to publish the app fails due to a builder error in
Ozym.Web
that does not occur when using Visual Studio to do the build.To Reproduce Steps to reproduce the behavior:
docker builder --tag 'sometag' .
RUN dotnet build Ozym.Web.csproj -c Release...
, at which point the build starts, but fails due to compiler error CS0449 related to components inheriting from a generic type component.Expected behavior
The build output should work using either
dotnet build
on the dev machine or for building the docker image. Interestingly, the compiler does not throw an error when building via Visual Studio or for tests, but does raise an error when viewing the base generic components for editing data (e.g.,ModelComponent<T>
).Build tools
Visual Studio 17.7.2 .NET SDK 7.0.400