Skip to content

Commit f28cb94

Browse files
CSHARP-4385: Consider adding Directory.Build.props.
1 parent b4d0204 commit f28cb94

File tree

7 files changed

+60
-210
lines changed

7 files changed

+60
-210
lines changed

CSharpDriver.sln

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.30011.22
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31919.166
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D2012971-32BB-4C5F-BFC4-30A9994AB152}"
7+
ProjectSection(SolutionItems) = preProject
8+
src\Directory.Build.props = src\Directory.Build.props
9+
EndProjectSection
710
EndProject
811
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{E472BDF5-61F1-461D-872B-9F53BB3ACA80}"
912
EndProject

src/Directory.Build.props

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<Project>
2+
<PropertyGroup>
3+
<IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</IsWindows>
4+
<IsOSX Condition="$([MSBuild]::IsOSPlatform('OSX'))">true</IsOSX>
5+
<IsLinux Condition="$([MSBuild]::IsOSPlatform('Linux'))">true</IsLinux>
6+
</PropertyGroup>
7+
8+
<PropertyGroup>
9+
<TargetFrameworks>netstandard2.0;netstandard2.1;net472</TargetFrameworks>
10+
<TargetFrameworks Condition="'$(IsWindows)'!='true'">netstandard2.0;netstandard2.1</TargetFrameworks>
11+
<LangVersion>10.0</LangVersion>
12+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
13+
<WarningsAsErrors />
14+
<CodeAnalysisRuleSet>..\..\MongoDB.ruleset</CodeAnalysisRuleSet>
15+
</PropertyGroup>
16+
17+
<PropertyGroup>
18+
<Company>MongoDB Inc.</Company>
19+
<Copyright>Copyright © 2010-present MongoDB Inc.</Copyright>
20+
<Authors>MongoDB Inc.</Authors>
21+
<PackageIcon>packageIcon.png</PackageIcon>
22+
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
23+
<PackageProjectUrl>https://www.mongodb.com/docs/drivers/csharp/</PackageProjectUrl>
24+
<PackageLicenseFile>License.txt</PackageLicenseFile>
25+
<PackageLanguage>en-US</PackageLanguage>
26+
<IncludeSymbols>true</IncludeSymbols>
27+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
28+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
29+
</PropertyGroup>
30+
31+
<PropertyGroup Condition="'$(Version)'==''">
32+
<Version>0.0.0-local</Version>
33+
</PropertyGroup>
34+
35+
<PropertyGroup>
36+
<DefineConstants>TRACE</DefineConstants>
37+
</PropertyGroup>
38+
39+
<PropertyGroup>
40+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
41+
</PropertyGroup>
42+
43+
<ItemGroup>
44+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0" />
45+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
46+
<PrivateAssets>all</PrivateAssets>
47+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
48+
</PackageReference>
49+
</ItemGroup>
50+
51+
<ItemGroup>
52+
<None Include="..\..\License.txt" Pack="true" PackagePath="$(PackageLicenseFile)" />
53+
<None Include="..\..\packageIcon.png" Pack="true" PackagePath="" />
54+
</ItemGroup>
55+
</Project>

src/MongoDB.Bson/MongoDB.Bson.csproj

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,28 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<PropertyGroup>
3-
<IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</IsWindows>
4-
</PropertyGroup>
52

63
<PropertyGroup>
7-
<TargetFrameworks>netstandard2.0;netstandard2.1;net472</TargetFrameworks>
8-
<TargetFrameworks Condition="'$(IsWindows)'!='true'">netstandard2.0;netstandard2.1</TargetFrameworks>
9-
<LangVersion>10.0</LangVersion>
10-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
11-
<WarningsAsErrors />
124
<CodeAnalysisRuleSet>..\..\MongoDBLegacy.ruleset</CodeAnalysisRuleSet>
135
</PropertyGroup>
146

