EDN Admin
Well-known member
Scenario:
I want to build a C++/CLI project from the command line using Windows SDK 7.1 on a Windows Server 2008 x64 machine. The PlatformToolset is set to WindowsSDK7.1 and the TargetFramework is set to v3.5.
The problem:
The project compiles fine, but the resulting .dll contains a manifest that references.Net 4 components:
<pre>// Metadata version: v4.0.30319
.module extern KERNEL32.dll
.module extern MSVCR100.dll
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .zV.4..
.hash = (CD 95 65 AD 55 34 B6 AD 72 9D 3F BB 80 DA 0A 6C // ..e.U4..r.?....l
49 E5 F2 5B ) // I..[
.ver 4:0:0:0
}
.assembly extern System
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .zV.4..
.hash = (D1 AD 65 23 DB A9 C1 F1 9D D2 1D 57 B4 FA 6E 9A // ..e#.......W..n.
0D A9 6F 99 ) // ..o.
.ver 4:0:0:0
}
.assembly extern Microsoft.VisualC
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.hash = (42 DD BE 18 E0 BC 5D 94 9E E6 15 5C DA 78 D3 8E // B.....].....x..
53 A7 A1 AB ) // S...
.ver 10:0:0:0
}[/code]
<br/>
Compiling on my local dev machine, the Manifest does not contain these references:
<pre>// Metadata version: v4.0.30319
.module extern KERNEL32.dll
.module extern MSVCR100.dll
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .zV.4..
.hash = (20 91 C5 5F FF 5E 04 BB 89 25 F0 F0 18 C5 F2 EC // .._.^...%......
9D 80 5E 40 ) // ..^@
.ver 2:0:0:0
}
.assembly extern System
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .zV.4..
.hash = (BB DC C5 D6 0E 89 D9 41 45 9A F9 0E D6 A1 6C D7 // .......AE.....l.
ED B4 E1 CE )
.ver 2:0:0:0
}
.assembly extern Microsoft.VisualC
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.hash = (26 11 B8 F3 F4 2E 76 C0 BC 61 C9 79 5A 27 AD 34 // &.....v..a.yZ.4
94 EB 12 F9 )
.ver 8:0:0:0
}
[/code]
<br/>
Did I discover a bug in the Windows SDK 7.1, or am I missing something?
View the full article
I want to build a C++/CLI project from the command line using Windows SDK 7.1 on a Windows Server 2008 x64 machine. The PlatformToolset is set to WindowsSDK7.1 and the TargetFramework is set to v3.5.
The problem:
The project compiles fine, but the resulting .dll contains a manifest that references.Net 4 components:
<pre>// Metadata version: v4.0.30319
.module extern KERNEL32.dll
.module extern MSVCR100.dll
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .zV.4..
.hash = (CD 95 65 AD 55 34 B6 AD 72 9D 3F BB 80 DA 0A 6C // ..e.U4..r.?....l
49 E5 F2 5B ) // I..[
.ver 4:0:0:0
}
.assembly extern System
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .zV.4..
.hash = (D1 AD 65 23 DB A9 C1 F1 9D D2 1D 57 B4 FA 6E 9A // ..e#.......W..n.
0D A9 6F 99 ) // ..o.
.ver 4:0:0:0
}
.assembly extern Microsoft.VisualC
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.hash = (42 DD BE 18 E0 BC 5D 94 9E E6 15 5C DA 78 D3 8E // B.....].....x..
53 A7 A1 AB ) // S...
.ver 10:0:0:0
}[/code]
<br/>
Compiling on my local dev machine, the Manifest does not contain these references:
<pre>// Metadata version: v4.0.30319
.module extern KERNEL32.dll
.module extern MSVCR100.dll
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .zV.4..
.hash = (20 91 C5 5F FF 5E 04 BB 89 25 F0 F0 18 C5 F2 EC // .._.^...%......
9D 80 5E 40 ) // ..^@
.ver 2:0:0:0
}
.assembly extern System
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .zV.4..
.hash = (BB DC C5 D6 0E 89 D9 41 45 9A F9 0E D6 A1 6C D7 // .......AE.....l.
ED B4 E1 CE )
.ver 2:0:0:0
}
.assembly extern Microsoft.VisualC
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.hash = (26 11 B8 F3 F4 2E 76 C0 BC 61 C9 79 5A 27 AD 34 // &.....v..a.yZ.4
94 EB 12 F9 )
.ver 8:0:0:0
}
[/code]
<br/>
Did I discover a bug in the Windows SDK 7.1, or am I missing something?
View the full article