Resource Issue after Convert C++ program from VS 2003 to VS2008
-
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!
-
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!
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.
-
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.
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?
-
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?
You may want to post this question in the Managed C++/CLI[^] forum.
-
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?
I've never seen this problem before... but then again, I don't work with .Net regularly.
-
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!
Thanks everybody, my problem is solved. it's the problem of path setting for .resx file.
-
Thanks everybody, my problem is solved. it's the problem of path setting for .resx file.
Knowing where files are certainly makes programs work better :)