Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
296 changes: 11 additions & 285 deletions build.proj

Large diffs are not rendered by default.

26 changes: 6 additions & 20 deletions eng/pipelines/onebranch/steps/roslyn-analyzers-csproj-step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,20 @@
# See the LICENSE file in the project root for more information. #
#################################################################################

# This template defines a step to run Roslyn Analyzers against builds driven by
# build.proj. It is used for both the full Microsoft.Data.SqlClient (MDS) build
# and for individual extension packages; callers control the analyzed targets
# via the msBuildArguments parameter.
# This template defines a step to run Roslyn Analyzers against builds driven by build.proj. Callers
# control the analyzed targets via the msBuildArguments parameter.
#
# It uses the RoslynAnalyzers@3 task from the Secure Development Team's SDL
# extension:
#
# https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-mohanb/security-integration/guardian-wiki/sdl-azdo-extension/roslyn-analyzers-build-task
#
# GOTCHA: This step will clobber any existing build output. It should be run
# GOTCHA: This step will clobber any existing build output. It should be run
# _before_ any build steps that perform versioning or signing.

parameters:
# Source Root.
- name: sourceRoot
type: string
default: $(REPO_ROOT)

# MSBuild arguments appended after the project file path. The default targets
# BuildAllConfigurations for the full MDS build; override this when analyzing
# individual extension packages.
# MSBuild arguments appended after the project file path.
- name: msBuildArguments
type: string
default: >-
-t:BuildAllConfigurations
-p:configuration=Release
-p:GenerateNuget=false
-p:BuildTools=false

steps:
- task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@3
Expand All @@ -42,5 +28,5 @@ steps:
setupCommandLinePicker: vs2022
msBuildCommandLine: >-
msbuild
${{parameters.sourceRoot}}\build.proj
$(REPO_ROOT)\build.proj
${{parameters.msBuildArguments}}
76 changes: 17 additions & 59 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetsWindows Condition="'$(OS)' == 'Windows_NT' AND '$(OSGroup)' == ''">true</TargetsWindows>
<TargetsWindows Condition="'$(OS)' != 'Windows_NT' AND '$(OSGroup)' == ''">false</TargetsWindows>
<TargetsWindows Condition="'$(OSGroup)' == 'Windows_NT'">true</TargetsWindows>
<TargetsUnix Condition="'$(OS)' == 'Unix' AND '$(OSGroup)' == ''">true</TargetsUnix>
<TargetsUnix Condition="'$(OS)' != 'Unix' AND '$(OSGroup)' == ''">false</TargetsUnix>
<TargetsUnix Condition="'$(OSGroup)' == 'Unix'">true</TargetsUnix>
<TargetsAnyOS Condition="'$(OSGroup)' == 'AnyOS'">true</TargetsAnyOS>
<IsSourceProject Condition="$([System.Text.RegularExpressions.Regex]::IsMatch($(MSBuildProjectDirectory), 'src%24'))">true</IsSourceProject>
<!--
"ReferenceType" property supports below options:

Expand All @@ -19,54 +11,32 @@
-->
<ReferenceType Condition="'$(ReferenceType)' == ''">Project</ReferenceType>
</PropertyGroup>

<!-- @TODO: What is this? -->
<PropertyGroup Condition="$(BuildForRelease) == 'true'">
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
</PropertyGroup>

<ItemGroup Condition="$(BuildForRelease) == 'true'">
<SourceRoot Include="$(MSBuildThisFileDirectory)/" />
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)" />
</ItemGroup>

