Rules that Resharper follows to optimize namespaces

What rules does resharper follow when optimizing namespaces? I have my namespaces formatted as below:

using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using AggCommon.Configuration;
using Aggregation.Models;
using MongoDB.Bson.Serialization.Attributes;
using Aggregation.Models;
using Recommendation.Models;
using Product =;

Every time I clean up or format the file, Resharper changes the namespaces so they appear as follows:

using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using AggCommon.Configuration;
using Aggregation.Models;
using MongoDB.Bson.Serialization.Attributes;
using AlgorithmCode = Aggregation.Models.AlgorithmCode;
using EanSet = Recommendation.Models.EanSet;
using Rec = Recommendation.Models.Rec;

I'm only using one class from, while I'm using several from Recommendations.Models. I would like Resharper to not change how I optimized the namespaces.



1 comment
Comment actions Permalink
Official comment

Hello Marc,

It happens to be a known issue -

Please follow it to get the latest updates.

Let me know if you have any more questions.

Thank you.

Please sign in to leave a comment.