2008-09-25 76 views

回答

9

It turns out that Dev Studio only honors this setting for Web Services.

对于非web服务你可以得到这个通过添加AfterBuild目标项目文件的工作:

<Target Name="AfterBuild" DependsOnTargets="AssignTargetPaths;Compile;ResolveKeySource" Inputs="$(MSBuildAllProjects);@(IntermediateAssembly)" Outputs="$(OutputPath)$(_SGenDllName)">   
     <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> 

参见:

+1

对此帮助+1,亚当!作为后续问题,是否将SGen任务添加到被认为是最佳或最差实践的项目?我希望它能加快我的应用程序的性能。 – flipdoubt 2008-10-15 15:31:43

相关问题