Maystyle :
Admin : New post
Guestbook
Local
media
Catergories
Recent Articles
Recent Comments
Recent Trackbacks
Calendar
Tag
Archive
Link
Search
 
  .net 환경에서 VJSharpCodeProvider 호출과 함께 Crash 가 발생한다. 
작성일시 : 2010. 8. 31. 10:59 | 분류 : Technical Note (2008)/Development

JAVA나 J#을 이용해서 개발하지 않은 경우에도 VJSharpCodeProvider 가 호출이 되며 문제가 발생 할 수 있습니다.
아래는 이와 비슷한 일을 겪은 엔지니어의 사례 입니다.

원문 : http://blogs.msdn.com/b/pfedev/archive/2007/11/13/assemblyresolve-event-and-vjsharpcodeprovider.aspx

It works at first and then later breaks...Reviewing
"처음에는 잘 동작하지만 나중에는 문제가 발생합니다."

We know that the VJSharpCodeProvider is not on their system but the failure to load this file is normal so why does it start becoming a problem?
"우리는 그들의 시스템에 VJSharpCodeProvider 가 없는 것을 알고 있습니다. 그러나 이런 파일들을 로드하는 것은 정상입니다. 왜 이런 문제가 발생할까요?"

In conclusion, when the application is first launched their code has not executed yet therefore the ResolveEventHandler has not been hooked up to the AssemblyResolve event.  However later in the run of the application when a recompile occurs and we reprobe for the VJSharpCodeProvider the exception is thrown and the ASP.NET Compile code is not expecting and exception do this leads to other errors.
”결론적으로 어플리케이션이 최초로 실행 됐을 때에는 해당 코드는 실행되지도 않고 ResoloveEventHandler 역시 AssemblyResolve 이벤트를 처리 하지 않고 있었습니다. 하지만 이후에 어플리케이션이 실행 하면서 재 컴파일이 일어나게 되면 다시 코드에 대한 검증이 진행 되면서 VJSharpCodeProvider 예외가 발생 하게 되고, 또한 ASP.net 컴파일 코드가 실행 되지도 않고 예외가 발생하면서 다른 여러 예외들을 발생 시키게 됩니다.”

Once we fixed up the handler to return NULL the application worked.  It sailed through testing and I got to go to bed!!  I hope that this helps someone else out.
"우리가 NULL 을 리턴하는 핸들러를 고치자 마자 테스트는 순조롭게 끝났고, 나는 드디어 잘 수 있게 되었습니다."

|