-
Notifications
You must be signed in to change notification settings - Fork 511
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
systemUsingDirectivesFirst false by default in Visual Studio Preview #3896
Comments
Thanks! I see it too. If I don't add the setting to style.json, I notice this as well:
So it only seems to misbehave when running as part of the intellisense. Do you see the same behaviour, @LWehmschulteAtRosenxt? |
@bjornhellander Yup, I have the same behavior |
I just upgraded to VS preview 5 and it seems to work as expected again. Could you close this if you agree? |
Yes. Same here. I'll close this. Thanks for your support |
This was fixed by dotnet/roslyn#75317 |
Thanks for your work 😊 |
I've updated my Visual Studio 2022 to Preview Version 17.12.0 Preview 3.0 and since then the
systemUsingDirectivesFirst
configuration seems to behave as if the default value was false, which is different to what is documented in the json schemaThe following code gives me the following Warning in Visual Studio:
![image](https://private-user-images.githubusercontent.com/171003437/377795903-86dd3b13-cf12-4088-a372-1daec09fd7a9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0Mzg1NTIsIm5iZiI6MTczOTQzODI1MiwicGF0aCI6Ii8xNzEwMDM0MzcvMzc3Nzk1OTAzLTg2ZGQzYjEzLWNmMTItNDA4OC1hMzcyLTFkYWVjMDlmZDdhOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxM1QwOTE3MzJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hNDgyNDJjZDIxZWRkMGVlODViMjA5ODA5OWMxY2U2YzQ4ZjBkYzQ1OGRlNmFiNTQxMTEwYzM2NGQ4MzZjZTEzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.8um-AXPRLNpoycXnQykQG0w1Lfu2Llq0zghWJ4B7O64)
Using directives should be ordered alphabetically by the namespaces
stylecop.json:
If I now manually set the systemUsingDirectivesFirst to true in the stylecop.json, the warning will disappear:
![image](https://private-user-images.githubusercontent.com/171003437/377796132-7c0cacdd-227b-491e-ac4d-e980e5992c65.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0Mzg1NTIsIm5iZiI6MTczOTQzODI1MiwicGF0aCI6Ii8xNzEwMDM0MzcvMzc3Nzk2MTMyLTdjMGNhY2RkLTIyN2ItNDkxZS1hYzRkLWU5ODBlNTk5MmM2NS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxM1QwOTE3MzJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mYmY0NTg2NTllMGJmZTg0OTJiMmFiNGMxYjcyYzc3Y2Q1M2I4OGM1Njc2MmZiNTI5MGY4NDE4YTk3NTFiOWI2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.tmI5XHG53XWjv081TGw4JndEgmkpY51x3V62rmbk_70)
The text was updated successfully, but these errors were encountered: