Menu

#1392 MSVC import reports error after apparent success

Next_Release
fixed
nobody
Bug_Report
2023-05-10
2023-05-09
No

When importing a MSVC++ workspace you get a Failed to import *any* projects from workspace file. error, while the project seems imported OK.

This is due to Open() failing at projectsimporter.cpp:280

   if (pWsp->Open(filename, Title))

Currently I have no time to investigate further.

See this forum post for more information and a test workspace.

Discussion

  • Miguel Gimenez

    Miguel Gimenez - 2023-05-10

    This call at msvcworkspaceloader.cpp:197 always returns nullptr

    project = Manager::Get()->GetProjectManager()->LoadProject(fname.GetFullPath(), false);
    

    because the code at projectmanager.cpp:267 always returns nullptr for non-CB projects:

    cbMimePlugin* plugin = Manager::Get()->GetPluginManager()->GetMIMEHandlerForFile(filename);
    if (plugin)
        plugin->OpenFile(filename);
    

    so import will always report failure, even if the projects are there.

     
  • Miguel Gimenez

    Miguel Gimenez - 2023-05-10
    • status: open --> fixed
     
  • Miguel Gimenez

    Miguel Gimenez - 2023-05-10

    Fixed in [r13270] using working code from the MSVC++ 7 importer. Looks like the original code never worked properly.

     

    Related

    Commit: [r13270]


    Last edit: Miguel Gimenez 2023-05-10

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.