Rules that Resharper follows to optimize namespaces Follow
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 bn.pds.ren.RENAPI.aggregation;
using MongoDB.Bson.Serialization.Attributes;
using Aggregation.Models;
using Recommendation.Models;
using Product = bn.pds.ren.RENAPI.objects.ren.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 bn.pds.ren.RENAPI.aggregation; using bn.pds.ren.RENAPI.objects.ren; 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 bn.pds.ren.RENAPI.objects.ren, while I'm using several from Recommendations.Models. I would like Resharper to not change how I optimized the namespaces.
Thanks
-marc
Please sign in to leave a comment.
Hello Marc,
It happens to be a known issue - https://youtrack.jetbrains.com/issue/RSRP-486372.
Please follow it to get the latest updates.
Let me know if you have any more questions.
Thank you.