Skip to content

Commit

Permalink
Force Common library to take Version parameter
Browse files Browse the repository at this point in the history
Allows for building from command line and receiving a consistent Version. Possibly important note: building directly from Visual Studio results in a 1.0.0.0 version.
  • Loading branch information
gbakeman committed Aug 11, 2024
1 parent bc0adc6 commit 58321e0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions WinNUT_V2/WinNUT-Client_Common/WinNUT-Client_Common.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,16 @@
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<Target Name="BeforeBuild">
<ItemGroup>
<AssemblyAttributes Include="AssemblyVersion">
<_Parameter1>$(Version)</_Parameter1>
</AssemblyAttributes>
</ItemGroup>
<MakeDir Directories="$(IntermediateOutputPath)" />
<WriteCodeFragment Language="VB" OutputFile="$(IntermediateOutputPath)Version.vb" AssemblyAttributes="@(AssemblyAttributes)" />
<ItemGroup>
<Compile Include="$(IntermediateOutputPath)Version.vb" />
</ItemGroup>
</Target>
</Project>

0 comments on commit 58321e0

Please sign in to comment.