<PropertyGroup Condition="$(Configuration.Contains('Debug'))">
<DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir>
<RepoRoot>$(ProjectDir)..\</RepoRoot>
<Artifacts>$(RepoRoot)artifacts\$(ReferenceType)\</Artifacts>
<ToolsArtifactsDir Condition="'$(ToolsArtifactsDir)'==''">$(Artifacts)tools\</ToolsArtifactsDir>
<ManagedSourceCode>$(ProjectDir)Microsoft.Data.SqlClient\</ManagedSourceCode>
<SqlServerSourceCode>$(ProjectDir)Microsoft.SqlServer.Server\</SqlServerSourceCode>
<NetCoreSource>$(ManagedSourceCode)netcore\</NetCoreSource>
<NetCoreResources>$(ManagedSourceCode)src\Resources\</NetCoreResources>
<ResxFileName>Strings</ResxFileName>
<ResourceFileName>SqlClient.Resources.$(ResxFileName)</ResourceFileName>
<GeneratedSourceFileName>$(ResxFileName).ResourceNames.cs</GeneratedSourceFileName>
<NetFxSource>$(ManagedSourceCode)netfx\</NetFxSource>
<NetFxResources>$(ManagedSourceCode)src\Resources\</NetFxResources>
<AddOnsPath>$(ManagedSourceCode)add-ons\</AddOnsPath>
<SqlServerSource>$(RepoRoot)src\Microsoft.SqlServer.Server\</SqlServerSource>
<CommonsourceRoot>$(RepoRoot)src\Microsoft.Data.SqlClient\src\</CommonsourceRoot>
<ObjFolder>$(Artifacts)obj\</ObjFolder>
<CommonPath>$(NetCoreSource)src\Common\src</CommonPath>
<CommonTestPath>$(NetCoreSource)src\Common\tests</CommonTestPath>
<TestsPath>$(ProjectDir)Microsoft.Data.SqlClient/tests/</TestsPath>
<BinFolder Condition="'$(TargetsWindows)' == 'true'">$(Artifacts)bin\Windows_NT\</BinFolder>
<BinFolder Condition="'$(TargetsAnyOS)' == 'true'">$(Artifacts)bin\AnyOS\</BinFolder>
<BinFolder Condition="'$(TargetsUnix)' == 'true'">$(Artifacts)bin\Unix\</BinFolder>

<ToolsDir Condition="'$(ToolsDir)'==''">$(RepoRoot)tools\</ToolsDir>
<GenAPISrcDir Condition="'$(GenAPISrcDir)'==''">$(ToolsDir)GenAPI\</GenAPISrcDir>
<PackagesDir Condition="'$(PackagesDir)'==''">$(RepoRoot)packages\</PackagesDir>
Comment thread
benrr101 marked this conversation as resolved.
<NuGetRoot Condition="'$(NuGetRoot)' == ''">$(RepoRoot).nuget\</NuGetRoot>
<NuGetCmd>$(NuGetRoot)nuget.exe</NuGetCmd>
<!-- Respect environment variable for the .NET install directory if set; otherwise, use the current default location -->
<BuildSimulator Condition="'$(BuildSimulator)' != 'true'">false</BuildSimulator>
</PropertyGroup>

<!-- Add user-supplied define constants. -->
<PropertyGroup Condition="'$(UserDefinedConstants)' != ''">
<DefineConstants>$(DefineConstants);$(UserDefinedConstants)</DefineConstants>
</PropertyGroup>

<!-- @TODO: This isn't being set anywhere -->
<PropertyGroup Condition="'$(BuildSimulator)' == 'true'">
<DefineConstants>$(DefineConstants);ENCLAVE_SIMULATOR</DefineConstants>
</PropertyGroup>
Expand Down Expand Up @@ -98,18 +68,15 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

<!--
There may be a few specific warnings that should _not_ be considered an
error. This list should be used sparingly to avoid important warnings
being ignored.
There may be a few specific warnings that should _not_ be considered an error. This list
should be used sparingly to avoid important warnings being ignored.
-->
<WarningsNotAsErrors></WarningsNotAsErrors>
<WarningsNotAsErrors />

<!--
If a build is failing due to vulnerable dependencies, you may temporarily
uncomment the following line to treat the audit warnings as non-errors.
This should only be done as a temporary measure while addressing the
vulnerable dependencies. See:

If a build is failing due to vulnerable dependencies, you may temporarily uncomment the
following line to treat the audit warnings as non-errors. This should only be done as a
temporary measure while addressing the vulnerable dependencies. See:
https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1901-nu1904
-->
<!-- <WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors> -->
Expand All @@ -126,7 +93,7 @@
<DefineConstants>$(DefineConstants);STRONG_NAME_SIGNING</DefineConstants>
</PropertyGroup>

