In the following, there is no need to run with DropDups enabled. At this point in the code the collection is empty, so there can be no dupes. TokuMX doesn't support this option because we decided not to, it has nothing to do with the Fractal Tree indexes ability to support a replace operator. FYI, it does support it.
try
{
collection.EnsureIndex(new IndexKeysBuilder().Ascending("Key"), IndexOptions.SetDropDups(true));
}
catch (WriteConcernException exc)
{
/*
* For some reason TokuMX does not support SetDropDups option. They say that:
* "dropDups is not supported and is likely to remain unsupported for some time because it deletes arbitrary data".
* In TokuMX 1.3.3 SetDropDups option is still unavailable. (Probably they don't know how to implement replace operations in their FractalTree index.)
*/
collection.EnsureIndex(new IndexKeysBuilder().Ascending("Key"));
}