question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

StartupObject property is not erased after enabling `Application Framework` property

See original GitHub issue

Visual Studio Version: Int Preview 16.8.0 Preview 4.0 [30514.8.main]

Summary: If you disable the Application Framework and reenable it, the StartupObject in the vbproj file is not removed. This is specifically in VB Winforms applications.

Steps to Reproduce:

  1. Open the VBWinforms.sln found in https://github.com/dotnet/winforms/tree/master/src/System.Windows.Forms/tests/IntegrationTests/VisualBasicTemplate.

  2. With the properties pages and project file side to side, disable the Enable application framework property. StartupObject property should appear.

  3. Reenable the Enable application framework property.

Expected Behavior: StartupObject property should be removed.

Actual Behavior: StartupObject property is not removed.

startup-object-bug

User Impact: If the user disables and then re-enables the Enable application framework property without any other change, the project is in a weird state and shows an error dialogue as shown.

cc: @KathleenDollard

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
melytccommented, Sep 27, 2022

https://github.com/dotnet/project-system/pull/8419 addresses this and ensures we have the correct values set in the project file and myapp file as described in the last comment.

1reaction
KlausLoeffelmanncommented, Aug 1, 2022

I am confused.

The Application Framework is on by default. We have something in the <StartupObject> (VbWinFormsFramework.My.MyApplication maybe? But I’d say it doesn’t really matter)

  1. We disable the AppFramework. - Could we put the Form from application.myapp as StartObject?
  2. We enable the AppFramework (We could put VbWinFormsFramework.My.MyApplication here, but probaby anything else would be find.)
  3. We disable the AppFramework - again, we could put the Form from application.myapp as StartObject.

Would that work? Would it make sense?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot select Main Method as Startup object in Visual ...
Project -> {ProjectName} Properties -> Application. If Enable application framework is checked, you can not select the usual Main method.
Read more >
Application Page, Project Designer (Visual Basic)
If Enable application framework is cleared, this list becomes Startup object and shows both forms and classes or modules with a Sub Main...
Read more >
Thread: [RESOLVED] A startup form has not been specified
I have a VB.net program that originally had a form. I added a module and then deleted the form, but now I get...
Read more >
Solved: Why is Form not listed in Startup Forms?
In Application Properties, with "Enable Application Framework"checked, the MainMenu form is not listed as an option in the Startup Form list ( ...
Read more >
Can't select startup object in VB.net - VS 2022
When I try to select the Startup Object in VB.Net using VS 2022 the dropdown box only shows Sub Main (Enable App Framework...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found