Partilhar via


ClickOnce:VS08 SP1 XML serialization assemblies not publishing

When using msbuild to publish the ClickOnce application which uses XML serialization assemblies we notice that they are not published.

 

Cause

It is known issue with Visual Studio 2008 SP1 and only with msbuild. If we publish normally using the IDE it works fine.

 

Resolution

Use the following Sgen task in the targets file.

<SGen

BuildAssemblyName="$(TargetFileName)"

BuildAssemblyPath="$(IntermediateOutputPath)"

References="@(ReferencePath)"

ShouldGenerateSerializer="$(SGenShouldGenerateSerializer)"

UseProxyTypes="$(SGenUseProxyTypes)"

KeyContainer="$(KeyContainerName)"

KeyFile="$(KeyOriginatorFile)"

DelaySign="$(DelaySign)"

ToolPath="$(SGenToolPath)"

SerializationAssembly="$(IntermediateOutputPath)$(_SGenDllName)"

>

Contributor: Aditya Hari
Reviewer : Ravi Shankar