2010-12-08 24 views
7

मैं एक परियोजना है कि 1 exe और 2 संसाधन dll का होता है से बाहर एक भी विधानसभा आवेदन बनाने के लिए ILMerge उपयोग कर रहा हूँ:ILMerge + स्थानीय संसाधन विधानसभाओं

  • \ बिन \ डीबग \ test.exe
  • \ बिन \ डीबग \ nl-BE \ test.resources.dll
  • \ बिन \ डीबग \ fr-एफआर \ test.resources.dll

यह 1 प्रपत्र (Form1.cs) के साथ एक साधारण परीक्षण परियोजना है, तो कुछ खास नहीं है। मेरा लक्ष्य एक कार्य संसाधन संसाधन प्रबंधक के साथ एक एकल असेंबली ऐप बनाना है (मैंने इसे पढ़ने के तरीके के बारे में जानकारी के लिए ILMerge and localized resource assemblies और Single-assembly multi-language Windows Forms deployment (ILMerge and satellite assemblies/localization) - possible? पढ़ा है)।

परियोजना संकलन के बाद, मैं निम्नलिखित कमांड लाइन पैरामीटर के साथ ILMerge चलाएँ:

ilmerge /log:test.txt /target:winexe /copyattrs /allowdup /out:test_merged.exe 
"C:\projectdir\bin\Debug\test.exe" "C:\projectdir\bin\Debug\fr-FR\test.resources.dll" 
"C:\projectdir\bin\Debug\nl-BE\test.resources.dll" 

अगर मैं परावर्तक के साथ विलय कर विधानसभा की सामग्री की जाँच, मैं संसाधन पेड़ नोड के अंतर्गत निम्न देखें:

  • test.Form1.fr-FR.resources
  • test.Form1.fr-FR.resources
  • test.Form1.resources
  • test.Properties.Resources.resources
इसके बजाय fr-एफआर और nl-BE संसाधनों की

मैं 2 बार fr-एफआर संसाधन हैं। क्या ऐसा इसलिए है क्योंकि संसाधन डीएल के समान नाम हैं? नतीजा यह है कि मैं रनटाइम पर केवल फ्रैंक-एफआर संसाधन प्राप्त कर सकता हूं।

कोई विचार?

अद्यतन (लॉग फ़ाइल की सामग्री): :

ILMerge version 2.10.526.0 
Copyright (C) Microsoft Corporation 2004-2006. All rights reserved. 
ILMerge /log:loc_test.txt /target:winexe /copyattrs /allowdup /out:loc_test_merged.exe c:\Users\<user>\Documents\Visual Studio 2008\Projects\loc_test\loc_test\bin\Debug\loc_test.exe C:\Users\<user>\Documents\Visual Studio 2008\Projects\loc_test\loc_test\bin\Debug\fr-FR\loc_test.resources.dll C:\Users\<user>\Documents\Visual Studio 2008\Projects\loc_test\loc_test\bin\Debug\nl-BE\loc_test.resources.dll 
Set platform to 'v2', using directory 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\..\v2.0.50727' for mscorlib.dll 
Running on Microsoft (R) .NET Framework v2.0.50727 
mscorlib.dll version = 2.0.0.0 
The list of input assemblies is: 
    c:\Users\<user>\Documents\Visual Studio 2008\Projects\loc_test\loc_test\bin\Debug\loc_test.exe 
    C:\Users\<user>\Documents\Visual Studio 2008\Projects\loc_test\loc_test\bin\Debug\fr-FR\loc_test.resources.dll 
    C:\Users\<user>\Documents\Visual Studio 2008\Projects\loc_test\loc_test\bin\Debug\nl-BE\loc_test.resources.dll 
Trying to read assembly from the file 'c:\Users\<user>\Documents\Visual Studio 2008\Projects\loc_test\loc_test\bin\Debug\loc_test.exe'. 
    Successfully read in assembly. 
    There were no errors reported in loc_test's metadata. 
Trying to read assembly from the file 'C:\Users\<user>\Documents\Visual Studio 2008\Projects\loc_test\loc_test\bin\Debug\fr-FR\loc_test.resources.dll'. 
Can not find PDB file. Debug info will not be available for assembly 'C:\Users\<user>\Documents\Visual Studio 2008\Projects\loc_test\loc_test\bin\Debug\fr-FR\loc_test.resources.dll'. 
    Successfully read in assembly. 
    There were no errors reported in loc_test.resources's metadata. 
