Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Resource Issue after Convert C++ program from VS 2003 to VS2008

Resource Issue after Convert C++ program from VS 2003 to VS2008

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpvisual-studiotutorialquestion
7 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Andraw Tang
    wrote on last edited by
    #1

    Hi, dear all, I have a C++ project created in VS2003, now I need to create another project based on it, but need VS2008. I open this project from VS2008, and the system did some conversion for it. After did some small change about it, the project can be built in VS2008, but when I run it, get exception. For example, my application class named as XXXXXApp (file name is XXXXXApp.cpp), the resurece file name as XXXXXAPP**.resx**. System::Resources::ResourceManager * resources = new System::Resources::ResourceManager(__typeof(SHXStiffLibNet::SHXStiffLibApp)); this->AppImageList->ImageStream = (__try_cast(resources->GetObject(S"AppImageList.ImageStream"))); the GetObject() call causes the error. I open the .resx file and I can see the "AppImageList.ImageStream" node is there, but why cause exception? Thanks!

    A A 2 Replies Last reply
    0
    • A Andraw Tang

      Hi, dear all, I have a C++ project created in VS2003, now I need to create another project based on it, but need VS2008. I open this project from VS2008, and the system did some conversion for it. After did some small change about it, the project can be built in VS2008, but when I run it, get exception. For example, my application class named as XXXXXApp (file name is XXXXXApp.cpp), the resurece file name as XXXXXAPP**.resx**. System::Resources::ResourceManager * resources = new System::Resources::ResourceManager(__typeof(SHXStiffLibNet::SHXStiffLibApp)); this->AppImageList->ImageStream = (__try_cast(resources->GetObject(S"AppImageList.ImageStream"))); the GetObject() call causes the error. I open the .resx file and I can see the "AppImageList.ImageStream" node is there, but why cause exception? Thanks!

      A Offline
      A Offline
      Albert Holguin
      wrote on last edited by
      #2

      What's the error? That's a .Net class, make sure you have the compiler configured for C++/CLI. It's probably some sort of configuration problem. Closely compare your VS2003 project configuration to your VS2008 project configuration.

      A 1 Reply Last reply
      0
      • A Albert Holguin

        What's the error? That's a .Net class, make sure you have the compiler configured for C++/CLI. It's probably some sort of configuration problem. Closely compare your VS2003 project configuration to your VS2008 project configuration.

        A Offline
        A Offline
        Andraw Tang
        wrote on last edited by
        #3

        Thanks for reply, The error message is: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "XXXXXApp.resources" was correctly embedded or linked into assembly "ProjeceName" at compile time, or that all the satelite assemblies requried are loadable and fully signed How can I check it? is XXXXXApp.resources a physical file? I cannot see it?

        A 2 Replies Last reply
        0
        • A Andraw Tang

          Thanks for reply, The error message is: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "XXXXXApp.resources" was correctly embedded or linked into assembly "ProjeceName" at compile time, or that all the satelite assemblies requried are loadable and fully signed How can I check it? is XXXXXApp.resources a physical file? I cannot see it?

          A Offline
          A Offline
          Albert Holguin
          wrote on last edited by
          #4

          You may want to post this question in the Managed C++/CLI[^] forum.

          1 Reply Last reply
          0
          • A Andraw Tang

            Thanks for reply, The error message is: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "XXXXXApp.resources" was correctly embedded or linked into assembly "ProjeceName" at compile time, or that all the satelite assemblies requried are loadable and fully signed How can I check it? is XXXXXApp.resources a physical file? I cannot see it?

            A Offline
            A Offline
            Albert Holguin
            wrote on last edited by
            #5

            I've never seen this problem before... but then again, I don't work with .Net regularly.

            1 Reply Last reply
            0
            • A Andraw Tang

              Hi, dear all, I have a C++ project created in VS2003, now I need to create another project based on it, but need VS2008. I open this project from VS2008, and the system did some conversion for it. After did some small change about it, the project can be built in VS2008, but when I run it, get exception. For example, my application class named as XXXXXApp (file name is XXXXXApp.cpp), the resurece file name as XXXXXAPP**.resx**. System::Resources::ResourceManager * resources = new System::Resources::ResourceManager(__typeof(SHXStiffLibNet::SHXStiffLibApp)); this->AppImageList->ImageStream = (__try_cast(resources->GetObject(S"AppImageList.ImageStream"))); the GetObject() call causes the error. I open the .resx file and I can see the "AppImageList.ImageStream" node is there, but why cause exception? Thanks!

              A Offline
              A Offline
              Andraw Tang
              wrote on last edited by
              #6

              Thanks everybody, my problem is solved. it's the problem of path setting for .resx file.

              A 1 Reply Last reply
              0
              • A Andraw Tang

                Thanks everybody, my problem is solved. it's the problem of path setting for .resx file.

                A Offline
                A Offline
                Albert Holguin
                wrote on last edited by
                #7

                Knowing where files are certainly makes programs work better :)

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups