Skip to content

Commit ef98921

Browse files
Fix NetCore csproj to auto-detect OS (dotnet#555)
1 parent d345041 commit ef98921

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<AssemblyName>Microsoft.Data.SqlClient</AssemblyName>
44
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;netstandard2.0</TargetFrameworks>
55
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(OSGroup)' == 'AnyOS'">SR.PlatformNotSupported_DataSqlClient</GeneratePlatformNotSupportedAssemblyMessage>
6-
<OSGroup Condition="'$(OSGroup)' == ''">Windows_NT</OSGroup>
6+
<OSGroup Condition="'$(OSGroup)' == ''">$(OS)</OSGroup>
77
<TargetsWindows Condition="'$(OSGroup)'=='Windows_NT'">true</TargetsWindows>
88
<TargetsUnix Condition="'$(OSGroup)'=='Unix'">true</TargetsUnix>
99
<!-- Allow explicit addition of the Compile files instead of all project files to be included by Default -->

src/Microsoft.Data.SqlClient/tests/DockerLinuxTest/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ ARG PROJFILE=$PROJNAME".csproj"
1212
ARG DLLFILE=$PROJNAME".dll"
1313

1414
WORKDIR /sqlclient/src/Microsoft.Data.SqlClient/tests/DockerLinuxTest
15-
RUN dotnet build $PROJFILE -c Release -o /app/build -p:OSGroup=Unix -p:GenerateDocumentationFile=false
15+
RUN dotnet build $PROJFILE -c Release -o /app/build
1616

1717
FROM build AS publish
18-
RUN dotnet publish $PROJFILE -c Release -o /app/publish -p:OSGroup=Unix -p:GenerateDocumentationFile=false
18+
RUN dotnet publish $PROJFILE -c Release -o /app/publish
1919

2020
FROM base AS final
2121
WORKDIR /app

0 commit comments

Comments
 (0)