如何使用MSBuild重命名程序集的输出?

时间:2011-10-20 16:46:06

标签: msbuild

我正在使用MSBuild来构建我的项目,该项目引用了其他项目。我需要为主项目强制输出文件名为“test.exe”(在本例中)。但是,当我设置AssemblyName属性时,它也会更改依赖项目的输出。如何仅为主项目文件输出更改AssemblyName?我需要将“OriginalFilename”和“InternalName”元数据设置为新文件名(test.exe)。

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
         ToolsVersion="4.0">
    <Target Name="Build">
        <MSBuild Projects="Project1\Project1.csproj" Targets="Rebuild" 
                  Properties="AssemblyName=Test.exe; Configuration=Release; 
                  Platform=AnyCPU;" />
    </Target>
</Project>

0 个答案:

没有答案