Skip to content

Commit 9de16fe

Browse files
committed
release prep
1 parent 1ff5e1d commit 9de16fe

File tree

3 files changed

+44
-62
lines changed

3 files changed

+44
-62
lines changed

Docs/landing/data/releases.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
current = "2.0.0-rc0"
1+
current = "2.0.0"
22
[[versions]]
3-
version = "2.0.0-rc0"
3+
version = "2.0.0"
44
status = "rc"
55
docs = "http://mongodb.github.io/mongo-csharp-driver/2.0/"
66
api = "http://api.mongodb.org/csharp/2.0"
@@ -16,25 +16,25 @@ current = "2.0.0-rc0"
1616
package = "MongoDB.Driver"
1717
description = "The driver."
1818
dependencies = ".NET Core Driver,.NET BSON Library"
19-
versions = "2.0.0-rc0"
19+
versions = "2.0.0"
2020

2121
[[drivers]]
2222
name = ".NET Core Driver"
2323
package = "MongoDB.Driver.Core"
2424
description = "The core driver."
2525
dependencies = ".NET BSON Library"
26-
versions = "2.0.0-rc0"
26+
versions = "2.0.0"
2727

2828
[[drivers]]
2929
name = ".NET BSON Library"
3030
package = "MongoDB.Bson"
3131
description = "The BSON library."
3232
dependencies = ""
33-
versions = "2.0.0-rc0"
33+
versions = "2.0.0"
3434

3535
[[drivers]]
3636
name = ".NET Legacy Driver"
3737
package = "mongocsharpdriver"
3838
description = "The legacy driver."
3939
dependencies = ".NET Driver,.NET Core Driver,.NET BSON Library"
40-
versions = "2.0.0-rc0,1.10.0"
40+
versions = "2.0.0,1.10.0"

Release Notes/Release Notes v2.0.0.md

Lines changed: 37 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
C#/.NET Driver Version 2.0.0-rc0 Release Notes
2-
==============================================
3-
4-
(Preliminary)
1+
# .NET Driver Version 2.0.0 Release Notes
52

63
This is a major release which supports all MongoDB server versions since 2.4.
74

@@ -11,20 +8,17 @@ https://github.com/mongodb/mongo-csharp-driver/blob/master/Release%20Notes/Relea
118

129
The full list of JIRA issues resolved in this release is available at:
1310

14-
https://jira.mongodb.org/secure/IssueNavigator.jspa?mode=hide&requestId=16826
11+
https://jira.mongodb.org/issues/?filter=16826
1512

1613
Documentation on the .NET driver can be found at:
1714

18-
http://www.mongodb.org/display/DOCS/CSharp+Language+Center
19-
http://api.mongodb.org/csharp/current/
15+
http://mongodb.github.io/mongo-csharp-driver/
2016

21-
New Features
22-
============
17+
## New Features
2318

2419
Notable new features are listed below. For a full list, see the full list of JIRA issues linked above.
2520

26-
Async
27-
-----
21+
### Async
2822

2923
As has been requested for a while now, the driver now offers a full async stack. Since it uses Tasks, it is fully usable
3024
with async and await.
@@ -34,85 +28,73 @@ to move to async, you should measure against the 1.x versions to ensure performa
3428

3529
All new applications should utilize the New API.
3630

37-
New Api
38-
-------
31+
32+
### New API
3933

4034
Because of our async nature, we have rebuilt our entire API. The new API is accessible via MongoClient.GetDatabase.
4135

42-
- Interfaces are used (IMongoClient, IMongoDatabase, IMongoCollection<TDocument>) to support easier testing.
36+
- Interfaces are used (`IMongoClient`, `IMongoDatabase`, `IMongoCollection<TDocument>`) to support easier testing.
4337

4438
- A fluent Find API is available with full support for expression trees including projections.
4539

46-
```csharp
47-
var people = await db.GetCollection<Person>("people")
40+
``` csharp
41+
var names = await db.GetCollection<Person>("people")
4842
.Find(x => x.FirstName == "Jack")
4943
.SortBy(x => x.Age)
50-
.Projection(x => x.FirstName + " " + x.LastName)
44+
.Project(x => x.FirstName + " " + x.LastName)
5145
.ToListAsync();
52-
```
46+
```
5347

