none
deploy application to a machine without VC runtime

    Question

  • Hello

    I wrote a java application, that uses jni to call a native dll, which calls a c++/cli dll, that calls a third party c# dll, using VC++ 2005.
    This application runs fine on my development machine. The development machine is a windows xp computer with .net 2.0.

    The native dll is called BridgeTest.dll.
    The c++/cli dll is called Bridge.dll.

    The target machine is also a x86 computer with windows xp and .net2.0, but also .net3.0.
    When I deploy this application, it does not work anymore. I get the following java error:

    java.lang.UnsatisfiedLinkError: C:\workspaces\michael\Specimen\BridgeTest.dll: Diese Anwendung konnte nicht gestartet werden, weil die Anwenungskonfiguration nicht korrekt ist. Zur Problembehebung sollten Sie die Anwendung neu installieren
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(Unknown Source)
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at diplom.model.VMLoadData.<clinit>(VMLoadData.java:15)
    Exception in thread "main"

    I deployed the release version of the project to the target machine.
    When i run Dependency Walker on the target machine it misses two dll files, IESHIMS.dll and WER.dll. These files are not on the target machine.
    I searched in the www for information about these two dlls and i found that this is maybe not the reason for the error.

    I used ildasm.exe to watch the manifest of the c++/cli.dll and it looks like this:

    // Metadata version: v2.0.50727
    .assembly extern mscorlib
    {
      .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )                         // .z\V.4..
      .hash = (5E D8 BB A7 AA FE 61 CE FB 7F 40 50 CF 08 FA 7D   // ^.....a...@P...}
               06 13 F1 7C )                                     // ...|
      .ver 2:0:0:0
    }
    .assembly extern System.Drawing
    {
      .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )                         // .?_....:
      .hash = (18 A8 0F 7A B6 58 AC 27 D5 BE 7D B2 48 30 1F 81   // ...z.X.'..}.H0..
               80 8C 94 33 )                                     // ...3
      .ver 2:0:0:0
    }
    .assembly extern VMscope.VirtualSlideAccess
    {
      .publickeytoken = (15 A4 00 36 68 F5 B4 20 )                         // ...6h.. 
      .hash = (14 6E 40 AB 9A 60 7B 91 73 6F 55 78 6B C5 B6 C0   // .n@..`{.soUxk...
               48 0C 35 80 )                                     // H.5.
      .ver 2:0:3555:28882
    }
    .assembly extern VMscope.FrameWork.Trustable.Resources
    {
      .publickeytoken = (1B 2E 7F DB 7F 53 A4 66 )                         // .....S.f
      .hash = (42 09 48 15 BC A3 DB 63 B2 4F C0 87 2A 1D 1F 19   // B.H....c.O..*...
               AF 89 F7 4B )                                     // ...K
      .ver 3:0:3555:28857
    }
    .assembly extern VMscope.FrameWork.Trustable.Resources.Extended
    {
      .publickeytoken = (BC 6B E7 71 C1 EE 38 C3 )                         // .k.q..8.
      .hash = (08 E8 5B 30 A1 7F 2D A9 68 27 62 63 D8 64 EA 66   // ..[0..-.h'bc.d.f
               75 48 FD 17 )                                     // uH..
      .ver 3:0:3555:28860
    }
    .assembly extern VMscope.InteropCore
    {
      .publickeytoken = (3C 30 CE 52 95 97 64 DC )                         // <0.R..d.
      .hash = (F2 11 2D 10 A9 8C 3A FE 21 DE 45 23 EA 18 CA ED   // ..-...:.!.E#....
               F3 B7 16 7C )                                     // ...|
      .ver 3:0:3555:27869
    }
    .assembly extern Microsoft.VisualC
    {
      .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )                         // .?_....:
      .hash = (69 5B 17 49 CC 99 6C 38 4C 5A F0 8F 0B 5F 02 38   // i[.I..l8LZ..._.8
               28 2E DB 64 )                                     // (..d
      .ver 8:0:0:0
    }
    .assembly extern System
    {
      .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )                         // .z\V.4..
      .hash = (2B F4 C9 94 4F 20 75 DA FC 11 4E 07 D7 2C 66 75   // +...O u...N..,fu
               36 11 F2 09 )                                     // 6...
      .ver 2:0:0:0
    }
    .assembly Bridge
    {
      .custom instance void [mscorlib]System.Reflection.AssemblyDelaySignAttribute::.ctor(bool) = ( 01 00 00 00 00 ) 
      .custom instance void [mscorlib]System.Reflection.AssemblyTrademarkAttribute::.ctor(string) = ( 01 00 00 00 00 ) 
      .custom instance void [mscorlib]System.Reflection.AssemblyCopyrightAttribute::.ctor(string) = ( 01 00 00 00 00 ) 
      .custom instance void [mscorlib]System.Reflection.AssemblyKeyFileAttribute::.ctor(string) = ( 01 00 00 00 00 ) 
      .custom instance void [mscorlib]System.Reflection.AssemblyTitleAttribute::.ctor(string) = ( 01 00 00 00 00 ) 
      .custom instance void [mscorlib]System.Reflection.AssemblyCompanyAttribute::.ctor(string) = ( 01 00 00 00 00 ) 
      .custom instance void [mscorlib]System.Reflection.AssemblyConfigurationAttribute::.ctor(string) = ( 01 00 00 00 00 ) 
      .custom instance void [mscorlib]System.Reflection.AssemblyDescriptionAttribute::.ctor(string) = ( 01 00 00 00 00 ) 
      .custom instance void [mscorlib]System.Reflection.AssemblyProductAttribute::.ctor(string) = ( 01 00 00 00 00 ) 
      .custom instance void [mscorlib]System.Reflection.AssemblyKeyNameAttribute::.ctor(string) = ( 01 00 00 00 00 ) 
      .permissionset reqmin
                 = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}}
      .hash algorithm 0x00008004
      .ver 1:0:3567:21763
    }
    .module Bridge.dll
    // MVID: {B523A269-9764-4C18-A4D5-49F77429D0D7}
    .imagebase 0x10000000
    .file alignment 0x00000200
    .stackreserve 0x00100000
    .subsystem 0x0002       // WINDOWS_GUI
    .corflags 0x00000010    // 
    // Image base: 0x03D00000
    .vtfixup [1] int32 retainappdomain at D_00011004 // 06000007
    .vtfixup [1] int32 retainappdomain at D_00011050 // 06000008
    .vtfixup [1] int32 retainappdomain at D_00011054 // 06000009
    .vtfixup [1] int32 retainappdomain at D_00011058 // 0600000A
    .vtfixup [1] int32 retainappdomain at D_00011088 // 0600000D
    .vtfixup [1] int32 retainappdomain at D_0001108C // 0600000E
    .vtfixup [1] int32 retainappdomain at D_00011090 // 0600000F
    .vtfixup [1] int32 retainappdomain at D_00011094 // 06000010
    .vtfixup [1] int32 retainappdomain at D_00011098 // 06000012
    .vtfixup [1] int32 retainappdomain at D_000110CC // 06000013
    .vtfixup [1] int32 retainappdomain at D_000110D0 // 06000014
    .vtfixup [1] int32 retainappdomain at D_000110D4 // 06000015
    .vtfixup [1] int32 retainappdomain at D_000110D8 // 06000016
    .vtfixup [1] int32 retainappdomain at D_000110DC // 06000017
    .vtfixup [1] int32 retainappdomain at D_000110E0 // 06000018
    .vtfixup [1] int32 retainappdomain at D_000110E4 // 06000019
    .vtfixup [1] int32 retainappdomain at D_000110E8 // 0600008F
    .vtfixup [1] int32 retainappdomain at D_000110EC // 06000090
    .vtfixup [1] int32 retainappdomain at D_000110F0 // 06000099
    .vtfixup [1] int32 retainappdomain at D_0001111C // 06000001
    .vtfixup [1] int32 retainappdomain at D_00011120 // 06000002
    .vtfixup [1] int32 retainappdomain at D_00011124 // 0600002A
    .vtfixup [1] int32 retainappdomain at D_00011128 // 06000005
    .vtfixup [1] int32 retainappdomain at D_0001112C // 06000006
    .vtfixup [1] int32 retainappdomain at D_0001115C // 0600000B
    .vtfixup [1] int32 retainappdomain at D_00011160 // 0600000C
    .vtfixup [1] int32 retainappdomain at D_00011164 // 06000011
    .vtfixup [1] int32 retainappdomain at D_00011168 // 06000022
    .vtfixup [1] int32 retainappdomain at D_0001116C // 06000026
    .vtfixup [1] int32 retainappdomain at D_00011170 // 06000028
    .vtfixup [1] int32 retainappdomain at D_00011174 // 06000004
    .vtfixup [1] int32 retainappdomain at D_00011178 // 0600001A
    .vtfixup [1] int32 retainappdomain at D_0001117C // 06000092
    .vtfixup [1] int32 retainappdomain at D_00011180 // 0600001E
    .vtfixup [1] int32 retainappdomain at D_00011184 // 06000096
    .vtfixup [1] int32 retainappdomain at D_00011188 // 06000024
    .vtfixup [1] int32 retainappdomain at D_0001118C // 06000003
    .vtfixup [1] int32 retainappdomain at D_00011190 // 0600001C
    .vtfixup [1] int32 retainappdomain at D_00011194 // 06000094
    .vtfixup [1] int32 retainappdomain at D_00011198 // 06000020
    .vtfixup [1] int32 retainappdomain at D_0001119C // 06000098
    .vtfixup [1] int32 retainappdomain at D_000111A0 // 06000023
    .vtfixup [1] int32 retainappdomain at D_000111A4 // 06000027
    .vtfixup [1] int32 retainappdomain at D_000111A8 // 06000029
    .vtfixup [1] int32 retainappdomain at D_000111AC // 0600001B
    .vtfixup [1] int32 retainappdomain at D_000111B0 // 06000091
    .vtfixup [1] int32 retainappdomain at D_000111B4 // 0600001F
    .vtfixup [1] int32 retainappdomain at D_000111B8 // 06000095
    .vtfixup [1] int32 retainappdomain at D_000111BC // 06000025
    .vtfixup [1] int32 retainappdomain at D_000111C0 // 0600001D
    .vtfixup [1] int32 retainappdomain at D_000111C4 // 06000093
    .vtfixup [1] int32 retainappdomain at D_000111C8 // 06000021
    .vtfixup [1] int32 retainappdomain at D_000111CC // 06000097
    .vtfixup [1] int32 retainappdomain at D_00011200 // 0600002B
    .vtfixup [1] int32 retainappdomain at D_00011204 // 0600002C
    .vtfixup [1] int32 retainappdomain at D_00011208 // 0600002D
    .vtfixup [1] int32 retainappdomain at D_0001120C // 0600002E
    .vtfixup [1] int32 retainappdomain at D_00011210 // 0600002F
    .vtfixup [1] int32 retainappdomain at D_00011214 // 06000030
    .vtfixup [1] int32 retainappdomain at D_00011218 // 06000031
    .vtfixup [1] int32 retainappdomain at D_0001121C // 06000032
    .vtfixup [1] int32 retainappdomain at D_00011220 // 06000033
    .vtfixup [1] int32 retainappdomain at D_00011224 // 06000034
    .vtfixup [1] int32 retainappdomain at D_00011228 // 06000035
    .vtfixup [1] int32 retainappdomain at D_0001122C // 06000044
    .vtfixup [1] int32 retainappdomain at D_00011230 // 06000045
    .vtfixup [1] int32 retainappdomain at D_00011234 // 06000046
    .vtfixup [1] int32 retainappdomain at D_00011238 // 06000047
    .vtfixup [1] int32 retainappdomain at D_0001123C // 06000048
    .vtfixup [1] int32 retainappdomain at D_00011240 // 0600004D
    .vtfixup [1] int32 retainappdomain at D_00011244 // 0600004E
    .vtfixup [1] int32 retainappdomain at D_00011248 // 0600004F
    .vtfixup [1] int32 retainappdomain at D_0001124C // 06000050
    .vtfixup [1] int32 retainappdomain at D_00011250 // 0600003D
    .vtfixup [1] int32 retainappdomain at D_00011254 // 0600003E
    .vtfixup [1] int32 retainappdomain at D_00011258 // 0600003F
    .vtfixup [1] int32 retainappdomain at D_0001125C // 06000040
    .vtfixup [1] int32 retainappdomain at D_00011260 // 06000041
    .vtfixup [1] int32 retainappdomain at D_00011264 // 06000042
    .vtfixup [1] int32 retainappdomain at D_00011268 // 06000043
    .vtfixup [1] int32 retainappdomain at D_0001126C // 06000049
    .vtfixup [1] int32 retainappdomain at D_00011270 // 0600004B
    .vtfixup [1] int32 retainappdomain at D_00011274 // 0600004C
    .vtfixup [1] int32 retainappdomain at D_00011278 // 0600004A
    .vtfixup [1] int32 retainappdomain at D_0001127C // 06000036
    .vtfixup [1] int32 retainappdomain at D_00011280 // 06000037
    .vtfixup [1] int32 retainappdomain at D_00011284 // 06000038
    .vtfixup [1] int32 retainappdomain at D_00011288 // 06000039
    .vtfixup [1] int32 retainappdomain at D_0001128C // 0600003A
    .vtfixup [1] int32 retainappdomain at D_00011290 // 0600003B
    .vtfixup [1] int32 retainappdomain at D_00011294 // 0600003C
    .vtfixup [1] int32 retainappdomain at D_00011298 // 06000051
    .vtfixup [1] int32 retainappdomain at D_0001129C // 06000052
    .vtfixup [1] int32 retainappdomain at D_000112A0 // 06000053
    .vtfixup [1] int32 retainappdomain at D_000112A4 // 06000055
    .vtfixup [1] int32 retainappdomain at D_000112A8 // 06000056
    .vtfixup [1] int32 retainappdomain at D_000112AC // 06000054
    .vtfixup [1] int32 retainappdomain at D_000112B0 // 06000061
    .vtfixup [1] int32 retainappdomain at D_000112B4 // 06000066
    .vtfixup [1] int32 retainappdomain at D_000112B8 // 0600006C
    .vtfixup [1] int32 retainappdomain at D_000112BC // 0600006D
    .vtfixup [1] int32 retainappdomain at D_000112C0 // 06000069
    .vtfixup [1] int32 retainappdomain at D_000112C4 // 0600006A
    .vtfixup [1] int32 retainappdomain at D_000112C8 // 0600006B
    .vtfixup [1] int32 retainappdomain at D_000112CC // 06000057
    .vtfixup [1] int32 retainappdomain at D_000112D0 // 06000058
    .vtfixup [1] int32 retainappdomain at D_000112D4 // 06000059
    .vtfixup [1] int32 retainappdomain at D_000112D8 // 0600005A
    .vtfixup [1] int32 retainappdomain at D_000112DC // 0600005D
    .vtfixup [1] int32 retainappdomain at D_000112E0 // 0600005E
    .vtfixup [1] int32 retainappdomain at D_000112E4 // 0600005F
    .vtfixup [1] int32 retainappdomain at D_000112E8 // 06000060
    .vtfixup [1] int32 retainappdomain at D_000112EC // 06000062
    .vtfixup [1] int32 retainappdomain at D_000112F0 // 06000064
    .vtfixup [1] int32 retainappdomain at D_000112F4 // 06000065
    .vtfixup [1] int32 retainappdomain at D_000112F8 // 06000068
    .vtfixup [1] int32 retainappdomain at D_000112FC // 06000063
    .vtfixup [1] int32 retainappdomain at D_00011300 // 06000067
    .vtfixup [1] int32 retainappdomain at D_00011304 // 0600005C
    .vtfixup [1] int32 retainappdomain at D_00011308 // 0600005B
    .vtfixup [1] int32 retainappdomain at D_0001130C // 0600006E
    .vtfixup [1] int32 retainappdomain at D_00011310 // 0600006F
    .vtfixup [1] int32 retainappdomain at D_00011314 // 06000070
    .vtfixup [1] int32 retainappdomain at D_00011318 // 06000072
    .vtfixup [1] int32 retainappdomain at D_0001131C // 06000071
    
    
    The question is:
    Is it true that the IESHIMS.DLL and WER.DLL are not the reason for the error. When not, where can i get these two dlls?
    What can also be another reason for the error?

    Any help is appreciated!

    Kind regards,
    Michael
    Wednesday, October 07, 2009 11:58 AM

