Skip to content

Commit

Permalink
fix: add GitVersion NuGet reference
Browse files Browse the repository at this point in the history
  • Loading branch information
BinToss committed Jun 16, 2023
1 parent 187035a commit 153870b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/DRP.vcxproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="packages\GitVersion.MsBuild.5.8.1\build\GitVersion.MsBuild.props" Condition="Exists('packages\GitVersion.MsBuild.5.8.1\build\GitVersion.MsBuild.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
Expand Down Expand Up @@ -75,6 +76,9 @@
<GenerateWindowsMetadata>true</GenerateWindowsMetadata>
<LargeAddressAware>true</LargeAddressAware>
</Link>
<ResourceCompile>
<AdditionalOptions>/DGV_FULLSEMVER="%GitVersion_FullSemVer%" %(AdditionalOptions)</AdditionalOptions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="resource.h" />
Expand All @@ -83,10 +87,21 @@
<ItemGroup>
<ClCompile Include="main.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="DRP.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="packages\GitVersion.MsBuild.5.8.1\build\GitVersion.MsBuild.targets" Condition="Exists('packages\GitVersion.MsBuild.5.8.1\build\GitVersion.MsBuild.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\GitVersion.MsBuild.5.8.1\build\GitVersion.MsBuild.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\GitVersion.MsBuild.5.8.1\build\GitVersion.MsBuild.props'))" />
<Error Condition="!Exists('packages\GitVersion.MsBuild.5.8.1\build\GitVersion.MsBuild.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\GitVersion.MsBuild.5.8.1\build\GitVersion.MsBuild.targets'))" />
</Target>
</Project>
5 changes: 4 additions & 1 deletion src/DRP.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
Expand Down Expand Up @@ -27,6 +27,9 @@
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="DRP.rc">
<Filter>Resource Files</Filter>
Expand Down
4 changes: 4 additions & 0 deletions src/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="GitVersion.MsBuild" version="5.8.1" targetFramework="native" developmentDependency="true" />
</packages>

0 comments on commit 153870b

Please sign in to comment.