JSON.NET attributes and RavenDB

RavenDB becomes more and more popular among .NET developer. The simple to use C# Api makes it a good choice for many project that require a fast persistence layer.

The JSON that is stored, can be customize using JSON.NET attributes. But sometimes you annotate your data POCOs and nothing happens e.g.

  • You put [JsonIgnore] on a property but it still appears in the created JSON

The reason is simple: The RavenDB team decided to put a copy of JSON.NET in the RavenDB dll and only the attributes from this “special” namespace are used for the JSON handling. So if you want to customize the JSON in the database, always use attributes from theĀ Raven.Imports.Newtonsoft.Json namespace.

Setup has detected Visual Studio Update 3 may not be completely installed.

Recently, I installed a new laptop with Visual Studio and the “normal” tool chain. While doing this, I encountered a strange error when installing the .NET Core tools.

NET Core Error

Setup has detected that Visual Studio 2015 Update 3 may not be completely installed. Please repair Visual Studio 2015 Update 3, then install this product again.

However, repairing Visual Studio did not solve the problem. Luckily, I found this StackOverflow post. The problem could easily be solved by starting the setup on the command line with this command:

DotNetCore.1.0.0-VS2015Tools.Preview2.exe SKIP_VSU_CHECK=1