-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Visual Studio does not retain 'Do not use top-level statements' check. #41631
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
Comments
cc/ @DamianEdwards as I believe this was recently added. |
This seems to be a feedback for VS, isn't it ? |
@mkArtakMSFT Is it not part of templating? However, please redirect to the appropriate channel. |
We don't by default save the previous choice of any "custom" parameters. Custom here meaning anything below the Docker choices in the UI. Templates must opt into this explicitly. We do have some mechanisms where we can override this in Visual Studio, or it can be done directly in the host file. @DamianEdwards I'll ping you offline to see how we want to approach this. |
Details for the change we need to make to the {
"id": "UseProgramMain",
"isVisible": true,
"PersistenceScope": "Shared",
"PersistenceScopeName": "Microsoft"
} @phenning is going to ensure that once we make this change in 7.0, any customer with both 6.x and 7.0 installed will see this option become sticky for all versions of the template available, i.e. it will become sticky in 6.x templates too. /Cc @vlada-shubina |
Hello @DamianEdwards , Here is another issue: #41636 |
Thanks, that's a known issue that we're currently working on getting a fix in to 7.0 and 6.0 for (#41491). |
Thanks for contacting us. We're moving this issue to the |
@DamianEdwards I have checked with .NET SDK 6.0.7 and 7.0.0 preview6 with Visual Studio 2022 version 17.3 Preview 3. The issue has not been fixed. |
@DamianEdwards I was looking at another related issue this morning and saw this, so I took a look. It looks like Preview 3 did not have the 7.0.0 preview6 version that had this change. It looks like 7.0.100-preview.6.22352.1 SDK does have the fix though. |
Yeah this fix is in the 7.0 SDK and thus will only apply to 6.0 projects when 7.0.100-preview.6 is installed. VS 17.4 will default to including .NET 7 SDK at which point this will be fixed for 6.0 projects too. |
Uh oh!
There was an error while loading. Please reload this page.
Is there an existing issue for this?
Describe the bug
First of all, thank you ASP.NET Core Team for adding an option in templates to avoid top-level statement.
However, we have noticed that Visual Studio is not retaining the
Do not use top-level statement
check.First Time:
Second Time:
Note: All other checks are retaining their last choice.
Expected Behavior
Check should retain the last choice.
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
6.0.300 and 7.0.100-preview.4.22252.9
Anything else?
Visual Studio Version: 2022 17.3 preview 1.
The text was updated successfully, but these errors were encountered: