From: Anthony Wieser on
It appears that SQL Server 2008 installs a new side-by-side mfc version:
8.0.50727.1833

The one included with SP1 was
8.0.50727.767

Trouble is my application now crashes when that one is loaded with a Unicode
release build.

How can I set up a manifest that insists on loading the one I distributed
with my application.

I tried setting up a manifest that said:
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC80.CRT'
version='8.0.50727.762' processorArchitecture='x86'
publicKeyToken='1fc8b3b9a1e18e3b'/>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC80.MFC'
version='8.0.50727.762' processorArchitecture='x86'
publicKeyToken='1fc8b3b9a1e18e3b'/>
</dependentAssembly>
</dependency>

(It took me ages to realize the publicKeyToken is in the folder name on in
the C:\windows\sxs folder)

But when the program loads, it still is bound to 1833.

I've then started down the route of looking at .config files, but can't
figure them out. Obviously I'd like to put it into my manifest, but it
doesn't look like that's possible.

Anthony Wieser
Wieser Software Ltd

From: Volker Enderlein on
Hi Anthony,

On 12/11/2008 09:44, Anthony Wieser wrote:
> It appears that SQL Server 2008 installs a new side-by-side mfc version:
> 8.0.50727.1833
>
> The one included with SP1 was
> 8.0.50727.767
>
> Trouble is my application now crashes when that one is loaded with a
> Unicode release build.
>
> How can I set up a manifest that insists on loading the one I
> distributed with my application.
>
> I tried setting up a manifest that said:
> </dependency>
> <dependency>
> <dependentAssembly>
> <assemblyIdentity type='win32' name='Microsoft.VC80.CRT'
> version='8.0.50727.762' processorArchitecture='x86'
> publicKeyToken='1fc8b3b9a1e18e3b'/>
> </dependentAssembly>
> </dependency>
> <dependency>
> <dependentAssembly>
> <assemblyIdentity type='win32' name='Microsoft.VC80.MFC'
> version='8.0.50727.762' processorArchitecture='x86'
> publicKeyToken='1fc8b3b9a1e18e3b'/>
> </dependentAssembly>
> </dependency>
>
> (It took me ages to realize the publicKeyToken is in the folder name on
> in the C:\windows\sxs folder)
>
> But when the program loads, it still is bound to 1833.
>
> I've then started down the route of looking at .config files, but can't
> figure them out. Obviously I'd like to put it into my manifest, but it
> doesn't look like that's possible.
>
> Anthony Wieser
> Wieser Software Ltd
>
have a look on the recent thread "Appl crash after Inst.
SQLServer2008Express due to new MFC in WinS" from Wolfgang Kruck in this
newsgroup.

HTH, cheers Volker

--
From: Anthony Wieser on
"Volker Enderlein" <volker.enderlein(a)ifm-chemnitz.de> wrote in message
news:%23o9G3ZMRJHA.4256(a)TK2MSFTNGP03.phx.gbl...
> Hi Anthony,
>
> On 12/11/2008 09:44, Anthony Wieser wrote:
>> It appears that SQL Server 2008 installs a new side-by-side mfc version:
>> 8.0.50727.1833
>>
>> The one included with SP1 was
>> 8.0.50727.767
>>
>> Trouble is my application now crashes when that one is loaded with a
>> Unicode release build.

> have a look on the recent thread "Appl crash after Inst.
> SQLServer2008Express due to new MFC in WinS" from Wolfgang Kruck in this
> newsgroup.
>
> HTH, cheers Volker

Alas, that's not the reason mine crashes. I have managed to find a machine
with only 767 installed, and it still crashes in that version too. My
problem is that DLL isn't built in the same way as the other 3
(debug/release ansi, and debug unicode).

The entry point for AfxLoadString used to begin
push ebx
push esi
move esi, dword ptr[esp+10h]

The new entry point goes:
push ebx
move ebx, dword ptr [esp+10h]
test ebx,ebx

So, it's been optimized more aggressively, and I was hooking that entry
point to handle translations as my client wanted it done, instead of via the
resource mechanism. As the code at function entry is obviously up for
grabs, I'd like to limit my software to work with only versions I've tested
with, but not have to resort to private deployment of the DLL's.

Anthony Wieser
Wieser Software Ltd

From: David Ching on
"Anthony Wieser" <newsgroups-sansspam(a)wieser-software.com> wrote in message
news:uIXdlPKRJHA.4916(a)TK2MSFTNGP06.phx.gbl...
> It appears that SQL Server 2008 installs a new side-by-side mfc version:
> 8.0.50727.1833
>
> The one included with SP1 was
> 8.0.50727.767
>
> Trouble is my application now crashes when that one is loaded with a
> Unicode release build.
>
> How can I set up a manifest that insists on loading the one I distributed
> with my application.
>
> I tried setting up a manifest that said:
> </dependency>
> <dependency>
> <dependentAssembly>
> <assemblyIdentity type='win32' name='Microsoft.VC80.CRT'
> version='8.0.50727.762' processorArchitecture='x86'
> publicKeyToken='1fc8b3b9a1e18e3b'/>
> </dependentAssembly>
> </dependency>
> <dependency>
> <dependentAssembly>
> <assemblyIdentity type='win32' name='Microsoft.VC80.MFC'
> version='8.0.50727.762' processorArchitecture='x86'
> publicKeyToken='1fc8b3b9a1e18e3b'/>
> </dependentAssembly>
> </dependency>
>
> (It took me ages to realize the publicKeyToken is in the folder name on in
> the C:\windows\sxs folder)
>
> But when the program loads, it still is bound to 1833.
>

See
http://blog.kalmbach-software.de/2008/05/03/howto-deploy-vc2008-apps-without-installing-vcredist_x86exe/
which advises removing publicKeyToken.

Also, in addition to your own manifest, you need to make sure the manifests
for the CRT and MFC are put into your project folder.

-- David

From: Anthony Wieser on
"David Ching" <dc(a)remove-this.dcsoft.com> wrote in message
news:B7157A49-C228-4E01-AFB2-6A1F0C1401BB(a)microsoft.com...
> "Anthony Wieser" <newsgroups-sansspam(a)wieser-software.com> wrote in
> message news:uIXdlPKRJHA.4916(a)TK2MSFTNGP06.phx.gbl...
>> It appears that SQL Server 2008 installs a new side-by-side mfc version:
>> 8.0.50727.1833
>>
>> The one included with SP1 was
>> 8.0.50727.767
>>
>> Trouble is my application now crashes when that one is loaded with a
>> Unicode release build.
>>
>> How can I set up a manifest that insists on loading the one I distributed
>> with my application.
>>
>> I tried setting up a manifest that said:
>> </dependency>
>> <dependency>
>> <dependentAssembly>
>> <assemblyIdentity type='win32' name='Microsoft.VC80.CRT'
>> version='8.0.50727.762' processorArchitecture='x86'
>> publicKeyToken='1fc8b3b9a1e18e3b'/>
>> </dependentAssembly>
>> </dependency>
>> <dependency>
>> <dependentAssembly>
>> <assemblyIdentity type='win32' name='Microsoft.VC80.MFC'
>> version='8.0.50727.762' processorArchitecture='x86'
>> publicKeyToken='1fc8b3b9a1e18e3b'/>
>> </dependentAssembly>
>> </dependency>
>>
>> (It took me ages to realize the publicKeyToken is in the folder name on
>> in the C:\windows\sxs folder)
>>
>> But when the program loads, it still is bound to 1833.
>>
>
> See
> http://blog.kalmbach-software.de/2008/05/03/howto-deploy-vc2008-apps-without-installing-vcredist_x86exe/
> which advises removing publicKeyToken.
>
> Also, in addition to your own manifest, you need to make sure the
> manifests for the CRT and MFC are put into your project folder.
>
> -- David
>

I thought I did all of that while trying to get it to work today, but it
still didn't load the right versions on my Vista machine.

Things are perhaps slightly complicated by the fact that the project
actually has 5 mfc extension dll's as well as the main program, and that
seems to be confirmed by the site you provide.The extension dll's all had a
manifest which presumably has autogenerated dependencies as well.

What I really wanted was AppConfig, to override the Publish upgrade to the
latest, but that doesn't appear to work on Vista (it complains about the
Windows node under the configuration root).

Anthony Wieser
Wieser Software Ltd