Skip to content

Commit d864511

Browse files
committed
CSHARP-2439: Update how AssemblyInfo properties are specified.
1 parent 4a818b2 commit d864511

File tree

37 files changed

+218
-472
lines changed

37 files changed

+218
-472
lines changed

GitVersion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
next-version: 2.7.0
1+
next-version: 2.8.0

build.cake

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,17 @@ Task("Build")
6666
.IsDependentOn("Restore")
6767
.Does(() =>
6868
{
69-
var settings = new DotNetCoreBuildSettings { NoRestore = true, Configuration = configuration };
70-
DotNetCoreBuild(solutionFullPath, settings);
69+
var settings = new DotNetCoreBuildSettings
70+
{
71+
NoRestore = true,
72+
Configuration = configuration,
73+
EnvironmentVariables = new Dictionary<string, string>
74+
{
75+
{ "Version", gitVersion.SemVer },
76+
{ "SourceRevisionId", gitVersion.Sha }
77+
}
78+
};
79+
DotNetCoreBuild(solutionFullPath, settings);
7180
});
7281

7382
Task("Test")

src/MongoDB.Bson/MongoDB.Bson.csproj

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,24 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>net452;netstandard1.5</TargetFrameworks>
5-
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
65
<LangVersion>6</LangVersion>
76
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
87
<WarningsAsErrors />
98
<CodeAnalysisRuleSet>..\..\MongoDBLegacy.ruleset</CodeAnalysisRuleSet>
109
</PropertyGroup>
1110

11+
<PropertyGroup>
12+
<AssemblyTitle>MongoDB.Bson</AssemblyTitle>
13+
<Product>MongoDB.Bson</Product>
14+
<Company>MongoDB Inc.</Company>
15+
<Copyright>Copyright © 2010-present MongoDB Inc.</Copyright>
16+
<Description>Official MongoDB supported BSON library. See http://www.mongodb.org/display/DOCS/CSharp+Language+Center for more details.</Description>
17+
</PropertyGroup>
18+
19+
<PropertyGroup Condition="'$(Version)'==''">
20+
<Version>0.0.0-local</Version>
21+
</PropertyGroup>
22+
1223
<PropertyGroup>
1324
<DefineConstants>TRACE</DefineConstants>
1425
</PropertyGroup>
@@ -33,7 +44,6 @@
3344
</ItemGroup>
3445

3546
<ItemGroup>
36-
<Compile Include="..\MongoDB.Shared\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
3747
<Compile Include="..\MongoDB.Shared\Hasher.cs" Link="Hasher.cs" />
3848
</ItemGroup>
3949

src/MongoDB.Bson/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,10 @@
1414
*/
1515

1616
using System;
17-
using System.Reflection;
1817
using System.Runtime.CompilerServices;
1918
using System.Runtime.InteropServices;
2019

21-
// General Information about an assembly is controlled through the following
22-
// set of attributes. Change these attribute values to modify the information
23-
// associated with an assembly.
24-
[assembly: AssemblyTitle("MongoDB.Bson")]
25-
[assembly: AssemblyDescription("Official MongoDB supported BSON library. See http://www.mongodb.org/display/DOCS/CSharp+Language+Center for more details.")]
26-
[assembly: AssemblyProduct("MongoDB.Bson")]
27-
28-
// The following GUID is for the ID of the typelib if this project is exposed to COM
29-
[assembly: Guid("7d694bb4-3437-431f-acac-7dbe38952ad0")]
3020
[assembly: CLSCompliant(true)]
3121
[assembly: ComVisible(false)]
3222

3323
[assembly: InternalsVisibleTo("MongoDB.Bson.Tests")]
34-
[assembly: InternalsVisibleTo("MongoDB.Bson.Tests.Dotnet")]

src/MongoDB.Driver.Core/MongoDB.Driver.Core.csproj

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,24 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>net452;netstandard1.5</TargetFrameworks>
5-
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
65
<LangVersion>6</LangVersion>
76
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
87
<WarningsAsErrors />
98
<CodeAnalysisRuleSet>..\..\MongoDB.ruleset</CodeAnalysisRuleSet>
109
</PropertyGroup>
1110

11+
<PropertyGroup>
12+
<AssemblyTitle>MongoDB.Driver.Core</AssemblyTitle>
13+
<Product>MongoDB.Driver.Core</Product>
14+
<Company>MongoDB Inc.</Company>
15+
<Copyright>Copyright © 2010-present MongoDB Inc.</Copyright>
16+
<Description>Official MongoDB supported Driver Core library. See http://www.mongodb.org/display/DOCS/CSharp+Language+Center for more details.</Description>
17+
</PropertyGroup>
18+
19+
<PropertyGroup Condition="'$(Version)'==''">
20+
<Version>0.0.0-local</Version>
21+
</PropertyGroup>
22+
1223
<PropertyGroup>
1324
<DefineConstants>TRACE</DefineConstants>
1425
</PropertyGroup>
@@ -45,7 +56,6 @@
4556

4657
<ItemGroup>
4758
<Compile Include="..\MongoDB.Shared\ApplicationNameHelper.cs" Link="Core\Configuration\ApplicationNameHelper.cs" />
48-
<Compile Include="..\MongoDB.Shared\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
4959
<Compile Include="..\MongoDB.Shared\Hasher.cs" Link="Core\Misc\Hasher.cs" />
5060
<Compile Include="..\MongoDB.Shared\MaxTimeHelper.cs" Link="Core\Operations\MaxTimeHelper.cs" />
5161
</ItemGroup>

src/MongoDB.Driver.Core/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,15 @@
1414
*/
1515

1616
using System;
17-
using System.Reflection;
1817
using System.Runtime.CompilerServices;
1918
using System.Runtime.InteropServices;
2019

21-
// General Information about an assembly is controlled through the following
22-
// set of attributes. Change these attribute values to modify the information
23-
// associated with an assembly.
24-
[assembly: AssemblyTitle("MongoDB.Driver.Core")]
25-
[assembly: AssemblyDescription("Official MongoDB supported Driver Core library. See http://www.mongodb.org/display/DOCS/CSharp+Language+Center for more details.")]
26-
[assembly: AssemblyProduct("MongoDB.Driver.Core")]
27-
28-
// The following GUID is for the ID of the typelib if this project is exposed to COM
29-
[assembly: Guid("15947b97-4d49-4895-b7ce-17bfb874fe5e")]
3020
[assembly: CLSCompliant(true)]
3121
[assembly: ComVisible(false)]
3222

3323
[assembly: InternalsVisibleTo("MongoDB.Driver.Core.FunctionalTests")]
3424
[assembly: InternalsVisibleTo("MongoDB.Driver.Core.TestHelpers")]
35-
[assembly: InternalsVisibleTo("MongoDB.Driver.Core.TestHelpers.Dotnet")]
3625
[assembly: InternalsVisibleTo("MongoDB.Driver.Core.Tests")]
37-
[assembly: InternalsVisibleTo("MongoDB.Driver.Core.Tests.Dotnet")]
3826
[assembly: InternalsVisibleTo("MongoDB.Driver.Legacy.Tests")]
39-
[assembly: InternalsVisibleTo("MongoDB.Driver.Legacy.Tests.Dotnet")]
4027
[assembly: InternalsVisibleTo("MongoDB.Driver.Tests")]
41-
[assembly: InternalsVisibleTo("MongoDB.Driver.Tests.Dotnet")]
4228
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]

src/MongoDB.Driver.GridFS/MongoDB.Driver.GridFS.csproj

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,24 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>net452;netstandard1.5</TargetFrameworks>
5-
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
65
<LangVersion>6</LangVersion>
76
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
87
<WarningsAsErrors />
98
<CodeAnalysisRuleSet>..\..\MongoDB.ruleset</CodeAnalysisRuleSet>
109
</PropertyGroup>
1110

11+
<PropertyGroup>
12+
<AssemblyTitle>MongoDB.Driver.GridFS</AssemblyTitle>
13+
<Product>MongoDB.Driver.GridFS</Product>
14+
<Company>MongoDB Inc.</Company>
15+
<Copyright>Copyright © 2010-present MongoDB Inc.</Copyright>
16+
<Description>Official MongoDB supported driver for MongoDB GridFS implementation. See http://www.mongodb.org/display/DOCS/CSharp+Language+Center for more details.</Description>
17+
</PropertyGroup>
18+
19+
<PropertyGroup Condition="'$(Version)'==''">
20+
<Version>0.0.0-local</Version>
21+
</PropertyGroup>
22+
1223
<PropertyGroup>
1324
<DefineConstants>TRACE</DefineConstants>
1425
</PropertyGroup>
@@ -32,7 +43,6 @@
3243
</ItemGroup>
3344

3445
<ItemGroup>
35-
<Compile Include="..\MongoDB.Shared\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
3646
<Compile Include="..\MongoDB.Shared\IncrementalMD5.cs" Link="IncrementalMD5.cs" />
3747
</ItemGroup>
3848

