Menu

#311 AppWizard fails to generate project

v1.0 (example)
closed
None
5
2019-10-13
2019-05-12
Anonymous
No

AppWizard fails with error "Cannot find file <path to="" stdafx.cpp="">" and the file exists</path>

Discussion

  • Nenad Stefanovic

    • assigned_to: Nenad Stefanovic
     
  • Nenad Stefanovic

    Any more information? Which version of Visual Studio? Installed manually or with NuGet?

     
  • Anonymous

    Anonymous - 2019-05-17

    Manually. VS 2017 and VS 2019. Both fail
    Nuget does not have AppWizard, I believe.

     
  • Anonymous

    Anonymous - 2019-05-17

    OK, it succeeds in a fresh VS install, but somehow after it was installed in the past, it fails to create the project properly even though the AppWizard setup reports success. Maybe there is some bulletproof way to uninstall a previous wizard.

     
  • Anonymous

    Anonymous - 2019-05-19

    My earlier conclusion was mistaken. After real research (ProcMon) i found that if the setting "Beta: Use UTF-8 for worldwide language support" is checked (Administrative, regional settings), then it fails. Once cleared, system restarted, the wizard works just fine.

     
  • Nenad Stefanovic

    Hmm... I don't know why would this happen. Can you check the ABSOLUTE_PATH line in WTL10AppWiz.vsz? Does it contain the correct path to where the App Wizard files are?

     
  • Nenad Stefanovic

    WTL10AppWiz.vsz is in <vsfolder>\Common7\IDE\VC\vcprojects</vsfolder>

     
  • Nenad Stefanovic

     
  • Nenad Stefanovic

    I did some digging and figure out what is going on. WTL App Wizard uses Visual Studio Wizard Engine to parse the list of files to be included in the project. The negine creates a file with parsed list. If UTF-8 is enabled, that file has UTF-8 BOM characters are the beggining (EF BB BF). Engine then uses that created file to find source files, and because of the BOM it cannot find the file.

    I think that the problem is with Wizard Engine in Visual Studio. I can't change anything in WTL App Wizard to fix this.

    I filed a new problem report with Visual Studio.

    Cheers,
    Nenad

     
  • Nenad Stefanovic

    • status: open --> closed
     
  • mailnew4ster

    mailnew4ster - 2019-10-13

    Encountered it too. Dirty workaround:

    1. Copy the message "Cannot find: ...\AppWizard\Files\Templates\1033\stdafx.cpp" as is with Ctrl+C when the error message appears. If you check, you'll see that there's a hidden unicode character before "stdafx.cpp".
    2. Go to ...\AppWizard\Files\Templates\1033\, copy stdafx.cpp, and rename it to the copied "stdafx.cpp" with the hidden unicode character. You'll see as if you have two "stdafx.cpp" files in the same folder.
    3. Generate the project, it will work.
     
    • mailnew4ster

      mailnew4ster - 2019-10-13

      Oh, and:

      1. Remove the hidden unicode character in the newly created project.
       

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB