none
Sub Main not found in UWP Project RRS feed

  • Question

  • Hi All

    I have just started devloping a UWP project using VB.net.

    I have had a lot of problems with the project corrupting (build actions randomly changing after changing xaml etc) but the latest has me stumped.

    When I try to build the project I get

    error BC30420: 'Sub Main' was not found in 'MyProjectName'

    I am completely new to UWP and was not aware that a sub main was required. I have started a blank project from scrath & search for Sub Main and there isn't one.

    I have cleaned the project, killed all the files in the Bin directory etc etc.

    Really at a loss now - any help appreciated.

    J.

    Wednesday, January 31, 2018 10:43 AM

Answers

  • Randomly by switching all of the build actions on xaml & .vb files to something different and then back to what they should be, the problem has disappeared. Not really an answer though...

    Does anyone else have a lot of problems with UWP projects?

    J.

    • Marked as answer by Joneboy Wednesday, January 31, 2018 11:24 AM
    Wednesday, January 31, 2018 11:10 AM

All replies

  • Randomly by switching all of the build actions on xaml & .vb files to something different and then back to what they should be, the problem has disappeared. Not really an answer though...

    Does anyone else have a lot of problems with UWP projects?

    J.

    • Marked as answer by Joneboy Wednesday, January 31, 2018 11:24 AM
    Wednesday, January 31, 2018 11:10 AM
  • Hello,

    What version of Visual Studio is being used? Have not seen this issue from creating a new UWP project with no added code doing a compile/build.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Wednesday, January 31, 2018 11:17 AM
    Moderator

  • Build time generally can be fraught with problems.
    Monday, June 3, 2019 12:45 PM