src/MongoDB.Driver.GridFS/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,10 @@
1414
*/
1515

1616
using System;
17-
using System.Reflection;
1817
using System.Runtime.CompilerServices;
1918
using System.Runtime.InteropServices;
2019

21-
// General Information about an assembly is controlled through the following
22-
// set of attributes. Change these attribute values to modify the information
23-
// associated with an assembly.
24-
[assembly: AssemblyTitle("MongoDB.Driver.GridFS")]
25-
[assembly: AssemblyDescription("Official MongoDB supported driver for MongoDB. See http://www.mongodb.org/display/DOCS/CSharp+Language+Center for more details.")]
26-
[assembly: AssemblyProduct("MongoDB.Driver.GridFS")]
27-
28-
// The following GUID is for the ID of the typelib if this project is exposed to COM
29-
[assembly: Guid("4b850802-68c7-4f69-a371-cecbd51a58ee")]
3020
[assembly: CLSCompliant(true)]
3121
[assembly: ComVisible(false)]
3222

33-
3423
[assembly: InternalsVisibleTo("MongoDB.Driver.GridFS.Tests")]
35-
[assembly: InternalsVisibleTo("MongoDB.Driver.GridFS.Tests.Dotnet")]

src/MongoDB.Driver.Legacy/MongoDB.Driver.Legacy.csproj

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,24 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>net452;netstandard1.5</TargetFrameworks>
5-
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
65
<LangVersion>6</LangVersion>
76
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
87
<WarningsAsErrors />
98
<CodeAnalysisRuleSet>..\..\MongoDBLegacy.ruleset</CodeAnalysisRuleSet>
109
</PropertyGroup>
1110

11+
<PropertyGroup>
12+
<AssemblyTitle>MongoDB.Driver.Legacy</AssemblyTitle>
13+
<Product>MongoDB.Driver.Legacy</Product>
14+
<Company>MongoDB Inc.</Company>
15+
<Copyright>Copyright © 2010-present MongoDB Inc.</Copyright>
16+
<Description>Legacy MongoDB supported driver for MongoDB. See http://www.mongodb.org/display/DOCS/CSharp+Language+Center for more details.</Description>
17+
</PropertyGroup>
18+
19+
<PropertyGroup Condition="'$(Version)'==''">
20+
<Version>0.0.0-local</Version>
21+
</PropertyGroup>
22+
1223
<PropertyGroup>
1324
<DefineConstants>TRACE</DefineConstants>
1425
</PropertyGroup>
@@ -28,7 +39,6 @@
2839
</ItemGroup>
2940

3041
<ItemGroup>
31-
<Compile Include="..\MongoDB.Shared\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
3242
<Compile Include="..\MongoDB.Shared\IncrementalMD5.cs" Link="IncrementalMD5.cs" />
3343
<Compile Include="..\MongoDB.Shared\MaxTimeHelper.cs" Link="MaxTimeHelper.cs" />
3444
</ItemGroup>

src/MongoDB.Driver.Legacy/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,11 @@
1414
*/
1515

1616
using System;
17-
using System.Reflection;
1817
using System.Runtime.CompilerServices;
1918
using System.Runtime.InteropServices;
2019

21-
// General Information about an assembly is controlled through the following
22-
// set of attributes. Change these attribute values to modify the information
23-
// associated with an assembly.
24-
[assembly: AssemblyTitle("MongoDB.Driver.Legacy")]
25-
[assembly: AssemblyDescription("Legacy MongoDB supported driver for MongoDB. See http://www.mongodb.org/display/DOCS/CSharp+Language+Center for more details.")]
26-
[assembly: AssemblyProduct("MongoDB.Driver.Legacy")]
27-
28-
// The following GUID is for the ID of the typelib if this project is exposed to COM
29-
[assembly: Guid("2a530ff9-4881-4f2e-b7db-09ba6a3ba9ff")]
3020
[assembly: CLSCompliant(true)]
3121
[assembly: ComVisible(false)]
3222

3323
[assembly: InternalsVisibleTo("MongoDB.Driver.Legacy.TestHelpers")]
34-
[assembly: InternalsVisibleTo("MongoDB.Driver.Legacy.TestHelpers.Dotnet")]
3524
[assembly: InternalsVisibleTo("MongoDB.Driver.Legacy.Tests")]
36-
[assembly: InternalsVisibleTo("MongoDB.Driver.Legacy.Tests.Dotnet")]

0 commit comments

Comments
 (0)