[Silverlight] 'ServiceReferences.ClientConfig'을(를) 열 수 없습니다.

2010. 4. 15. 20:49WEB/Silverlight

아래와 같은 에러 발생 시 원인.

Message: System.InvalidOperationException: .xap 응용 프로그램 패키지에서 'ServiceReferences.ClientConfig'를 찾을 수 없습니다…

  1. App.xaml.cs에 선언된 App Class에 부적절한 Property를 선언해 사용하고 있을 때 이와 같은 에러 발생.
    예를 들어 아래의 'ezbizCbsAdmin' 처럼 App.xaml.cs에 WebService를 담는 Property를 멤버로 선언했을 경우가 있다. 
    public partial class App : Application
    {
        private EzBizCBSAdmin.EzBizWebServiceSoapClient ezbizCbsAdmin = new EzBizCBS.RIA.EzBizCBSAdmin.EzBizWebServiceSoapClient();;
        public App()
        {
            this.Startup += this.Application_Startup;
            this.Exit += this.Application_Exit;
            this.UnhandledException += this.Application_UnhandledException;
        }
        ...
    }
            
    App.xaml.cs에 위와 같이 WebService 변수를 선언과 동시에 생성하지 말자.