<!-- Packaging for source link-->
<!-- Packaging for source link-->
<PropertyGroup>
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
Expand All @@ -135,14 +102,10 @@
<EmbedUnTrackedSources>true</EmbedUnTrackedSources>
<DisableSourceLinkTranslation Condition="'$(DisableSourceLinkTranslation)' == ''">false</DisableSourceLinkTranslation>
</PropertyGroup>
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<!-- Provides Version properties -->
<Import Project="$(ToolsDir)props\Versions.props" />
<!-- Provides Tool properties -->
<Import Project="$(ToolsDir)props\Tools.props" />

<!-- Provides Build properties -->
<Import Project="$(ToolsDir)props\AssemblyInfo.props" />
<Import Project="$(ToolsDir)props\AssemblyRef.props" />
Expand All @@ -154,20 +117,15 @@
</PropertyGroup>

<!--
We want to use the latest C# language regardless of target framework,
so we explicitly set LangVersion for all targets.

We will roll this version forward as new C# language versions are released
and associated with the newest .NET SDK we support.
We want to use the latest C# language regardless of target framework, so we explicitly set
LangVersion for all targets. We will roll this version forward as new C# language versions are
released and associated with the newest .NET SDK we support.

Details here:

https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-versioning

https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/configure-language-version
-->
<PropertyGroup>
<!-- The newest .NET SDK we support is .NET 10.0, which uses C# 14 -->
<LangVersion>14</LangVersion>
</PropertyGroup>
</Project>
77 changes: 23 additions & 54 deletions src/Microsoft.Data.SqlClient.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<Platform Solution="*|x86" Project="x86" />
</Project>
</Folder>
<Folder Name="/doc/apps/">
<Project Path="../doc/apps/AzureAuthentication/AzureAuthentication.csproj" />
</Folder>
<Folder Name="/doc/snippets/" />
<Folder Name="/doc/snippets/Microsoft.Data.Sql/">
<File Path="../doc/snippets/Microsoft.Data.Sql/SqlDataSourceEnumerator.xml" />
Expand Down Expand Up @@ -216,30 +219,27 @@
<File Path="../eng/pipelines/steps/install-dotnet-arm64.ps1" />
<File Path="../eng/pipelines/steps/install-dotnet.yml" />
</Folder>
<Folder Name="/Microsoft.Data.SqlClient.Extensions/" />
<Folder Name="/Microsoft.Data.SqlClient.Extensions/Abstractions/" />
<Folder Name="/Microsoft.Data.SqlClient.Extensions/Abstractions/src/">
<Project Path="Microsoft.Data.SqlClient.Extensions/Abstractions/src/Abstractions.csproj" />
<Folder Name="/src/">
<File Path="Directory.Build.props" />
</Folder>
<Folder Name="/src/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider/">
<Project Path="Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj" />
</Folder>
<Folder Name="/Microsoft.Data.SqlClient.Extensions/Abstractions/test/">
<Folder Name="/src/Microsoft.Data.SqlClient.Extensions.Abstractions/">
<Project Path="Microsoft.Data.SqlClient.Extensions/Abstractions/src/Abstractions.csproj" />
<Project Path="Microsoft.Data.SqlClient.Extensions/Abstractions/test/Abstractions.Test.csproj" />
</Folder>
<Folder Name="/Microsoft.Data.SqlClient.Extensions/Azure/" />
<Folder Name="/Microsoft.Data.SqlClient.Extensions/Azure/src/">
<Folder Name="/src/Microsoft.Data.SqlClient.Extensions.Azure/">
<Project Path="Microsoft.Data.SqlClient.Extensions/Azure/src/Azure.csproj" />
</Folder>
<Folder Name="/Microsoft.Data.SqlClient.Extensions/Azure/test/">
<Project Path="Microsoft.Data.SqlClient.Extensions/Azure/test/Azure.Test.csproj" />
</Folder>
<Folder Name="/Microsoft.Data.SqlClient.Internal/" />
<Folder Name="/Microsoft.Data.SqlClient.Internal/Logging/" />
<Folder Name="/Microsoft.Data.SqlClient.Internal/Logging/src/">
<Folder Name="/src/Microsoft.Data.SqlClient.Internal.Logging/">
<Project Path="Microsoft.Data.SqlClient.Internal/Logging/src/Logging.csproj" />
</Folder>
<Folder Name="/Microsoft.Data.SqlClient/">
<Folder Name="/src/Microsoft.Data.SqlClient/">
<File Path="Microsoft.Data.SqlClient/MdsVersions.props" />
</Folder>
<Folder Name="/Microsoft.Data.SqlClient/notsupported/">
<Folder Name="/src/Microsoft.Data.SqlClient/notsupported/">
<Project Path="../tools/GenAPI/Microsoft.Cci.Extensions/Microsoft.Cci.Extensions.csproj">
<Build Project="false" />
</Project>
Expand All @@ -250,51 +250,30 @@
<Build Project="false" />
</Project>
</Folder>
<Folder Name="/Microsoft.Data.SqlClient/ref/">
<Folder Name="/src/Microsoft.Data.SqlClient/ref/">
<Project Path="Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj" />
</Folder>
<Folder Name="/Microsoft.Data.SqlClient/src/">
<Folder Name="/src/Microsoft.Data.SqlClient/src/">
<Project Path="Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj" />
</Folder>
<Folder Name="/Microsoft.Data.SqlClient/tests/" />
<Folder Name="/src/">
<File Path="Directory.Build.props" />
<Project Path="Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj">
<BuildDependency Project="Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj" />
<BuildDependency Project="Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj" />
<BuildDependency Project="Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj" />
</Project>
<Folder Name="/src/Microsoft.Data.SqlClient/tests/" />
<Folder Name="/src/Microsoft.SqlServer.Server/">
<Project Path="Microsoft.SqlServer.Server/Microsoft.SqlServer.Server.csproj" />
</Folder>
<Folder Name="/src/netcore/">
<Project Path="Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj" />
</Folder>
<Folder Name="/src/netcore/ref/">
<Project Path="Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj" />
</Folder>
<Folder Name="/src/netfx/">
<Project Path="Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj" />
</Folder>
<Folder Name="/src/netfx/ref/">
<Project Path="Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj" />
</Folder>
<Folder Name="/test/">
<Project Path="Microsoft.Data.SqlClient/tests/Common/Microsoft.Data.SqlClient.TestCommon.csproj">
<Platform Solution="*|x64" Project="x64" />
<Platform Solution="*|x86" Project="x86" />
</Project>
<Project Path="Microsoft.Data.SqlClient/tests/CustomConfigurableRetryLogic/CustomRetryLogicProvider.csproj">
<BuildDependency Project="Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj" />
<Platform Solution="*|x64" Project="x64" />
<Platform Solution="*|x86" Project="x86" />
</Project>
<Project Path="Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj">
<Platform Solution="*|x64" Project="x64" />
<Platform Solution="*|x86" Project="x86" />
</Project>
<Project Path="Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj">
<BuildDependency Project="Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj" />
</Project>
<Project Path="Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj" />
<Project Path="Microsoft.Data.SqlClient/tests/PerformanceTests/Microsoft.Data.SqlClient.PerformanceTests.csproj">
<Platform Solution="*|x64" Project="x64" />
<Platform Solution="*|x86" Project="x86" />
Expand All @@ -317,19 +296,9 @@
<Project Path="Microsoft.Data.SqlClient/tests/StressTests/SqlClient.Stress.Tests/SqlClient.Stress.Tests.csproj" />
</Folder>
<Folder Name="/test/TestClr/">
<Project Path="Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Address/Address.csproj">
<BuildDependency Project="Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj" />
<BuildDependency Project="Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj" />
</Project>
<Project Path="Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Circle.csproj">
<BuildDependency Project="Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj" />
</Project>
<Project Path="Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Shapes/Shapes.csproj">
<BuildDependency Project="Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj" />
</Project>
<Project Path="Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Utf8String/Utf8String.csproj">
<BuildDependency Project="Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj" />
</Project>
<Project Path="Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Address/Address.csproj" />
<Project Path="Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Circle.csproj" />
<Project Path="Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Shapes/Shapes.csproj" />
<Project Path="Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Utf8String/Utf8String.csproj" />
</Folder>
<Project Path="../doc/apps/AzureAuthentication/AzureAuthentication.csproj" />
</Solution>
Loading
Loading