54-
- A fluent Aggregation API is available with mostly-full support for expression trees (Unwind is special).
48+
- A fluent Aggregation API is available with mostly-full support for expression trees.
5549

56-
```csharp
57-
var people = await db.GetCollection<Person>("people")
50+
``` csharp
51+
var totalAgeByLastName = await db.GetCollection<Person>("people")
5852
.Aggregate()
5953
.Match(x => x.FirstName == "Jack")
6054
.GroupBy(x => x.LastName, g => new { _id = g.Key, TotalAge = g.Sum(x => x.Age)})
6155
.ToListAsync();
62-
```
56+
```
6357

6458
- Support for dynamic.
6559

66-
```csharp
60+
``` csharp
6761
var person = new ExpandoObject();
6862
person.FirstName = "Jane";
6963
person.Age = 12;
7064
person.PetNames = new List<dynamic> { "Sherlock", "Watson" }
7165
await db.GetCollection<dynamic>("people").InsertOneAsync(person);
72-
```
66+
```
7367

74-
Experimental Features
75-
=====================
7668

77-
One experimental feature has been introduced while we work through the best API both for us and for the community
78-
of other drivers. As such, it is public and we welcome feedback, but should not be considered stable and we will not make
79-
a major version bump when/if they are changed.
69+
## Upgrading
8070

81-
- A listener API to hook into events deep in the driver. Some uses of this are for logging or performance counters. We've included
82-
a simple logging abstraction to a TextWriter as well as a PerformanceCounter implementation.
71+
As 2.0 is a major revision, there are some breaking changes when coming from the 1.x assemblies. We've tried our best to mitigate those breaking changes, but some were inevitable. These changes may not affect everyone, but take a moment to review the list of known changes below:
8372

8473

85-
Breaking Changes
86-
================
74+
### System Requirements
8775