Answers

  • You are compiling with /MDd, that's not correct, it brings in the debug version of the CRT library.  Change to /MD: Project + Properties, C/C++, Code Generation, Runtime Library.

    You are doing something else that is *very* naughty, you are using assemblies in the GAC as reference assemblies.  This is going to get you in trouble sooner or later, probably later.

    Consider putting this line in your precompiled header file, it ensures the CRT version referenced in your manifest will always match the one you have installed on your machine:

    #include <crtdefs.h>


    Hans Passant.
    • Marked as answer by eryang Wednesday, October 14, 2009 1:57 AM
    Wednesday, October 07, 2009 3:38 PM
    Moderator
  • The "Copy Local" option in the Framework and References setting ensures that you get a copy of the DLL in your build directory.  Set it to False to use the GAC, True to use the local copy.  You'd normally only use the GAC on the target machine and only if the assembly is shared between multiple programs.  If the component you use requires the GAC then you should leave it at False.

    Hans Passant.
    • Marked as answer by eryang Wednesday, October 14, 2009 1:57 AM
    Wednesday, October 07, 2009 6:58 PM
    Moderator

All replies

  • I opened the file Bridge.dll.intermediate.manifest in the windows editor and it looks like this:
    <?xml version='1.0' encoding='UTF-8' standalone='yes'?>
    <assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
      <dependency>
        <dependentAssembly>
          <assemblyIdentity type='win32' name='Microsoft.VC80.DebugCRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
        </dependentAssembly>
      </dependency>
    </assembly>
    
    Why is there still
    name='Microsoft.VC80.DebugCRT'


    even I compiled in Release mode?
    Wednesday, October 07, 2009 12:55 PM
  • The manifest entry is generated by the crtdefs.h header file.  You'll get DebugCRT when the _DEBUG macro is defined.  Which in general isn't defined for the Release configuration.  Check your settings.  Also make sure you actually deployed the CRT DLLs to the target machine.

    Hans Passant.
    Wednesday, October 07, 2009 1:02 PM
    Moderator
  • Hello and thanks nobugz

    I switched the Configuration

    Properties>Linker>Debugging>Generate Debug Info to no
    and
    Properties>Linker>Debugging>Debuggable Assembly to No runtime tracking and enable optimization

    Properties>C/C++>Preprocessor>Preprocessor Definitions is set to WIN32;NDEBUG

    but still i have:

    <assemblyIdentity type='win32' name='Microsoft.VC80.DebugCRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />


    Where can i switch of the_DEBUG macro?

    What are the CRT DLLs?
    Before I deployed the files msvcm80d.dll, msvcp80d.dll, msvcr80d.dll to the target machine, because dependency walker searched for those files.
    Now it just misses IESHIMS.dll and WER.dll.

    regards,
    Michael
    Wednesday, October 07, 2009 1:41 PM
  • I deployed the release version of the project to the target machine.
    When i run Dependency Walker on the target machine it misses two dll files, IESHIMS.dll and WER.dll. These files are not on the target machine.
    I searched in the www for information about these two dlls and i found that this is maybe not the reason for the error.
    Did you see this post...

    http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.dotnet.languages.vc&tid=57b1a7dd-a4b3-4e12-88be-b8942d842c85&cat=en_US_73741da6-4fe1-4b05-96ce-54117b0cf52a&lang=en&cr=US&sloc=en-us&m=1&p=1

    Are your CRT and MFC versions the same on both machines?
    Wednesday, October 07, 2009 1:54 PM
  • Post the content of the BuildLog.htm file from your Release build folder.

    Hans Passant.
    Wednesday, October 07, 2009 2:40 PM
    Moderator
  • Hello nobugz and JeffWask

    Thanks for helping me.

    This is the content of the BuilLog.htm file:

    Build Log
     	 	
    
    Build started: Project: JNItoDotNet, Configuration: Release|Win32
    
    Command Lines
     	 	
    
    Creating temporary file "e:\Diplom\JNItoDotNet\Release\RSP00000B29403900.rsp" with contents
    [
    /O2 /Ob1 /D "WIN32" /D "NDEBUG" /D "_VC80_UPGRADE=0x0700" /D "_WINDLL" /D "_MBCS" /FD /EHa /MDd /Yu"stdafx.h" /Fp"Release\Bridge.pch" /Fo"Release\\" /Fd"Release\vc80.pdb" /W3 /c /clr /TP /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll" /FU "c:\WINDOWS\assembly\GAC_MSIL\VMscope.VirtualSlideAccess\2.0.3555.28882__15a4003668f5b420\VMscope.VirtualSlideAccess.dll" /FU "c:\WINDOWS\assembly\GAC_MSIL\VMscope.FrameWork.Trustable.Resources\3.0.3555.28857__1b2e7fdb7f53a466\VMscope.FrameWork.Trustable.Resources.DLL" /FU "c:\WINDOWS\assembly\GAC_MSIL\VMscope.FrameWork.Trustable.Resources.Extended\3.0.3555.28860__bc6be771c1ee38c3\VMscope.FrameWork.Trustable.Resources.Extended.DLL" /FU "c:\WINDOWS\assembly\GAC_MSIL\VMscope.InteropCore\3.0.3555.27869__3c30ce52959764dc\VMscope.InteropCore.DLL"
    
    .\Bridge.cpp
    
    .\AssemblyInfo.cpp
    ]
    Creating command line "cl.exe @e:\Diplom\JNItoDotNet\Release\RSP00000B29403900.rsp /nologo /errorReport:prompt"
    Creating temporary file "e:\Diplom\JNItoDotNet\Release\RSP00000C29403900.rsp" with contents
    [
    /O2 /Ob1 /D "WIN32" /D "NDEBUG" /D "_VC80_UPGRADE=0x0700" /D "_WINDLL" /D "_MBCS" /FD /EHa /MDd /Yc"stdafx.h" /Fp"Release\Bridge.pch" /Fo"Release\\" /Fd"Release\vc80.pdb" /W3 /c /clr /TP /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll" /FU "c:\WINDOWS\assembly\GAC_MSIL\VMscope.VirtualSlideAccess\2.0.3555.28882__15a4003668f5b420\VMscope.VirtualSlideAccess.dll" /FU "c:\WINDOWS\assembly\GAC_MSIL\VMscope.FrameWork.Trustable.Resources\3.0.3555.28857__1b2e7fdb7f53a466\VMscope.FrameWork.Trustable.Resources.DLL" /FU "c:\WINDOWS\assembly\GAC_MSIL\VMscope.FrameWork.Trustable.Resources.Extended\3.0.3555.28860__bc6be771c1ee38c3\VMscope.FrameWork.Trustable.Resources.Extended.DLL" /FU "c:\WINDOWS\assembly\GAC_MSIL\VMscope.InteropCore\3.0.3555.27869__3c30ce52959764dc\VMscope.InteropCore.DLL"
    
    .\Stdafx.cpp
    ]
    Creating command line "cl.exe @e:\Diplom\JNItoDotNet\Release\RSP00000C29403900.rsp /nologo /errorReport:prompt"
    Creating temporary file "e:\Diplom\JNItoDotNet\Release\RSP00000D29403900.rsp" with contents
    [
    /OUT:".\Release/Bridge.dll" /INCREMENTAL:NO /DLL /MANIFEST /MANIFESTFILE:"Release\Bridge.dll.intermediate.manifest" /ASSEMBLYDEBUG:DISABLE /FIXED:No kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
    
    ".\Release\AssemblyInfo.obj"
    
    ".\Release\Bridge.obj"
    
    ".\Release\Stdafx.obj"
    ]
    Creating command line "link.exe @e:\Diplom\JNItoDotNet\Release\RSP00000D29403900.rsp /NOLOGO /ERRORREPORT:PROMPT"
    Creating temporary file "e:\Diplom\JNItoDotNet\Release\RSP00000E29403900.rsp" with contents
    [
    /outputresource:".\Release\Bridge.dll;#2" /manifest
    
    .\Release\Bridge.dll.intermediate.manifest
    ]
    Creating command line "mt.exe @e:\Diplom\JNItoDotNet\Release\RSP00000E29403900.rsp /nologo"
    Creating temporary file "e:\Diplom\JNItoDotNet\Release\BAT00000F29403900.bat" with contents
    [
    @echo Manifest resource last updated at %TIME% on %DATE% > .\Release\mt.dep
    ]
    Creating command line "e:\Diplom\JNItoDotNet\Release\BAT00000F29403900.bat"
    
    Output Window
     	 	
    
    Compiling...
    Stdafx.cpp
    c:\windows\assembly\gac_msil\vmscope.framework.trustable.resources\3.0.3555.28857__1b2e7fdb7f53a466\vmscope.framework.trustable.resources.dll : warning C4945: 'PoweredByAttribute' : cannot import symbol from 'c:\windows\assembly\gac_msil\vmscope.framework.trustable.resources\3.0.3555.28857__1b2e7fdb7f53a466\vmscope.framework.trustable.resources.dll': as 'SmartAssembly::Attributes::PoweredByAttribute' has already been imported from another assembly 'VMscope.VirtualSlideAccess'
            c:\windows\assembly\gac_msil\vmscope.virtualslideaccess\2.0.3555.28882__15a4003668f5b420\vmscope.virtualslideaccess.dll : see declaration of 'SmartAssembly::Attributes::PoweredByAttribute'
            first seen type is used; re-order imported assemblies to use the current type
            This diagnostic occurred while importing type 'SmartAssembly.Attributes.PoweredByAttribute' from assembly 'VMscope.FrameWork.Trustable.Resources, Version=3.0.3555.28857, Culture=neutral, PublicKeyToken=1b2e7fdb7f53a466'.
    c:\windows\assembly\gac_msil\vmscope.framework.trustable.resources.extended\3.0.3555.28860__bc6be771c1ee38c3\vmscope.framework.trustable.resources.extended.dll : warning C4945: 'PoweredByAttribute' : cannot import symbol from 'c:\windows\assembly\gac_msil\vmscope.framework.trustable.resources.extended\3.0.3555.28860__bc6be771c1ee38c3\vmscope.framework.trustable.resources.extended.dll': as 'SmartAssembly::Attributes::PoweredByAttribute' has already been imported from another assembly 'VMscope.VirtualSlideAccess'
            c:\windows\assembly\gac_msil\vmscope.virtualslideaccess\2.0.3555.28882__15a4003668f5b420\vmscope.virtualslideaccess.dll : see declaration of 'SmartAssembly::Attributes::PoweredByAttribute'
            first seen type is used; re-order imported assemblies to use the current type
            This diagnostic occurred while importing type 'SmartAssembly.Attributes.PoweredByAttribute' from assembly 'VMscope.FrameWork.Trustable.Resources.Extended, Version=3.0.3555.28860, Culture=neutral, PublicKeyToken=bc6be771c1ee38c3'.
    c:\windows\assembly\gac_msil\vmscope.interopcore\3.0.3555.27869__3c30ce52959764dc\vmscope.interopcore.dll : warning C4945: 'PoweredByAttribute' : cannot import symbol from 'c:\windows\assembly\gac_msil\vmscope.interopcore\3.0.3555.27869__3c30ce52959764dc\vmscope.interopcore.dll': as 'SmartAssembly::Attributes::PoweredByAttribute' has already been imported from another assembly 'VMscope.VirtualSlideAccess'
            c:\windows\assembly\gac_msil\vmscope.virtualslideaccess\2.0.3555.28882__15a4003668f5b420\vmscope.virtualslideaccess.dll : see declaration of 'SmartAssembly::Attributes::PoweredByAttribute'
            first seen type is used; re-order imported assemblies to use the current type
            This diagnostic occurred while importing type 'SmartAssembly.Attributes.PoweredByAttribute' from assembly 'VMscope.InteropCore, Version=3.0.3555.27869, Culture=neutral, PublicKeyToken=3c30ce52959764dc'.
    Compiling...
    Bridge.cpp
    AssemblyInfo.cpp
    Generating Code...
    Linking...
       Creating library .\Release/Bridge.lib and object .\Release/Bridge.exp
    Embedding manifest...
    
    Results
     	 	
    
    Build log was saved at "file://e:\Diplom\JNItoDotNet\Release\BuildLog.htm"
    JNItoDotNet - 0 error(s), 3 warning(s)
    
    

    On both machines run .NET version v2.0.50727. Where can I check the CRTand MFC versions?

    best regards,
    Michael

    Wednesday, October 07, 2009 2:51 PM
  • I looked in add/remove programs (with show updates checked) and have not find the update KB971090 for .NET Framework 2.0 Service Pack 2 I only have KB958481 installed.

    Wednesday, October 07, 2009 3:17 PM
  • You are compiling with /MDd, that's not correct, it brings in the debug version of the CRT library.  Change to /MD: Project + Properties, C/C++, Code Generation, Runtime Library.

    You are doing something else that is *very* naughty, you are using assemblies in the GAC as reference assemblies.  This is going to get you in trouble sooner or later, probably later.

    Consider putting this line in your precompiled header file, it ensures the CRT version referenced in your manifest will always match the one you have installed on your machine:

    #include <crtdefs.h>


    Hans Passant.
    • Marked as answer by eryang Wednesday, October 14, 2009 1:57 AM
    Wednesday, October 07, 2009 3:38 PM
    Moderator
  • Hello nobugz

    I changed the settings you told and now it works. Thank you!!

    I also put the line
    #include <crtdefs.h>
    to both stdafx.h files in the project.

    Also I reference the dlls from another position now, not from the GAC anymore. However the files have to be in the GAC, because when I delete the files out of there the dlls will not be found at runtime anymore.

    Is that what you meant?

    Best regards,
    Michael



    Wednesday, October 07, 2009 6:38 PM
  • The "Copy Local" option in the Framework and References setting ensures that you get a copy of the DLL in your build directory.  Set it to False to use the GAC, True to use the local copy.  You'd normally only use the GAC on the target machine and only if the assembly is shared between multiple programs.  If the component you use requires the GAC then you should leave it at False.

    Hans Passant.
    • Marked as answer by eryang Wednesday, October 14, 2009 1:57 AM
    Wednesday, October 07, 2009 6:58 PM
    Moderator
  • Thanks again nobugz

    On a x86 machine the program runs now, but not on a x64 machine. Do you know if i need other crt libraries for a x64 machine?

    Best regards,
    Michael
    Thursday, October 08, 2009 3:13 PM
  • Yes, the x64 version of the CRT libraries are different DLLs.

    Hans Passant.
    Thursday, October 08, 2009 4:13 PM
    Moderator