Trying to read assembly from the file 'C:\Users\<user>\Documents\Visual Studio 2008\Projects\loc_test\loc_test\bin\Debug\nl-BE\loc_test.resources.dll'. 
Can not find PDB file. Debug info will not be available for assembly 'C:\Users\<user>\Documents\Visual Studio 2008\Projects\loc_test\loc_test\bin\Debug\nl-BE\loc_test.resources.dll'. 
    Successfully read in assembly. 
    There were no errors reported in loc_test.resources's metadata. 
Checking to see that all of the input assemblies have a compatible PeKind. 
    loc_test.PeKind = ILonly 
    loc_test.resources.PeKind = ILonly 
    loc_test.resources.PeKind = ILonly 
All input assemblies have a compatible PeKind value. 
Merging assembly 'loc_test' into target assembly. 
Merging assembly 'loc_test.resources' into target assembly. 
Merging assembly 'loc_test.resources' into target assembly. 
Merging assembly-level attributes from assembly 'loc_test' into target assembly. 
Copying 2 Win32 Resources from assembly 'loc_test' into target assembly. 
Transferring entry point 'loc_test.Program.Main' from assembly 'loc_test' to assembly 'loc_test_merged'. 
    There were no errors reported in the target assembly's metadata. 
ILMerge: Writing target assembly 'loc_test_merged.exe'. 
AssemblyResolver: Assembly 'System' is referencing assembly 'System.Configuration'. 
    AssemblyResolver: Attempting referencing assembly's directory. 
Can not find PDB file. Debug info will not be available for assembly 'System.Configuration'. 
Resolved assembly reference 'System.Configuration' to 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Configuration.dll'. (Used referencing Module's directory.) 
Location for referenced assembly 'System.Windows.Forms' is 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll' 
    There were no errors reported in System.Windows.Forms's metadata. 
Location for referenced assembly 'System' is 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll' 
    There were no errors reported in System's metadata. 
Location for referenced assembly 'mscorlib' is 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll' 
    There were no errors reported in mscorlib's metadata. 
Location for referenced assembly 'System.Drawing' is 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll' 
    There were no errors reported in System.Drawing's metadata. 
ILMerge: Done. 

(नोट बाइनरी "loc_" लगी होती हैं, मैं उन्हें स्पष्टता के लिए अपने पिछले पोस्टिंग में बाहर छोड़ दिया) अद्यतन: परियोजना कोड के साथ एक ज़िप फ़ाइल http://www.filedropper.com/loctest

अद्यतन पर विश्वास करें: मानो या नहीं, लेकिन अगर मैं 2 चरणों में आईएलएमर्ज करता हूं, तो यह काम करता है!

ilmerge /log:loc_test.txt /target:winexe /copyattrs /allowdup /out:loc_test_merged.exe "c:\Users\<user>\Documents\Visual Studio 2008\Projects\loc_test\loc_test\bin\Debug\loc_test.exe" "C:\Users\<user>\Documents\Visual Studio 2008\Projects\loc_test\loc_test\bin\Debug\fr-FR\loc_test.resources.dll" 

ilmerge /log:loc_test.txt /target:winexe /copyattrs /allowdup /out:loc_test_merged_2.exe loc_test_merged.exe "C:\Users\<user>\Documents\Visual Studio 2008\Projects\loc_test\loc_test\bin\Debug\nl-BE\loc_test.resources.dll" 

इसका कारण क्या हो सकता है?

Thx, Janiek

+0

लगता है कि आपने उम्मीद http://stackoverflow.com/questions का हल में उल्लिखित के माध्यम से कूदने के लिए होगा की तरह/1 9262638/एकल-असेंबली-बहु भाषा-विनफॉर्म-परिनियोजन-इल्मेज-एंड-उपग्रह-असेंबल –

+0

मैंने उस प्रश्न को पढ़ा। यह ComponentResourceManager क्लास के बारे में विस्तार से बताता है, जो केवल पहले ही आईएलएमर्ज द्वारा आवश्यक संसाधनों को सही तरीके से एम्बेड किए जाने पर ही अपना काम अच्छी तरह से कर सकता है। –

+0

कृपया लॉग फ़ाइल test.txt –

उत्तर

4

क्यों ILMerge 2 चरणों में सही ढंग से विधानसभाओं को एकीकृत जब मैं कारण पर विवरण पता नहीं है, इस पल में एकमात्र समाधान हो रहा है। यह देखने के लिए कि मैंने यह कैसे किया है, प्रश्न में मेरा अंतिम संपादन देखें।

मैं अभी भी हालांकि कारण है कि यह 1 कदम में ऐसा करने में विफल रहता है उत्सुक हूँ ...

संबंधित मुद्दे