Skip to content
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

Typewriter does not seem to be compatible with the latest version of C# 10. #344

Open
Xavier-Mobius opened this issue Dec 23, 2021 · 3 comments

Comments

@Xavier-Mobius
Copy link

In the new C# 10 standard namespace can be declared this way :
namespace Namespace1.Namespace2;
instead of this way.
namespace Namespace1.Namespace2 { }
but in this case the file is ignored by TypeWriter.

Example :

namespace Namespace1.Namespace2;
public class MyClass
{
    public MyClass(int prop1, string prop1)
    {
        Prop1 = prop1;
        prop2 = prop1;
    }
    public int Prop1 { get; set; }
    public string prop2 { get; set; }
}

is not generated but

namespace Namespace1.Namespace2
{
    public class MyClass
    {
        public MyClass(int prop1, string prop1)
        {
            Prop1 = prop1;
            prop2 = prop1;
        }
        public int Prop1 { get; set; }
        public string prop2 { get; set; }
    }
}

is generated.

@jaoude
Copy link

jaoude commented Dec 6, 2022

Hi,
Were you able to figure out a solution ?
Regards

@AdaskoTheBeAsT
Copy link

@jaoude
Copy link

jaoude commented Dec 12, 2022

Indeed it worked with VS 17.4.2 and scoped namespaces - thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants