2008-09-25 36 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

相關問題