3
AssemblyInfo.cs에서 사용자 지정 특성을 설정하기위한 MSBuild 작업이 있습니까? AssemblyInfo 작업을 찾았지만 미리 정의 된 속성 만 설정할 수있는 것 같습니다. 이 파일에 추가 한 3 개의 사용자 지정 속성을 설정하고 싶습니다.MSBuild AssemblyInfo.cs에서 사용자 지정 특성을 설정하는 작업
제안 사항 해결 방법?
AssemblyInfo.cs에서 사용자 지정 특성을 설정하기위한 MSBuild 작업이 있습니까? AssemblyInfo 작업을 찾았지만 미리 정의 된 속성 만 설정할 수있는 것 같습니다. 이 파일에 추가 한 3 개의 사용자 지정 속성을 설정하고 싶습니다.MSBuild AssemblyInfo.cs에서 사용자 지정 특성을 설정하는 작업
제안 사항 해결 방법?
WriteCodeFragment
작업이 도움이 될 수 있습니다
<Target Name="BeforeBuild">
<ItemGroup>
<AssemblyAttributes Include="AssemblyTitle">
<_Parameter1>My Assembly</_Parameter1>
</AssemblyAttributes>
<AssemblyAttributes Include="AssemblyDescription">
<_Parameter1>My Assembly</_Parameter1>
</AssemblyAttributes>
<AssemblyAttributes Include="AssemblyCompany">
<_Parameter1>My Company</_Parameter1>
</AssemblyAttributes>
<AssemblyAttributes Include="AssemblyProduct">
<_Parameter1>My Product</_Parameter1>
</AssemblyAttributes>
<AssemblyAttributes Include="AssemblyCopyright">
<_Parameter1>Copyright © 2012</_Parameter1>
</AssemblyAttributes>
<AssemblyAttributes Include="AssemblyCulture">
<_Parameter1></_Parameter1>
</AssemblyAttributes>
<AssemblyAttributes Include="AssemblyVersion">
<_Parameter1>1.0.0.0</_Parameter1>
</AssemblyAttributes>
<AssemblyAttributes Include="AssemblyFileVersion">
<_Parameter1>1.0.0.0</_Parameter1>
</AssemblyAttributes>
<AssemblyAttributes Include="System.Runtime.InteropServices.Guid">
<_Parameter1>e7a979b2-0a4f-483a-ba60-124e7ef3a931</_Parameter1>
</AssemblyAttributes>
</ItemGroup>
<WriteCodeFragment Language="C#" OutputFile="Properties/AssemblyInfo.cs" AssemblyAttributes="@(AssemblyAttributes)" />
</Target>
감사합니다, 그 트릭 완료! :) – Vajda
.NET 4.0 이상에서만 지원됩니다. –