Fix Docker build: disable analyzers at restore time too

StyleCop PackageReference is conditionally included based on
EnableAnalyzers at restore time. Without it during restore, the
analyzer DLLs get restored and run during publish regardless.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
nitrobass24 2026-04-06 21:59:35 -05:00
parent bc5688bdd1
commit 0e095834f3

View file

@ -27,7 +27,7 @@ COPY src/Prowlarr.Http/Prowlarr.Http.csproj src/Prowlarr.Http/
COPY src/ServiceHelpers/ServiceInstall/ServiceInstall.csproj src/ServiceHelpers/ServiceInstall/
COPY src/ServiceHelpers/ServiceUninstall/ServiceUninstall.csproj src/ServiceHelpers/ServiceUninstall/
RUN dotnet restore src/NzbDrone.Console/Prowlarr.Console.csproj -r "$(cat /tmp/rid)" -p:SelfContained=true
RUN dotnet restore src/NzbDrone.Console/Prowlarr.Console.csproj -r "$(cat /tmp/rid)" -p:SelfContained=true -p:EnableAnalyzers=false
# Copy remaining source and build
COPY src/ src/