<Target Name="BeforeBuild">
<Version VersionFile="../version.txt" BuildType="Automatic" RevisionType="Increment">
<Output TaskParameter="Major" PropertyName="Major" />
<Output TaskParameter="Minor" PropertyName="Minor" />
<Output TaskParameter="Build" PropertyName="Build" />
<Output TaskParameter="Revision" PropertyName="Revision" />
</Version>
<FileUpdate Files="Properties\AssemblyInfo.cs" Regex="AssemblyVersion\("(\d+)\.(\d+)\.(\d+)\.(\d+)"\)" ReplacementText="AssemblyVersion("$(Major).$(Minor).0.0")" />
<FileUpdate Files="Properties\AssemblyInfo.cs" Regex="AssemblyFileVersion\("(\d+)\.(\d+)\.(\d+)\.(\d+)"\)" ReplacementText="AssemblyFileVersion("$(Major).$(Minor).$(Build).$(Revision)")" />
</Target>