2
.NET 3.5 라이브러리에 sgen 빌드 단계가 있습니다. VS2010에서는 .NET 3.5 응용 프로그램에서로드 할 수없는 .NET 4 MyLib.XmlSerializers.dll을 생성합니다. 누구든지 올바른 버전의 어셈블리를 얻으려면 빌드 단계를 변경하는 방법을 알고 있습니까? 일리노이 주에서 일회용 어셈블리 및 라이브러리를 단일 DLL로 병합 할 수 있습니까?Sgen에서 .net 3.5 serializers 어셈블리를 강제로 생성하는 방법
편집
<Target Name="AfterBuild" DependsOnTargets="AssignTargetPaths;Compile;ResolveKeySource" Inputs="$(MSBuildAllProjects);@(IntermediateAssembly)" Outputs="$(OutputPath)$(_SGenDllName)">
<!-- Delete the file because I can't figure out how to force the SGen task. -->
<Delete Files="$(TargetDir)$(TargetName).XmlSerializers.dll" ContinueOnError="true" />
<SGen BuildAssemblyName="$(TargetFileName)" BuildAssemblyPath="$(OutputPath)" References="@(ReferencePath)" ShouldGenerateSerializer="true" UseProxyTypes="false" KeyContainer="$(KeyContainerName)" KeyFile="$(KeyOriginatorFile)" DelaySign="$(DelaySign)" ToolPath="$(SGenToolPath)">
<Output TaskParameter="SerializationAssembly" ItemName="SerializationAssembly" />
</SGen>
</Target>
감사 :
이 내 sgen 빌드 단계 나는 같은 질문 here을 발견했다, 그러나 나는 누군가가 더 나은 솔루션을 가지고 있는지 확인하기 위해 잠시 기다릴 수 있습니다.
$ (SGen35ToolPath)와 같은 것이 있거나이 경로를 하드 코드해야합니까? – Marko
공구 경로는 어디에서 지정합니까? 'ToolPath = ... '는 나에게 아무 의미도 없다. –