Skip to content

Attempt to fix #646 #652

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 19 additions & 18 deletions src/GitVersionTask/NugetAssets/GitVersionTask.targets
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,8 @@

<Target Name="UpdateAssemblyInfo"
BeforeTargets="CoreCompile">
<WriteVersionInfoToBuildLog
SolutionDirectory="$(SolutionDir)"
/>
<UpdateAssemblyInfo
SolutionDirectory="$(SolutionDir)"
ProjectFile="$(MSBuildProjectFullPath)"
IntermediateOutputPath="$(IntermediateOutputPath)"
RootNamespace="$(RootNamespace)"
CompileFiles ="@(Compile)">
<Output
TaskParameter="AssemblyInfoTempFilePath"
PropertyName="AssemblyInfoTempFilePath" />
</UpdateAssemblyInfo>

<ItemGroup>
<Compile Include="$(AssemblyInfoTempFilePath)" />
</ItemGroup>


<!-- Call GetVersion first as it accepts the NoFetch parameter, future calls will use the cached value -->
<GetVersion SolutionDirectory="$(SolutionDir)" NoFetch="$(GitVersion_NoFetchEnabled)">
<Output TaskParameter="Major" PropertyName="GitVersion_Major" />
<Output TaskParameter="Minor" PropertyName="GitVersion_Minor" />
Expand All @@ -59,6 +42,24 @@
<Output TaskParameter="CommitDate" PropertyName="GitVersion_CommitDate" />
</GetVersion>


<WriteVersionInfoToBuildLog
SolutionDirectory="$(SolutionDir)"
/>
<UpdateAssemblyInfo
SolutionDirectory="$(SolutionDir)"
ProjectFile="$(MSBuildProjectFullPath)"
IntermediateOutputPath="$(IntermediateOutputPath)"
RootNamespace="$(RootNamespace)"
CompileFiles ="@(Compile)">
<Output
TaskParameter="AssemblyInfoTempFilePath"
PropertyName="AssemblyInfoTempFilePath" />
</UpdateAssemblyInfo>

<ItemGroup>
<Compile Include="$(AssemblyInfoTempFilePath)" />
</ItemGroup>
</Target>

<!--Support for ncrunch-->
Expand Down