-
Notifications
You must be signed in to change notification settings - Fork 6k
Fix code format #27745
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
Fix code format #27745
Conversation
Fix code format and fix the API usage.
Hi @lindexi - thank you for fixing this. There is a build error, could you please also add a new .csproj for this?
|
@IEvangelist Sorry, I can not compile the project after I added the csproj file. Because we define the same MainWindow class in Should I rename the MainWindow to MainWindow3 or MainWindow4 in |
<TargetFramework>net6.0-windows</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<UseWPF>true</UseWPF> | ||
<EnableDefaultCompileItems>false</EnableDefaultCompileItems> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Youssef1313 Because we define the same MainWindow class in example.cs and example3.cs and example4.cs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with EnableDefaultCompileItems
being false is that it beats the purpose of the csproj, which is to make sure the code compiles properly. If the examples are completely independent, I'd make a folder for each of them, each with its own csproj. @IEvangelist Do you agree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually example3
and example4
doesn't seem to be referenced. So they can just be deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@IEvangelist Can I delete the example3.cs and example4.cs file and create the MainWindow2.xaml file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'd have to verify that those two files are in fact not being referenced, if you can prove that then yes.
Summary
Fix code format and fix the API usage.