157
<PropertyGroup>
168
<AssemblyTitle>MongoDB.Bson</AssemblyTitle>
179
<Product>MongoDB.Bson</Product>
18-
<Company>MongoDB Inc.</Company>
19-
<Copyright>Copyright © 2010-present MongoDB Inc.</Copyright>
2010
<Description>Official MongoDB supported BSON library. See https://www.mongodb.com/docs/drivers/csharp/ for more details.</Description>
21-
<Authors>MongoDB Inc.</Authors>
22-
<PackageIcon>packageIcon.png</PackageIcon>
23-
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
2411
<PackageDescription>MongoDB's Official Bson Library.</PackageDescription>
25-
<PackageProjectUrl>https://www.mongodb.com/docs/drivers/csharp/</PackageProjectUrl>
26-
<PackageLicenseFile>License.txt</PackageLicenseFile>
2712
<PackageTags>mongodb;mongo;nosql;bson</PackageTags>
28-
<PackageLanguage>en-US</PackageLanguage>
29-
<IncludeSymbols>true</IncludeSymbols>
30-
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
31-
<PublishRepositoryUrl>true</PublishRepositoryUrl>
32-
</PropertyGroup>
33-
34-
<PropertyGroup Condition="'$(Version)'==''">
35-
<Version>0.0.0-local</Version>
3613
</PropertyGroup>
3714

38-
<PropertyGroup>
39-
<DefineConstants>TRACE</DefineConstants>
40-
</PropertyGroup>
41-
42-
<ItemGroup>
43-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0" />
44-
</ItemGroup>
45-
4615
<PropertyGroup>
4716
<GenerateDocumentationFile>true</GenerateDocumentationFile>
4817
</PropertyGroup>
4918

5019
<ItemGroup>
5120
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.2" PrivateAssets="All" />
5221
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
53-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
54-
<PrivateAssets>all</PrivateAssets>
55-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
56-
</PackageReference>
5722
</ItemGroup>
5823

5924
<ItemGroup>
6025
<Compile Include="..\MongoDB.Shared\Hasher.cs" Link="Hasher.cs" />
6126
</ItemGroup>
6227

63-
<ItemGroup>
64-
<None Include="..\..\License.txt" Pack="true" PackagePath="$(PackageLicenseFile)" />
65-
<None Include="..\..\packageIcon.png" Pack="true" PackagePath="" />
66-
</ItemGroup>
67-
6828
</Project>
Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,17 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</IsWindows>
4-
<IsOSX Condition="$([MSBuild]::IsOSPlatform('OSX'))">true</IsOSX>
5-
<IsLinux Condition="$([MSBuild]::IsOSPlatform('Linux'))">true</IsLinux>
6-
</PropertyGroup>
7-
<PropertyGroup>
8-
<TargetFrameworks>netstandard2.0;netstandard2.1;net472</TargetFrameworks>
9-
<TargetFrameworks Condition="'$(IsWindows)'!='true'">netstandard2.0;netstandard2.1</TargetFrameworks>
10-
<LangVersion>10.0</LangVersion>
11-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
12-
<WarningsAsErrors />
133
<CodeAnalysisRuleSet>..\..\MongoDB.ruleset</CodeAnalysisRuleSet>
144
</PropertyGroup>
155

166
<PropertyGroup>
177
<AssemblyTitle>MongoDB.Driver.Core</AssemblyTitle>
188
<Product>MongoDB.Driver.Core</Product>
19-
<Company>MongoDB Inc.</Company>
20-
<Copyright>Copyright © 2010-present MongoDB Inc.</Copyright>
219
<Description>Official MongoDB supported Driver Core library. See https://www.mongodb.com/docs/drivers/csharp/ for more details.</Description>
22-
<Authors>MongoDB Inc.</Authors>
23-
<PackageIcon>packageIcon.png</PackageIcon>
24-
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
2510
<PackageDescription>Core Component of the Official MongoDB .NET Driver.</PackageDescription>
26-
<PackageProjectUrl>https://www.mongodb.com/docs/drivers/csharp/</PackageProjectUrl>
27-
<PackageLicenseFile>License.txt</PackageLicenseFile>
2811
<PackageTags>mongodb;mongo;nosql</PackageTags>
29-
<PackageLanguage>en-US</PackageLanguage>
30-
<IncludeSymbols>true</IncludeSymbols>
31-
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
32-
<PublishRepositoryUrl>true</PublishRepositoryUrl>
33-
</PropertyGroup>
34-
35-
<ItemGroup>
36-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0" />
37-
</ItemGroup>
38-
39-
<PropertyGroup Condition="'$(Version)'==''">
40-
<Version>0.0.0-local</Version>
41-
</PropertyGroup>
42-
43-
<PropertyGroup>
44-
<DefineConstants>TRACE</DefineConstants>
4512
</PropertyGroup>
4613

4714
<PropertyGroup>
48-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
4915
<RootNamespace>MongoDB.Driver</RootNamespace>
5016
</PropertyGroup>
5117

@@ -62,10 +28,6 @@
6228
<PackageReference Include="Snappier" Version="1.0.0" />
6329
<PackageReference Include="ZstdSharp.Port" Version="0.6.2" />
6430
<PackageReference Include="System.Buffers" Version="4.5.1" />
65-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
66-
<PrivateAssets>all</PrivateAssets>
67-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
68-
</PackageReference>
6931
</ItemGroup>
7032

7133
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
@@ -82,9 +44,7 @@
8244
</ItemGroup>
8345

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

9050
</Project>
Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,19 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<PropertyGroup>
3-
<IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</IsWindows>
4-
</PropertyGroup>
52

63
<PropertyGroup>
7-
<TargetFrameworks>netstandard2.0;netstandard2.1;net472</TargetFrameworks>
8-
<TargetFrameworks Condition="'$(IsWindows)'!='true'">netstandard2.0;netstandard2.1</TargetFrameworks>
9-
<LangVersion>10.0</LangVersion>
10-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
11-
<WarningsAsErrors />
124
<CodeAnalysisRuleSet>..\..\MongoDB.ruleset</CodeAnalysisRuleSet>
135
</PropertyGroup>
146

157
<PropertyGroup>
168
<AssemblyTitle>MongoDB.Driver.GridFS</AssemblyTitle>
179
<Product>MongoDB.Driver.GridFS</Product>
18-
<Company>MongoDB Inc.</Company>
19-
<Copyright>Copyright © 2010-present MongoDB Inc.</Copyright>
2010
<Description>Official MongoDB supported driver for MongoDB GridFS implementation. See https://www.mongodb.com/docs/drivers/csharp/ for more details.</Description>
21-
<Authors>MongoDB Inc.</Authors>
22-
<PackageIcon>packageIcon.png</PackageIcon>
23-
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
2411
<PackageDescription>GridFS Component of the Official MongoDB .NET Driver.</PackageDescription>
25-
<PackageProjectUrl>https://www.mongodb.com/docs/drivers/csharp/</PackageProjectUrl>
26-
<PackageLicenseFile>License.txt</PackageLicenseFile>
2712
<PackageTags>mongodb;mongo;nosql;gridfs</PackageTags>
28-
<PackageLanguage>en-US</PackageLanguage>
29-
<IncludeSymbols>true</IncludeSymbols>
30-
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
31-
<PublishRepositoryUrl>true</PublishRepositoryUrl>
32-
</PropertyGroup>
33-
34-
<PropertyGroup Condition="'$(Version)'==''">
35-
<Version>0.0.0-local</Version>
36-
</PropertyGroup>
37-
38-
<PropertyGroup>
39-
<DefineConstants>TRACE</DefineConstants>
40-
</PropertyGroup>
41-
42-
<ItemGroup>
43-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0" />
44-
</ItemGroup>
45-
46-
<PropertyGroup>
47-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
4813
</PropertyGroup>
4914

