도메인 객체의 어셈블리가 있습니다. 그것은 company.xpo.domain이라고 불 렸습니다 (계약자가 처음 프로젝트 이름을지었습니다. 우리는 소프트웨어를 소유하고 있습니다). 네임 스페이스의 전역 이름을 xpo.domain으로 변경했으며 디자이너의 기본 네임 스페이스를 xpo.domain으로 변경했습니다.파일 또는 어셈블리를로드 할 수 없습니다.
나는 또한 "회사"를위한 전체 솔루션에서 Visual Studio에서 찾았으며 아무 것도 발견하지 못했습니다.
사용자 이름과 암호를 취하는 정적 메서드 "로그인"을 가진 사용자 개체가 어셈블리의, 이름/암호에 대한 DB를 확인하고 경우는 null를 돌려줍니다 :
내 문제는 다음과 같이 간다 아무것도 발견되지 않았다.
그 정적 인 메서드에서는 company.xpo.domain 어셈블리에 대해 FileNotFoundException을 throw합니다. 이것은 예외를 던지고있는 코드가 찾고있는 어셈블리에 있기 때문에 (어셈블리의 이전 이름을 찾고 있기 때문에) 혼란 스럽다.
편집 다음은 스택 추적입니다. 방금 보안 목적으로 소프트웨어 이름과 어셈블리 이름을 변경했습니다. 도움이된다면
System.IO.FileNotFoundException occurred
Message="Could not load file or assembly 'company.XPO.domain' or one of its dependencies. The system cannot find the file specified."
Source="mscorlib"
FileName="company.XPO.domain"
FusionLog="=== Pre-bind state information ===
LOG: User = STOONP001\\Administrator
LOG: DisplayName = company.XPO.domain\n (Partial)
LOG: Appbase = file:///C:/Documents and Settings/Administrator/Desktop/softwareName/softwareName/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : DevExpress.Data.v9.2, Version=9.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\\Documents and Settings\\Administrator\\Desktop\\softwareName\\softwareName\\bin\\Debug\\softwareName.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:///C:/Documents and Settings/Administrator/Desktop/softwareName/softwareName/bin/Debug/company.XPO.domain.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/Administrator/Desktop/softwareName/softwareName/bin/Debug/company.XPO.domain/company.XPO.domain.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/Administrator/Desktop/softwareName/softwareName/bin/Debug/company.XPO.domain.EXE.
LOG: Attempting download of new URL file:///C:/Documents and Settings/Administrator/Desktop/softwareName/softwareName/bin/Debug/company.XPO.domain/company.XPO.domain.EXE."
StackTrace:
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
InnerException
편집 2
호출 스택은 여기에있다. devexpress.data.utils가 오류를 던지고있는 것으로 보입니다. 그러나 실제로 해당 어셈블리에 문제가있는 경우 해당 클래스를 제어 할 수 없습니다.
mscorlib.dll!System.Reflection.Assembly.nLoad(System.Reflection.AssemblyName fileName, string codeBase, System.Security.Policy.Evidence assemblySecurity, System.Reflection.Assembly locationHint, ref System.Threading.StackCrawlMark stackMark, bool throwOnFileNotFound, bool forIntrospection) + 0x2c bytes
mscorlib.dll!System.Reflection.Assembly.LoadWithPartialNameInternal(string partialName, System.Security.Policy.Evidence securityEvidence = null, ref System.Threading.StackCrawlMark stackMark = LookForMyCaller) + 0x6b bytes
mscorlib.dll!System.Reflection.Assembly.LoadWithPartialName(string partialName) + 0x1b bytes
DevExpress.Data.v9.2.dll!DevExpress.Data.Utils.Helpers.LoadWithPartialName(string partialName = "company.XPO.domain") + 0x1f bytes
DevExpress.Data.v9.2.dll!DevExpress.Xpo.Helpers.XPTypeActivator.GetType(string assemblyName = "company.XPO.domain", string typeName = "company.XPO.domain.customer") + 0xd0 bytes
DevExpress.Xpo.v9.2.dll!DevExpress.Xpo.Metadata.ReflectionDictionary.ResolveClassInfoByName(string assemblyName = "company.XPO.domain", string typeName = "company.XPO.domain.customer") + 0x50 bytes
DevExpress.Xpo.v9.2.dll!DevExpress.Xpo.Metadata.ReflectionDictionary.QueryClassInfo(string assemblyName = "company.XPO.domain", string className = "company.XPO.domain.customer") + 0xde bytes
DevExpress.Xpo.v9.2.dll!DevExpress.Xpo.XPObjectType.TypeClassInfo.get() + 0x55 bytes
DevExpress.Xpo.v9.2.dll!DevExpress.Xpo.XPObjectType.IsValidType.get() + 0x1f bytes
DevExpress.Xpo.v9.2.dll!DevExpress.Xpo.Helpers.XPObjectTypesManager.FillLoadedTypes(System.Collections.ICollection objectTypesList = Count = 23) + 0xfa bytes
DevExpress.Xpo.v9.2.dll!DevExpress.Xpo.Helpers.XPObjectTypesManager.GetAllTypes() + 0x278 bytes
DevExpress.Xpo.v9.2.dll!DevExpress.Xpo.Helpers.XPObjectTypesManager.EnsureIsTypedObjectValid() + 0x1e bytes
DevExpress.Xpo.v9.2.dll!DevExpress.Xpo.Helpers.ObjectCollectionLoader.InternalLoadData(DevExpress.Xpo.ObjectsQuery[] queries = {DevExpress.Xpo.ObjectsQuery[1]}) + 0x5a bytes
DevExpress.Xpo.v9.2.dll!DevExpress.Xpo.Helpers.ObjectCollectionLoader.LoadObjects(DevExpress.Xpo.ObjectsQuery[] queries = {DevExpress.Xpo.ObjectsQuery[1]}) + 0xda bytes
DevExpress.Xpo.v9.2.dll!DevExpress.Xpo.Session.GetObjects(DevExpress.Xpo.ObjectsQuery[] queries = {DevExpress.Xpo.ObjectsQuery[1]}) + 0x58 bytes
DevExpress.Xpo.v9.2.dll!DevExpress.Xpo.Session.GetObjects(DevExpress.Xpo.ObjectsQuery query = {DevExpress.Xpo.ObjectsQuery}) + 0x55 bytes
DevExpress.Xpo.v9.2.dll!DevExpress.Xpo.Session.GetObjects(DevExpress.Xpo.Metadata.XPClassInfo classInfo = {XPO.domain.sys_user}, DevExpress.Data.Filtering.CriteriaOperator criteria = {[Username] = 'username' And [Password1] = 'password'}, DevExpress.Xpo.SortingCollection sorting = null, int topSelectedRecords = 1, bool selectDeleted = false, bool force = false) + 0x9b bytes
DevExpress.Xpo.v9.2.dll!DevExpress.Xpo.Session.InternalFindAndLoad(DevExpress.Xpo.Metadata.XPClassInfo baseType = {XPO.domain.sys_user}, DevExpress.Data.Filtering.CriteriaOperator criteria = {[Username] = 'username' And [Password1] = 'password'}, bool selectDeleted = false) + 0x38 bytes
DevExpress.Xpo.v9.2.dll!DevExpress.Xpo.Session.FindObject(DevExpress.Xpo.Metadata.XPClassInfo classInfo = {XPO.domain.sys_user}, DevExpress.Data.Filtering.CriteriaOperator criteria = {[Username] = 'username' And [Password1] = 'password'}, bool selectDeleted = false) + 0x2d bytes
DevExpress.Xpo.v9.2.dll!DevExpress.Xpo.Session.FindObject(System.Type classType = {Name = "sys_user" FullName = "XPO.domain.sys_user"}, DevExpress.Data.Filtering.CriteriaOperator criteria = {[Username] = 'username' And [Password1] = 'password'}, bool selectDeleted = false) + 0x52 bytes
DevExpress.Xpo.v9.2.dll!DevExpress.Xpo.Session.FindObject<XPO.domain.sys_user>(DevExpress.Data.Filtering.CriteriaOperator criteria = {[Username] = 'username' And [Password1] = 'password'}) + 0x57 bytes
참고 : DevExpress를 사용하여 케이스를 작성했습니다. 나는 완전히 엉망이다.
해당 어셈블리가 동적으로로드 되었습니까? 그런 다음 코드에서 해당 위치를 검색하거나 중단 점을 넣거나 메시지를 추적하여 해당 동적으로로드 된 어셈블리의 이름을 바꾸 었는지 여부를 확인합니다. –
그것은 프로젝트 참조입니다 (DLL과 실행 어셈블리 모두 동일한 솔루션에 있음) –