SORU
25 Ocak 2012, ÇARŞAMBA


Sorun Giderme Badımageformatexception

Bir Windows servisi yazdım C# Visual Studio 2010 kullanarak ve tam hedef .NET Çerçeve 4. Bir hata Ayıklama çalıştırdığınızda beklendiği gibi hizmet çalışır oluşturun. Ben çalıştırmak, ancak bir yayınlamasını bir Sistem kurmak.Badımageformatexception (detaylar aşağıda). Çözüm için internette aradım ama buldum şimdiye kadar her şey bana bir çözüm bulun yardım etmedi.

Bu sorun, Windows 7 64-bit var (dev) ve Windows SP3 32-bit (hedef) sistemleri XP.

Ben şimdiye kadar denedim:

  • Doğrulanmış Platformu Hedef gibi ayarları aynı (x 86) oluşturmak.
  • Derleme ikili sağlamak için /ayrıntılı seçeneği ile kullanılan peverify geçerliydi.
  • Kullanan herhangi bir yükleme sorunları için fuslogvw.
  • Kullanılan dosyalar eksik veya assembiles aramak için CheckAsm.

Tüm bu kontrolleri bir şey değişmedi. Aşağıda özel durum bilgilerini tam metin, isimler, şirket efendilerim sırlarını korumak için değişti bazı ekledim.

System.BadImageFormatException was unhandled
  Message=Could not load file or assembly 'XxxDevices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
  Source=XxxDevicesService
  FileName=XxxDevices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
  FusionLog=Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable  c:\Dev\TeamE\bin\Release\XxxDevicesService.vshost.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = XXX
LOG: DisplayName = XxxDevices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
 (Fully-specified)
LOG: Appbase = file:///c:/Dev/TeamE/bin/Release/
LOG: Initial PrivatePath = NULL
Calling assembly : XxxDevicesService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: c:\TeamE\bin\Release\XxxDevicesService.vshost.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///c:/TeamE/bin/Release/XxxDevices.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

  StackTrace:
       at XxxDevicesService.Program.Main(String[] args)
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

CEVAP
25 Ocak 2012, ÇARŞAMBA


Doğrulanmış Platformu Hedef gibi ayarları aynı (x 86) oluşturmak.

Kaza günlük demiyor:

Montaj yöneticisi yüklü: C:\Windows\Microsoft.NET\Framework64

Not64adı, çerçeve 64-bit sürümünü evi. Sizin Hedef platform ayarıEXEproje, sınıf kitaplığı proje değil. XxxDevicesService EXE proje süreci bit belirler.

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • FullMag

    FullMag

    15 ŞUBAT 2007
  • LiveForGodsKingdom

    LiveForGodsK

    6 NİSAN 2008
  • Video-Tutorials.Net

    Video-Tutori

    15 Mart 2011