MSBuild: How to read Assembly Version and FIle Version from AssmeblyInfo.cs?
问题 Using MSBuild script how can we get AssmeblyVersion and FileVersion from AssemblyInfo.cs? 回答1: Using MSBuild script how can we get AssmeblyVersion and FileVersion from AssemblyInfo.cs? To get the AssmeblyVersion via MSBuild, you can use GetAssemblyIdentity Task. To accomplish this, unload your project. Then at the very end of the project, just before the end-tag </Project> , place below scripts: <Target Name="GetAssmeblyVersion" AfterTargets="Build"> <GetAssemblyIdentity AssemblyFiles="$