Skip to content

CSHARP-4385: Consider adding Directory.Build.props. #934

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
12 changes: 9 additions & 3 deletions CSharpDriver.sln
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30011.22
# Visual Studio Version 17
VisualStudioVersion = 17.0.31919.166
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D2012971-32BB-4C5F-BFC4-30A9994AB152}"
ProjectSection(SolutionItems) = preProject
src\Directory.Build.props = src\Directory.Build.props
Copy link
Contributor Author

@DmitryLukyanov DmitryLukyanov Nov 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's possible to add this file into solution directory, but given that configuration makes sense only for src folder, probably better to leave it where it's currently placed

EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E472BDF5-61F1-461D-872B-9F53BB3ACA80}"
ProjectSection(SolutionItems) = preProject
tests\Directory.Build.props = tests\Directory.Build.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MongoDB.Bson", "src\MongoDB.Bson\MongoDB.Bson.csproj", "{9FCB42A5-3BC6-492B-8EA0-53EF32E9F8CD}"
EndProject
Expand Down Expand Up @@ -54,7 +60,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MongoDB.Driver.TestConsoleA
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AstrolabeWorkloadExecutor", "tests\AstrolabeWorkloadExecutor\AstrolabeWorkloadExecutor.csproj", "{B90F025F-89D3-436A-AD78-6AA304A6E240}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MongoDB.Driver.SmokeTests.Sdk", "tests\SmokeTests\MongoDB.Driver.SmokeTests.Sdk\MongoDB.Driver.SmokeTests.Sdk.csproj", "{B711A69F-A337-452C-95E1-A6B15C727CBA}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MongoDB.Driver.SmokeTests.Sdk", "tests\SmokeTests\MongoDB.Driver.SmokeTests.Sdk\MongoDB.Driver.SmokeTests.Sdk.csproj", "{B711A69F-A337-452C-95E1-A6B15C727CBA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SmokeTests", "SmokeTests", "{F64BF86A-1EF1-4596-84A6-6B4AB766CD77}"
EndProject
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ Please see our [guidelines](CONTRIBUTING.md) for contributing to the driver.
* Bar Arnon https://github.com/I3arnon
* Wan Bachtiar https://github.com/sindbach
* Mark Benvenuto https://github.com/markbenvenuto
* Brian Buvinghausen https://github.com/buvinghausen
* Bit Diffusion Limited [email protected]
* Jimmy Bogard https://github.com/jbogard
* Ross Buggins https://github.com/rbugginsvia
Expand All @@ -105,12 +106,15 @@ Please see our [guidelines](CONTRIBUTING.md) for contributing to the driver.
* Ken Egozi [email protected]
* Alexander Endris https://github.com/AlexEndris
* Daniel Goldman [email protected]
* David Golub https://github.com/dgolub
* Simon Green [email protected]
* Bouke Haarsma https://github.com/Bouke
* James Hadwen [email protected]
* Nuri Halperin https://github.com/nurih
* Daniel Hegener [email protected]
* Nikola Irinchev https://github.com/nirinchev
* Jacob Jewell [email protected]
* Vincent Kam https://github.com/vincentkam
* Danny Kendrick https://github.com/dkendrick
* Ruslan Khasanbaev https://github.com/flaksirus
* Konstantin Khitrykh https://github.com/KonH
Expand All @@ -123,6 +127,7 @@ Please see our [guidelines](CONTRIBUTING.md) for contributing to the driver.
* Maksim Krautsou https://github.com/MaKCbIMKo
* Richard Kreuter [email protected]
* Daniel Lee https://github.com/dlee148
* Ming Yau Lee https://github.com/mingyaulee
* Kevin Lewis [email protected]
* Dow Liu [email protected]
* Chuck Lu https://github.com/chucklu
Expand All @@ -133,6 +138,7 @@ Please see our [guidelines](CONTRIBUTING.md) for contributing to the driver.
* Alexander Nagy [email protected]
* Sridhar Nanjundeswaran https://github.com/sridharn
* Nathan https://github.com/terakilobyte
* Adelin Owona https://github.com/adelinowona
* Rachelle Palmer https://github.com/techbelle
* Rich Quackenbush [email protected]
* Carl Reinke https://github.com/mindless2112
Expand All @@ -142,24 +148,19 @@ Please see our [guidelines](CONTRIBUTING.md) for contributing to the driver.
* Ed Rooth [email protected]
* Katie Sadoff https://github.com/ksadoff
* Sam558 https://github.com/Sam558
* Vladimir Setyaev [email protected]
* Sergey Shushlyapin https://github.com/sergeyshushlyapin
* Alexey Skalozub [email protected]
* Kevin Smith https://github.com/kevbite
* Pete Smith [email protected]
* Matteo Spreafico https://github.com/MatteoSp
* staywellandy https://github.com/staywellandy
* Vyacheslav Stroy https://github.com/kreig
* Jake Sta. Teresa https://github.com/JakeStaTeresa
* Testo [email protected]
* TimTim https://github.com/wegylexy
* Craig Wilson https://github.com/craiggwilson
* Zhmayev Yaroslav https://github.com/salaros
* Aristarkh Zagorodnikov https://github.com/onyxmaster
* Vincent Kam https://github.com/vincentkam
* Craig Wilson https://github.com/craiggwilson
* Ming Yau Lee https://github.com/mingyaulee
* Daniel Hegener [email protected]
* Vladimir Setyaev [email protected]
* Matteo Spreafico https://github.com/MatteoSp
* Adelin Owona https://github.com/adelinowona
* David Golub https://github.com/dgolub

If you have contributed and we have neglected to add you to this list please contact one of the maintainers to be added to the list (with apologies).
54 changes: 54 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<Project>
<PropertyGroup>
<IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</IsWindows>
</PropertyGroup>

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks Condition="'$(IsWindows)'=='true'">$(TargetFrameworks);net472</TargetFrameworks>
<LangVersion>10.0</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<CodeAnalysisRuleSet>..\..\MongoDB.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<PropertyGroup>
<Company>MongoDB Inc.</Company>
<Copyright>Copyright © 2010-present MongoDB Inc.</Copyright>
<Authors>MongoDB Inc.</Authors>
<PackageIcon>packageIcon.png</PackageIcon>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageProjectUrl>https://www.mongodb.com/docs/drivers/csharp/</PackageProjectUrl>
<PackageTags>mongodb;mongo;nosql</PackageTags>
<PackageLicenseFile>License.txt</PackageLicenseFile>
<PackageLanguage>en-US</PackageLanguage>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>

<PropertyGroup Condition="'$(Version)'==''">
<Version>0.0.0-local</Version>
</PropertyGroup>

<PropertyGroup>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.2" PrivateAssets="All" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<None Include="..\..\License.txt" Pack="true" PackagePath="$(PackageLicenseFile)" />
<None Include="..\..\packageIcon.png" Pack="true" PackagePath="" />
</ItemGroup>
</Project>
47 changes: 1 addition & 46 deletions src/MongoDB.Bson/MongoDB.Bson.csproj
Original file line number Diff line number Diff line change
@@ -1,68 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</IsWindows>
</PropertyGroup>

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net472</TargetFrameworks>
<TargetFrameworks Condition="'$(IsWindows)'!='true'">netstandard2.0;netstandard2.1</TargetFrameworks>
<LangVersion>10.0</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<CodeAnalysisRuleSet>..\..\MongoDBLegacy.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<PropertyGroup>
<AssemblyTitle>MongoDB.Bson</AssemblyTitle>
<Product>MongoDB.Bson</Product>
<Company>MongoDB Inc.</Company>
<Copyright>Copyright © 2010-present MongoDB Inc.</Copyright>
<Description>Official MongoDB supported BSON library. See https://www.mongodb.com/docs/drivers/csharp/ for more details.</Description>
<Authors>MongoDB Inc.</Authors>
<PackageIcon>packageIcon.png</PackageIcon>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageDescription>MongoDB's Official Bson Library.</PackageDescription>
<PackageProjectUrl>https://www.mongodb.com/docs/drivers/csharp/</PackageProjectUrl>
<PackageLicenseFile>License.txt</PackageLicenseFile>
<PackageTags>mongodb;mongo;nosql;bson</PackageTags>
<PackageLanguage>en-US</PackageLanguage>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>

<PropertyGroup Condition="'$(Version)'==''">
<Version>0.0.0-local</Version>
</PropertyGroup>

<PropertyGroup>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0" />
</ItemGroup>

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>$(PackageTags);bson</PackageTags>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.2" PrivateAssets="All" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<Compile Include="..\MongoDB.Shared\Hasher.cs" Link="Hasher.cs" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\License.txt" Pack="true" PackagePath="$(PackageLicenseFile)" />
<None Include="..\..\packageIcon.png" Pack="true" PackagePath="" />
</ItemGroup>

</Project>
44 changes: 1 addition & 43 deletions src/MongoDB.Driver.Core/MongoDB.Driver.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,52 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</IsWindows>
<IsOSX Condition="$([MSBuild]::IsOSPlatform('OSX'))">true</IsOSX>
<IsLinux Condition="$([MSBuild]::IsOSPlatform('Linux'))">true</IsLinux>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net472</TargetFrameworks>
<TargetFrameworks Condition="'$(IsWindows)'!='true'">netstandard2.0;netstandard2.1</TargetFrameworks>
<LangVersion>10.0</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<CodeAnalysisRuleSet>..\..\MongoDB.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<PropertyGroup>
<AssemblyTitle>MongoDB.Driver.Core</AssemblyTitle>
<Product>MongoDB.Driver.Core</Product>
<Company>MongoDB Inc.</Company>
<Copyright>Copyright © 2010-present MongoDB Inc.</Copyright>
<Description>Official MongoDB supported Driver Core library. See https://www.mongodb.com/docs/drivers/csharp/ for more details.</Description>
<Authors>MongoDB Inc.</Authors>
<PackageIcon>packageIcon.png</PackageIcon>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageDescription>Core Component of the Official MongoDB .NET Driver.</PackageDescription>
<PackageProjectUrl>https://www.mongodb.com/docs/drivers/csharp/</PackageProjectUrl>
<PackageLicenseFile>License.txt</PackageLicenseFile>
<PackageTags>mongodb;mongo;nosql</PackageTags>
<PackageLanguage>en-US</PackageLanguage>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AWSSDK.SecurityToken" Version="3.7.100.14" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0" />
</ItemGroup>

<PropertyGroup Condition="'$(Version)'==''">
<Version>0.0.0-local</Version>
</PropertyGroup>

<PropertyGroup>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<RootNamespace>MongoDB.Driver</RootNamespace>
</PropertyGroup>

Expand All @@ -55,18 +19,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AWSSDK.SecurityToken" Version="3.7.100.14" />
<PackageReference Include="DnsClient" Version="1.6.1" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.2" PrivateAssets="All" />
<PackageReference Include="MongoDB.Libmongocrypt" Version="1.6.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.0.0" />
<PackageReference Include="SharpCompress" Version="0.30.1" />
<PackageReference Include="Snappier" Version="1.0.0" />
<PackageReference Include="ZstdSharp.Port" Version="0.6.2" />
<PackageReference Include="System.Buffers" Version="4.5.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
Expand All @@ -83,9 +43,7 @@
</ItemGroup>

<ItemGroup>
<None Include="..\..\License.txt" Pack="true" PackagePath="$(PackageLicenseFile)" />
<None Include="..\..\THIRD-PARTY-NOTICES" Pack="true" PackagePath="\" />
<None Include="..\..\packageIcon.png" Pack="true" PackagePath="" />
</ItemGroup>

</Project>
50 changes: 1 addition & 49 deletions src/MongoDB.Driver.GridFS/MongoDB.Driver.GridFS.csproj
Original file line number Diff line number Diff line change
@@ -1,69 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</IsWindows>
</PropertyGroup>

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net472</TargetFrameworks>
<TargetFrameworks Condition="'$(IsWindows)'!='true'">netstandard2.0;netstandard2.1</TargetFrameworks>
<LangVersion>10.0</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<CodeAnalysisRuleSet>..\..\MongoDB.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<PropertyGroup>
<AssemblyTitle>MongoDB.Driver.GridFS</AssemblyTitle>
<Product>MongoDB.Driver.GridFS</Product>
<Company>MongoDB Inc.</Company>
<Copyright>Copyright © 2010-present MongoDB Inc.</Copyright>
<Description>Official MongoDB supported driver for MongoDB GridFS implementation. See https://www.mongodb.com/docs/drivers/csharp/ for more details.</Description>
<Authors>MongoDB Inc.</Authors>
<PackageIcon>packageIcon.png</PackageIcon>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageDescription>GridFS Component of the Official MongoDB .NET Driver.</PackageDescription>
<PackageProjectUrl>https://www.mongodb.com/docs/drivers/csharp/</PackageProjectUrl>
<PackageLicenseFile>License.txt</PackageLicenseFile>
<PackageTags>mongodb;mongo;nosql;gridfs</PackageTags>
<PackageLanguage>en-US</PackageLanguage>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>

<PropertyGroup Condition="'$(Version)'==''">
<Version>0.0.0-local</Version>
</PropertyGroup>

<PropertyGroup>
<DefineConstants>TRACE</DefineConstants>
<PackageTags>$(PackageTags);gridfs</PackageTags>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0" />
</ItemGroup>

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.2" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MongoDB.Bson\MongoDB.Bson.csproj" />
<ProjectReference Include="..\MongoDB.Driver\MongoDB.Driver.csproj" />
<ProjectReference Include="..\MongoDB.Driver.Core\MongoDB.Driver.Core.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\License.txt" Pack="true" PackagePath="$(PackageLicenseFile)" />
<None Include="..\..\packageIcon.png" Pack="true" PackagePath=""/>
</ItemGroup>

</Project>
Loading