문제

작업 응용 프로그램을 몇 번 변경 했으며이 코드 라인에서 다음 오류를 얻기 시작했습니다.

Dim Deserializer As New Serialization.XmlSerializer(GetType(Groups))

그리고 여기 오류가 있습니다.

    BindingFailure was detected
    Message: The assembly with display name 'FUSE.XmlSerializers' failed to load in the 'LoadFrom' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'FUSE.XmlSerializers, Version=8.11.16.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'FUSE.XmlSerializers, Version=8.11.16.1, Culture=neutral, PublicKeyToken=null'

    Message: The assembly with display name 'FUSE.XmlSerializers' failed to load in the 'LoadFrom' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'FUSE.XmlSerializers, Version=8.11.16.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'FUSE.XmlSerializers, Version=8.11.16.1, Culture=neutral, PublicKeyToken=null'

=== Pre-bind state information ===
LOG: User = DOUG-VM\Doug
LOG: DisplayName = FUSE.XmlSerializers, Version=8.11.16.1, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL
 (Fully-specified)
LOG: Appbase = file:///E:/Laptop/Core Data/Data/Programming/Windows/DotNet/Work Projects/NOP/Official Apps/FUSE WPF/Fuse/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: E:\Laptop\Core Data\Data\Programming\Windows\DotNet\Work Projects\NOP\Official Apps\FUSE WPF\Fuse\bin\Debug\FUSE.vshost.exe.config
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\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:///E:/Laptop/Core Data/Data/Programming/Windows/DotNet/Work Projects/NOP/Official Apps/FUSE WPF/Fuse/bin/Debug/FUSE.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///E:/Laptop/Core Data/Data/Programming/Windows/DotNet/Work Projects/NOP/Official Apps/FUSE WPF/Fuse/bin/Debug/FUSE.XmlSerializers/FUSE.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///E:/Laptop/Core Data/Data/Programming/Windows/DotNet/Work Projects/NOP/Official Apps/FUSE WPF/Fuse/bin/Debug/FUSE.XmlSerializers.EXE.
LOG: Attempting download of new URL file:///E:/Laptop/Core Data/Data/Programming/Windows/DotNet/Work Projects/NOP/Official Apps/FUSE WPF/Fuse/bin/Debug/FUSE.XmlSerializers/FUSE.XmlSerializers.EXE.

무슨 일이야?

도움이 되었습니까?

해결책

이것이 일어나고있는 주된 이유는 내가 직렬화하고 실질화하려는 유형에 불일치가 있었기 때문입니다. 나는 관측형 회합 수집 (그룹)을 직렬화하고 비즈니스 대상 - 그룹의 수집 (그룹)을 물려받은 그룹을 사로화하고있었습니다.

그리고 이것은 또한 문제의 일부였습니다 ... http://social.msdn.microsoft.com/forums/en-us/asmxandxml/thread/9f0c169f-c45e-4898-b2c4-f72c816d4b55/

이 예외는 XMLSerializer의 정상 작동의 일부입니다. 프레임 워크 코드 내부에서 예상되며 잡히고 처리됩니다. 그냥 무시하고 계속하십시오. 디버깅 중에 귀찮게하는 경우 Visual Studio Debugger를 모든 예외 대신 처리되지 않은 예외 만 중지하도록 설정하십시오.

다른 팁

내가 찾은 정보에 따르면, XMLSerializers와 관련된 BindingFailure 예외는 때때로 오류를 나타내지 않으며 무시되어야하지만, 모든 예외를 보여주기 위해 VS 옵션을 설정할 때 Debug 모드에서 IE를 볼 수 있습니다.

원천:https://connect.microsoft.com/visualstudio/feedback/viewfeedback.aspx?feedbackid=88566&wa=wsignin1.0

BTW. 이것은 첫 번째 답변에 언급 된 것 중 하나입니다 :).

어셈블리 fuse.xmlserializers를 찾을 수없는 것 같습니다. 결과를 확인하십시오 어셈블리 바인딩 로그 뷰어 (fuslogvw.exe)가 어디에서 보이는지 확인하려면 (위에 제시된 목록이 꽤 가득 찬 것 같습니다).

이 어셈블리가 컴퓨터에 저장되어있는 위치를 찾아서 실행하십시오. ngen 어떤 이유로 든로드하지 않는지 확인하기 위해. 이 DLL 파일이 귀하에게 나타나는지 확인하십시오 빈 디버그 예배 규칙서. Visual Studio는 종속성의 종속성을 얻지 못하므로 때로는 필요한 모든 파일을 갖추어야합니다.

포함 된 어셈블리를 어떻게로드 했습니까? Groups 유형? 나는 당신이 그것을로드했다고 생각합니다 Assembly.LoadFrom() XML 시리얼 라이저는 동일한 컨텍스트 ( 'loadfrom'컨텍스트)를 사용하여 직렬화를 위해 어셈블리로드를 시도하기 때문입니다. 그렇다면 몇 가지 옵션이 있습니다.

  1. 사용 Assembly.Load() 대신에 Assembly.LoadFrom().
  2. 핸들러를 첨부하십시오 AppDomain.AssemblyResolve CLR이 문제의 어셈블리를 찾도록 도와줍니다.

내가 이것이 성가신 곳에있는 몇 가지 비주얼 스튜디오 프로젝트의 경우, 나는 BindingFailure 그리고 System.io.filenotFoundException.

Visual Studio에서 : CTL+, CTL+이자형 예외 대화 상자 :

1) 바인딩 파일을 선택 해제하십시오 관리 디버깅 어시스턴트

2) system.io.filenotfoundException을 선택 취소하십시오 공통 언어 런타임 예외.

아아 더 나은 것 :-)

... 그리고 나는 1/2을 본다.이 답변은 Strager 11 월 24 일 10시 10 분 12 일

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top