Visual Studio 2010에서 작성중인 ODP (Oracle.DataAccess.dll)를 참조하는 .NET 3.5 어셈블리가 있습니다. 로컬 복사 = False, 특정 버전은 false입니다. 경로는ODP Oracle.DataAccess.DLL 참조 32/64 비트
C:\[ORACLE_BASE]\product\11.2.0\client_1\ODP.NET\bin\2.x\Oracle.DataAccess.dll
입니다. 버전은 2.112.3.0, (런타임 v.2.0.50727)입니다. 개발 컴퓨터에 ODAC 11.2.0.3.0 x86이 설치되어 있습니다. 이 프로젝트를 빌드하고 통합 테스트에서 테스트하면 모든 것이 잘 작동하고 ODP가로드되고 사용됩니다. Team City 7, Windows Server 2003 x64 시스템에서 Team City를 통해 MSBuild를 사용하여 동일한 통합 테스트를 수행하려고합니다. 이 컴퓨터에는 동일한 버전의 ODAC가 설치되어 있지만 x64 버전이 설치되어 있습니다.
Oracle.DataAccess.dll을로드하는 중에 문제가 발생했습니다. .NET 2 버전을 찾고 있지만 .NET 4 버전을 먼저 찾은 다음 필연적으로 실패합니다. 로그를 보면 .NET 4 버전을 찾았지만 여전히 해당 참조를 확인할 수없고 명시 적으로 x86 버전을 찾고있는 것처럼 보입니다. MSBuild의 구성은 다음과 같습니다. MSBUILD 버전 : .NET 4.0 플랫폼 x86 실행.
CSProject 참조 :
<Reference Include="Oracle.DataAccess, Version=2.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=x86" />
(나는 86에 실행 플랫폼을 변경 시도하고 Oracle.DataAccess.DLL 라이브러리를 받아들이는 것처럼 보이지만 다른 모든 핵심 .NET 라이브러리가 잘못을 목표로하고 불평 . 플랫폼, 예를 들어 mscorlib에
나는 비슷한 문제를 프로젝트 솔루션을 구축하고 얻을 수 msbuild를 사용하는 레이크 스크립트를 통해 빌드를 할 노력하고있어질문 : x64 컴퓨터에서 제대로 빌드하려면 어떻게해야합니까? 라이브러리의 x86 및 x64 버전은 동일한 PublicKeyToken을 가지고 있으므로 작동하지 않아야합니까? CSProj의 Reference 태그를 수동으로 파일을 편집하여 명시 적으로 x64 대신 "모든 CPU"를 대상으로 설정할 수 있습니까? 또는, here (정확한지는 모르겠지만 해결책 일 수 있음)과 같이 빌드 머신의 아키텍처에 따라 조건부로 라이브러리를 참조 할 수있는 방법을 설정하는 방법이 있습니까?
[14:30:09]PrepareForBuild:
[14:30:09] Creating directory "bin\Debug\".
[14:30:09]ResolveAssemblyReferences:
[14:30:09] Unified primary reference "Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=x86".
[14:30:09] Using this version instead of original version "2.112.3.0" in "D:\TeamCity\buildAgent\work\f2ad3a714cc001ba\Source\MyProj\MyProj.Data.Oracle\bin\Debug\MyProj.Data.Oracle.dll" because AutoUnify is 'true'.
[14:30:09]C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=x86". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\TeamCity\buildAgent\work\f2ad3a714cc001ba\Source\MyProj\MyProj.IntegrationTests\MyProj.IntegrationTests.csproj]
[14:30:09] For SearchPath "D:\TeamCity\buildAgent\work\f2ad3a714cc001ba\Source\MyProj\MyProj.Data.Oracle\bin\Debug".
[14:30:09] Considered "D:\TeamCity\buildAgent\work\f2ad3a714cc001ba\Source\MyProj\MyProj.Data.Oracle\bin\Debug\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "D:\TeamCity\buildAgent\work\f2ad3a714cc001ba\Source\MyProj\MyProj.Data.Oracle\bin\Debug\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] For SearchPath "{TargetFrameworkDirectory}".
[14:30:09] Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] For SearchPath "{Registry:Software\Microsoft\.NETFramework,v4.0,AssemblyFoldersEx}".
[14:30:09] Considered "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Itanium\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Itanium\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\VSTA\v9.0\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\VSTA\v9.0\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\PublicAssemblies\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\PublicAssemblies\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] Considered "D:\ODAC_Base\product\11.2.0\client_1\ODP.NET\bin\2.x\Oracle.DataAccess.dll", but its name "Oracle.DataAccess, Version=2.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342" didn't match.
[14:30:09] Considered "D:\ODAC_Base\product\11.2.0\client_1\ODP.NET\bin\2.x\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Microsoft Chart Controls\Assemblies\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Microsoft Chart Controls\Assemblies\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] Considered "D:\ODAC_Base\product\11.2.0\client_1\ASP.NET\bin\2.x\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "D:\ODAC_Base\product\11.2.0\client_1\ASP.NET\bin\2.x\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] For SearchPath "{AssemblyFolders}".
[14:30:09] Considered "C:\Program Files (x86)\Microsoft SQL Server\100\SDK\Assemblies\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Microsoft SQL Server\100\SDK\Assemblies\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Microsoft.NET\ADOMD.NET\100\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Microsoft.NET\ADOMD.NET\100\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Microsoft SQL Server\100\SDK\Assemblies\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Microsoft SQL Server\100\SDK\Assemblies\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Tasks\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Tasks\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Microsoft SQL Server\100\DTS\PipelineComponents\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Microsoft SQL Server\100\DTS\PipelineComponents\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] Considered "c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Microsoft SQL Server\100\DTS\ForEachEnumerators\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "C:\Program Files (x86)\Microsoft SQL Server\100\DTS\ForEachEnumerators\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09] For SearchPath "{GAC}".
[14:30:09] Considered "Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=x86", which was not found in the GAC.
[14:30:09] For SearchPath "bin\Debug\".
[14:30:09] Considered "bin\Debug\Oracle.DataAccess.dll", but it didn't exist.
[14:30:09] Considered "bin\Debug\Oracle.DataAccess.exe", but it didn't exist.
[14:30:09]GenerateTargetFrameworkMonikerAttribute:
내 빌드 머신에서 AMD64 버전 2.112.3.0 및 4.112.3.0 만 있습니다. x64는 거기에 나열되지 않습니다. app.config가 아닌 machine.config를 의미합니까, 아니면 컴퓨터의 구성에서 수행해야합니까? 내 CSPRoj를 특정 버전을 찾지 않도록 설정 했으므로 machine.config가 변경되지 않아야합니까? –
MSBuild (rake 스크립트가 아님)를 사용하는 teamcity bulids의 경우 MSBuild에 대해 .NET 3.5로 설정하면 다른 어셈블리가 빌드되지 않아 LINQ를 찾을 수 없음을 나타냅니다. 이것은 LINQ가 .NET 3.5에 있기 때문에 혼란 스럽습니다. –
ODAC 32bit와 64bit를 설치했을 것 같습니다. 또한, 내 첫 번째 주석에서, 나는 두 번째 문장에서 "x86이 거기에 나열되어 있지 않다"고 말하고자했습니다. 지금 편집 할 수 없습니다. –