Msbuild 在创建安装程序之前对程序集进行代码签名
我尝试更新构建过程,以便对所有程序集和安装程序进行代码签名: 1建造所有的项目 2签署他们的产出 3个构建安装程序msi,带有VS2010安装项目 4个标志安装程序 我遇到的问题是,在步骤3中,安装程序项目将主要输出从obj文件夹中取出。但在步骤2中,我获取MSBuild任务的输出,它们位于bin文件夹中。因此,我的msi中有一个未签名的主输出 MSBuild调用:Msbuild 在创建安装程序之前对程序集进行代码签名,msbuild,Msbuild,我尝试更新构建过程,以便对所有程序集和安装程序进行代码签名: 1建造所有的项目 2签署他们的产出 3个构建安装程序msi,带有VS2010安装项目 4个标志安装程序 我遇到的问题是,在步骤3中,安装程序项目将主要输出从obj文件夹中取出。但在步骤2中,我获取MSBuild任务的输出,它们位于bin文件夹中。因此,我的msi中有一个未签名的主输出 MSBuild调用: <MSBuild Projects="%(SolutionFiles.FullPath)" ContinueOnError
<MSBuild Projects="%(SolutionFiles.FullPath)" ContinueOnError ="false" Properties="Configuration=$(BuildConfiguration)" Targets="Build">
<Output TaskParameter="TargetOutputs" ItemName="AssembliesBuildByChildProjects"/>
</MSBuild>
签名使用cmd文件:
<Exec
Command=""$(SignPath)signcode.cmd" "%(AssembliesBuildByChildProjects.Fullpath)" /t"
WorkingDirectory="$(SignPath)" />
谢谢我找到了解决这个问题的办法,不太好,但可能是最糟糕的:- 我只需对obj文件夹中的所有输出文件进行签名:
<ItemGroup>
<PrimaryOut
Include="@(AssembliesBuildByChildProjects->'..\**\obj\**\%(FileName).%(Extension)')" />
</ItemGroup>
<Exec
Command=""$(SignPath)signcode.cmd" "%(PrimaryOut.Fullpath)" /t"
WorkingDirectory="$(SignPath)" />
<Exec
Command=""$(SignPath)signcode.cmd" "%(AssembliesBuildByChildProjects.Fullpath)" /t"
WorkingDirectory="$(SignPath)" />