88-
This is a major revision and we have taken the opportunity to make some necessary changes. These changes will not affect everyone. Below
89-
are some that may affect a greater number of people:
76+
- .NET 3.5 and .NET 4.0 are no longer supported. If you still must use these platforms, the 1.x series of the driver will continue to be developed.
77+
- [CSHARP-952](https://jira.mongodb.org/browse/CSHARP-952): We've removed support for partially trusted callers.
9078

91-
- .NET 3.5 and .NET 4.0 are no longer supported. If you still must use these platforms, then the 1.x series of the driver will continue to be developed.
9279

93-
- The nuget package mongocsharpdriver now includes the legacy driver. It depends on 3 new nuget packages, MongoDB.Bson, MongoDB.Driver.Core,
94-
and MongoDB.Driver. MongoDB.Driver is the replacement for mongocsharpdriver.
80+
### Packaging
9581

96-
- We are no longer strong naming (CSHARP-616) our assemblies. Our previous strong naming was signed with a key in our public repository. This did
97-
nothing other than satisfy certain tools. If you need MongoDB assemblies to be strongly named, it is relatively straight-forward to build the
98-
assemblies yourself.
82+
- The nuget package [mongocsharpdriver](http://nuget.org/packages/mongocsharpdriver) now includes the legacy driver. It depends on 3 new nuget packages, [MongoDB.Bson](http://nuget.org/packages/MongoDB.Bson), [MongoDB.Driver.Core](http://nuget.org/packages/MongoDB.Driver.Core), and [MongoDB.Driver](http://nuget.org/packages/MongoDB.Driver). [MongoDB.Driver](http://nuget.org/packages/MongoDB.Driver) is the replacement for [mongocsharpdriver](http://nuget.org/packages/mongocsharpdriver).
83+
- [CSHARP-616](https://jira.mongodb.org/browse/CSHARP-616): We are no longer strong naming our assemblies. Our previous strong naming was signed with a key in our public repository. This did nothing other than satisfy certain tools. If you need MongoDB assemblies to be strongly named, it is relatively straight-forward to build the assemblies yourself.
9984

100-
- We've removed support for partially trusted callers (CSHARP-952).
10185

102-
- MongoConnectionStringBuilder (CSHARP-979) has been removed. Use the documented mongodb connection string format and/or MongoUrlBuilder.
86+
### BSON
10387

104-
- MongoServer is a deprecated class. Anyone using MongoClient.GetServer() will encounter a deprecation warning and, depending on how your build is
105-
setup, may receive an error. It is still safe to use this API until your code is ported to the new API.
88+
- [CSHARP-933](https://jira.mongodb.org/browse/CSHARP-933): Improved the BSON Serializer infrastructure. Anyone who has written a custom serializer will be affected by this. The changes are minor, but were necessary to support dynamic serializers as well as offering great speed improvements and improved memory management.
89+
- Certain methods, such as `BsonMemberMap.SetRepresentation` have been removed. The proper way to set a representation, for instance, would be to use `SetSerializer` and configure the serializer with the appropriate representation.
90+
- [CSHARP-939](https://jira.mongodb.org/browse/CSHARP-939): Dynamic DictionaryRepresentation has been removed. Its intent was to store, in some manner, anything in a .NET dictionary. In practice, this leads to the same values getting stored in different ways depending on factors such as a "." inside the key name. We made the decision to eliminate this variability. This means that documents that used to serialize correctly may start throwing a BsonSerializationException with a message indicating the key must be a valid string. [CSHARP-1165](https://jira.mongodb.org/browse/CSHARP-1165) has a solution to this problem. It should be noted that we will continue to read these disparate representations without error.
10691

107-
- Improved the BsonSerializer infrastructure (CSHARP-933). Anyone who has written a custom serializer will be affected by this. The changes are minor,
108-
but were necessary to support dynamic serializers as well as offering great speed improvements and improved memory management.
10992

110-
- ReadPreference(CSHARP-1043) and WriteConcern(CSHARP-1044) were rewritten. These classes are now immutable. Any current application
111-
code that sets values on these classes will no longer function. Instead, you should use the With method to alter a ReadPreference or WriteConcern.
93+
### Driver
94+
- [CSHARP-979](https://jira.mongodb.org/browse/CSHARP-979): `MongoConnectionStringBuilder` has been removed. Use the documented mongodb connection string format and/or `MongoUrlBuilder`.
95+
- `MongoServer` is a deprecated class. Anyone using `MongoClient.GetServer()` will encounter a deprecation warning and, depending on how your build is setup, may receive an error. It is still safe to use this API until your code is ported to the new API. *Note that this API requires the use of the [mongocsharpdriver](http://nuget.org/packages/mongocsharpdriver) to include the legacy API.
96+
- [CSHARP-1043](https://jira.mongodb.org/browse/CSHARP-1043) and [CSHARP-1044](https://jira.mongodb.org/browse/CSHARP-1044): `ReadPreference` and `WriteConcern` were rewritten. These classes are now immutable. Any current application code that sets values on these classes will no longer function. Instead, you should use the With method to alter a `ReadPreference` or `WriteConcern`.
97+
98+
``` csharp
11299
var writeConcern = myCurrentWriteConcern.With(journal: true);
113-
114-
- Dynamic DictionaryRepresentation (CSHARP-939) has been removed. Its intent was to store, in some manner, anything in a .NET dictionary. In practice,
115-
this leads to the same values getting stored in different ways depending on factors such as a "." inside the key name. We made the decision to
116-
eliminate this variability. This means that documents that used to serialize correctly may start throwing a BsonSerializationException with a message
117-
indicating the key must be a valid string. CSHARP-1165 has a solution to this problem. It should be noted that we will continue to read these disparate
118-
representations without error.
100+
```

build/build.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let version = baseVersion + "." + buildNumber
2020
let semVersion =
2121
match preRelease with
2222
| "build" | "local" -> baseVersion + "-" + preRelease + "-" + buildNumber.PadLeft(4, '0')
23-
| "" -> baseVersion
23+
| "#release#" -> baseVersion
2424
| _ -> baseVersion + "-" + preRelease
2525

2626
let shortVersion = semVersion.Substring(0, 3) // this works assuming we don't have double digits

0 commit comments

Comments
 (0)