Closed lonix1 closed 2 years ago
Tested locally with the same configuration and works.
Anyway I've experienced once in the past and I've solved unistalling and then reinstalling the extension.
Let us know if it works.
Thanks.
Just tried it again
namespace Foo { }
instead of namespace Foo;
Can you please provide a more detailed structure example of the projects and the location where you actually are creating the component?
My workspace is quite complex, but it's something like this:
workspace root
src
Directory.Build.props
Organisation1
Foo
Foo.csproj
Foo.Tests
Foo.Tests,csproj
Organisation2
Bar
Bar.csproj
Bar.Tests
Bar.Tests.csproj
Right click on project "Foo", New C# Class, ...
It will have the old namespace format namespace Foo { }
instead of namespace Foo;
Hope that helps...
Are your projects using .net 6 or greater?
Yes. I also have a Directory.Build.props
, I've updated the schema above to show its location.
If you can't replicate this, then it's "just me". So feel free to close. Maybe someone else will also have this problem and we can find a way to repro.
can you provide the content of you projects file, please?
Hey @bard83 I'm gonna close for now, and let's talk about this again if someone else has the same problem?
I feel like I've wasted too much of your time... :smile:
Thanks for your help!
I set
"csharpextensions.useFileScopedNamespace": true
.But a class is still generated like this:
Instead of this:
Context extension 1.7.0 vscode 1.69.2