문제 설명
MSBuild에서 내 x86 프로그램을 빌드할 수 없습니다. (MSBuild cannot build my x86 program)
A라는 프로그램이 있습니다. A.exe라는 파일을 생성합니다. A.exe는 x86 프로그램으로 실행되어야 하므로 하나로 빌드됩니다. A.exe는 B.dll과 C.dll을 의미합니다.
B.dll과 C.dll은 A.exe에서 사용할 수 있도록 x86 프로그램으로 빌드하도록 설정되어 있습니다.
I msbuild.exe를 사용하여 이 건물을 처음 접했기 때문에 여전히 배우고 있습니다. msbuild 작업을 사용하여 응용 프로그램(A)의 프로젝트(.csproj) 파일을 빌드하는 빌드 파일을 만들었습니다. Visual Studio 내에서 모든 것을 쉽게 빌드할 수 있습니다.
msbuild(명령줄)에서 빌드할 때 다음 오류가 발생합니다. "잘못된 형식의 B.exe가 있는 어셈블리를 로드하려고 했습니다.
피><Target Name="Compile">
<Message Text="Compiling"/>
<ItemGroup>
<myproject Include="A.csproj"/>
</ItemGroup>
<MSBuild Projects="@(myproject)" Properties="Configuration=Release;Platform=x86"/>
</Target>
## 참조 솔루션 #### 방법 1:
There is no need to build the dlls as x86. They should be build for any platform. When they are loaded by a .exe built for x86 the JIT compiler will compile them for the target chosen for the .exe (i.e. x86 if the .exe is built for x86).
Can't help you with msbuild though :‑)
(by Brian Hvarregaard、Jakob Christensen)