5015
<ItemGroup>
5116
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.2" PrivateAssets="All" />
52-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
53-
<PrivateAssets>all</PrivateAssets>
54-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
55-
</PackageReference>
5617
</ItemGroup>
5718

5819
<ItemGroup>
@@ -61,9 +22,4 @@
6122
<ProjectReference Include="..\MongoDB.Driver.Core\MongoDB.Driver.Core.csproj" />
6223
</ItemGroup>
6324

64-
<ItemGroup>
65-
<None Include="..\..\License.txt" Pack="true" PackagePath="$(PackageLicenseFile)" />
66-
<None Include="..\..\packageIcon.png" Pack="true" PackagePath=""/>
67-
</ItemGroup>
68-
6925
</Project>
Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,19 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<PropertyGroup>
3-
<IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</IsWindows>
4-
</PropertyGroup>
52

63
<PropertyGroup>
7-
<TargetFrameworks>netstandard2.0;netstandard2.1;net472</TargetFrameworks>
8-
<TargetFrameworks Condition="'$(IsWindows)'!='true'">netstandard2.0;netstandard2.1</TargetFrameworks>
9-
<LangVersion>10.0</LangVersion>
10-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
11-
<WarningsAsErrors />
124
<CodeAnalysisRuleSet>..\..\MongoDBLegacy.ruleset</CodeAnalysisRuleSet>
135
</PropertyGroup>
146

157
<PropertyGroup>
168
<AssemblyTitle>MongoDB.Driver.Legacy</AssemblyTitle>
179
<Product>MongoDB.Driver.Legacy</Product>
18-
<Company>MongoDB Inc.</Company>
19-
<Copyright>Copyright © 2010-present MongoDB Inc.</Copyright>
2010
<Description>Legacy MongoDB supported driver for MongoDB. See https://www.mongodb.com/docs/drivers/csharp/ for more details.</Description>
21-
<Authors>MongoDB Inc.</Authors>
2211
<PackageId>mongocsharpdriver</PackageId>
23-
<PackageIcon>packageIcon.png</PackageIcon>
24-
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
2512
<PackageDescription>This package contains the legacy driver. The new driver's package name is MongoDB.Driver</PackageDescription>
26-
<PackageProjectUrl>https://www.mongodb.com/docs/drivers/csharp/</PackageProjectUrl>
27-
<PackageLicenseFile>License.txt</PackageLicenseFile>
2813
<PackageTags></PackageTags>
29-
<PackageLanguage>en-US</PackageLanguage>
30-
<IncludeSymbols>true</IncludeSymbols>
31-
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
32-
<PublishRepositoryUrl>true</PublishRepositoryUrl>
33-
</PropertyGroup>
34-
35-
<PropertyGroup Condition="'$(Version)'==''">
36-
<Version>0.0.0-local</Version>
3714
</PropertyGroup>
3815

39-
<ItemGroup>
40-
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0" />
41-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
42-
<PrivateAssets>all</PrivateAssets>
43-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
44-
</PackageReference>
45-
</ItemGroup>
46-
4716
<PropertyGroup>
48-
<DefineConstants>TRACE</DefineConstants>
49-
</PropertyGroup>
50-
51-
<PropertyGroup>
52-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
5317
<RootNamespace>MongoDB.Driver</RootNamespace>
5418
</PropertyGroup>
5519

@@ -59,9 +23,4 @@
5923
<ProjectReference Include="..\MongoDB.Driver.Core\MongoDB.Driver.Core.csproj" />
6024
</ItemGroup>
6125

62-
<ItemGroup>
63-
<None Include="..\..\License.txt" Pack="true" PackagePath="$(PackageLicenseFile)" />
64-
<None Include="..\..\packageIcon.png" Pack="true" PackagePath="" />
65-
</ItemGroup>
66-
6726
</Project>

0 commit comments

Comments
 (0)