I have a sgen build step in my .NET 3.5 library. In VS2010, this creates the .NET 4 MyLib.XmlSerializers.dll, which cannot be downloaded from .NET 3.5 applications. Does anyone know how to change the build step to get the correct build version? Is it possible for IL to combine assembly serializers and libraries into a single dll?
This is my sgen build step:
<Target Name="AfterBuild" DependsOnTargets="AssignTargetPaths;Compile;ResolveKeySource" Inputs="$(MSBuildAllProjects);@(IntermediateAssembly)" Outputs="$(OutputPath)$(_SGenDllName)"> <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>
thanks
EDIT: I found the same question here , but I'll wait a while to find out if anyone has a better solution.
c # visual-studio-2010 sgen
Marko
source share