New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Remove and Sort Usings on save" feature not working on some projects #40
Comments
Tipfom reported: |
Blandau006 reported: |
LarryDavidJr reported: |
Zsolt Miskolczi reported: |
I can't seem to get the simple remove unused savings on Save or anything working with ASP.NET Core. |
Same problem. It doesn't work on any ASP.NET Core project I have. |
Same as @VaclavElias. It doesn't work on my ASP.NET Core project. |
Community, was anyone able to locate in this source code where "Format document on save" and "Remove and Sort Usings on save" is? |
I am having the same problem. I have these observations to report: Given a solution with both ASP.NET Core and ASP.NET 4.6.1 projects:
|
Same here everybody. Took a while to find this issue but at least I know it's only me. |
For me, it doesn't work on "Core Projects" specifically. This was the case even for VS2015 as well. |
Several of my co-workers and I am having this problem in ASP.NET projects. This option does seem to work for us if the warning level on the project less than 4. In fact, if any project does not have a warning level of 4 "remove and sort" does not work at all. see this stackoverflow question. Also I don't know if this is a problem with PPT or VS2015. The question above does not talk about PPT and I used the built in VS command to remove unused usings. |
It doesn't work for me also on Visual Studio 2017! |
@THammond9 "Remove and Sort Usings" (Lightbulb feature) as described in the stack overflow question is a base VS feature. PPT provides a new feature, which is an option to enable that will "Remove and Sort Usings on Save". When activated, it will apply the Remove and Sort Usings automatically when the file is saved. |
@VaclavElias Are you using .Net Core projects? Do you have ReSharper installed? |
@justcla Yes, I tried it on .Net Core projects and also Asp.Net MVC 5 or Console Apps and I do have ReSharper installed. The Lightbulb feature is working but PPT "Remove and Sort Usings on Save" is not working. |
@justcla The solution mentioned in the stackoverflow question fixes PPT "Remove and Sort Usings on Save" for me. The issue with the warning level applies to more than just ASP.NET projects. I encourage you to try it yourself:
|
Thanks! |
I will test it with PPT 2017 on my .NET Core projects tomorrow :) |
The new version of Power Commands (v15.0.4) uploaded last night contains an enhancement to enable Remove and Sort Usings on Save to work with .Net Core projects - and also to work with VB in both regular .NET and .NET Core. |
Thanks @justcla for letting us know. Ok, I cannot confirm if it was fixed or not but with ReSharper it still doesn't work unless a) ReSharper is Suspended or For now I am happy with b) so I get a few seconds saved for each file, it is working for regular .NET and .NET Core :) Thanks! |
Travis Illig reported:
"In a project using the new DNX build system targeting dnx46, the "Remove and Sort Usings on save" PowerCommand doesn't actually do anything on document save for any of the C# class files in the project. Same thing for "Format document on save" - saving does not result in the document being formatted.
The features do work as expected for other project types."
The text was updated successfully, but these errors were encountered: