Skip to content

Commit

Permalink
Adding /p:Configuration=Release for dotnet restore which enables prop…
Browse files Browse the repository at this point in the history
…er "Condition" handling for PackageReference entriers in csprojs gh-issue: NuGet/Home#5895 removing Microsoft.Data.SqlClient package
  • Loading branch information
ChaosEngine committed Jan 27, 2024
1 parent 8ecff1b commit cabbe41
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ COPY ./IdentityManager2/src/IdentityManager2/IdentityManager2.csproj ./IdentityM
COPY ./IdentityManager2/src/IdentityManager2/Assets/ ./IdentityManager2/src/IdentityManager2/Assets/
COPY ./DotnetPlayground.Web/DotnetPlayground.Web.csproj ./DotnetPlayground.Web/DotnetPlayground.Web.csproj
COPY ./*.sln ./NuGet.config ./
RUN dotnet restore -r linux-x64
RUN dotnet restore -r linux-x64 /p:Configuration=Release

COPY . .
RUN sed -i -e "s/GIT_HASH/$SOURCE_COMMIT/g" -e "s/GIT_BRANCH/$SOURCE_BRANCH/g" DotnetPlayground.Web/wwwroot/js/site.js
RUN dotnet test --no-restore -v m
RUN dotnet publish --no-restore -c $BUILD_CONFIG --self-contained -r linux-x64 \
RUN dotnet test -v m
RUN dotnet publish -c $BUILD_CONFIG --self-contained -r linux-x64 \
#-p:PublishTrimmed=true \
DotnetPlayground.Web

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ COPY ./IdentityManager2/src/IdentityManager2/IdentityManager2.csproj ./IdentityM
COPY ./IdentityManager2/src/IdentityManager2/Assets/ ./IdentityManager2/src/IdentityManager2/Assets/
COPY ./DotnetPlayground.Web/DotnetPlayground.Web.csproj ./DotnetPlayground.Web/DotnetPlayground.Web.csproj
COPY ./*.sln ./NuGet.config ./
RUN dotnet restore -r linux-musl-x64
RUN dotnet restore -r linux-musl-x64 /p:Configuration=Release

COPY . .
RUN sed -i -e "s/GIT_HASH/$SOURCE_COMMIT/g" -e "s/GIT_BRANCH/$SOURCE_BRANCH/g" DotnetPlayground.Web/wwwroot/js/site.js
RUN dotnet test --no-restore -v m
RUN dotnet publish --no-restore -c $BUILD_CONFIG --self-contained -r linux-musl-x64 \
RUN dotnet test -v m
RUN dotnet publish -c $BUILD_CONFIG --self-contained -r linux-musl-x64 \
#-p:PublishTrimmed=true \
DotnetPlayground.Web

Expand Down
1 change: 0 additions & 1 deletion DotnetPlayground.Web/DotnetPlayground.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.1" Condition="$(DefineConstants.Contains('INCLUDE_SQLSERVER'))" />
<PackageReference Include="Microsoft.Extensions.Caching.SqlServer" Version="8.0.1" Condition="$(DefineConstants.Contains('INCLUDE_SQLSERVER'))" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.4" Condition="$(DefineConstants.Contains('INCLUDE_SQLSERVER'))" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" Condition="$(DefineConstants.Contains('INCLUDE_POSTGRES'))" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.0-silver.1.ci.20231204170005" Condition="$(DefineConstants.Contains('INCLUDE_MYSQL'))" />
Expand Down

0 comments on commit cabbe41

Please sign in to comment.