I have a Win Forms C++ solution that was initially created with Visual Studio 2003, converted to 2008 (successfully) and now I'm attempting to convert it to Visual Studio 2010.
The solution builds without errors then when run I get a missing manifest exception when attempting to load an image list from the resources for a form. The exception happens on the following line of code:
this->m_imageList->ImageStream = (__try_cast<System::Windows::Forms::ImageListStreamer * >(resources->GetObject(S"m_imageList.ImageStream")));
I think I've found the problem, if I examine the manifest using ildasm of the 2008 assembly I see the following for the resources for the form:
.mresource public SDTP.SDTPDataMonitorForm.resources
{
// Offset: 0x00000000 Length: 0x00006DB0
}
The manifest for the 2010 assembly appears as follows:
.mresource public SDTPnet.SDTPDataMonitorForm.resources
{
// Offset: 0x00000000 Length: 0x00004F57
}
.mresource public '..\\temp\\Debug\\SDTP.SDTPDataMonitorForm.resources' as '..$temp$Debug$SDTP.SDTPDataMonitorForm.resources'
{
// Offset: 0x00008E80 Length: 0x00004F57
}
I'm sure it can't find it due to the extra "net" text in the first instance, and the extra ..$temp$Debug in the second instance.
So finally, my question: Where in the project settings do I fix that? The ..\temp\Debug is part of the project path... Playing around a bit if I change the "Intermediate Directory" setting to just $(Configuration) I now get:
.mresource public 'Debug\\SDTP.SDTPDataMonitorForm.resources' as Debug$SDTP.SDTPDataMonitorForm.resources
{
// Offset: 0x00008E80 Length: 0x00004F57
}
in the manifest file which still generates the exception.
Thanks for any help...