Skip to content

Commit

Permalink
Use official KeePass for ReleaseDll
Browse files Browse the repository at this point in the history
The .dll build with ReleaseDll will fail to load in KeePass because the
NuGet KeePass is an unofficial debug build and is not strongly versioned
(lacks public key token). So we have to build against the official
signed KeePass version.
  • Loading branch information
dlech committed Dec 24, 2023
1 parent a947e8e commit a7af99c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ jobs:
with:
submodules: true

- run: nuget restore
- name: Install prerequisites
run: |
choco install keepass.install
nuget restore
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.1
Expand Down
14 changes: 13 additions & 1 deletion KeeAgent/KeeAgent.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
<None Include="Resources\help-3.png" />
</ItemGroup>
<ItemGroup Condition=" '$(OS)' != 'Unix' ">
<PackageReference Include="KeePass">
<PackageReference Include="KeePass" ExcludeAssets="Compile" GeneratePathProperty="true">
<Version>2.53.0.21099</Version>
<ExcludeFromPlgx />
</PackageReference>
Expand All @@ -269,6 +269,18 @@
<ExcludeFromPlgx />
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" '$(OS)' != 'Unix' and '$(Configuration)' == 'ReleaseDll' ">
<Reference Include="KeePass">
<HintPath>$(ProgramW6432)\KeePass Password Safe 2\KeePass.exe</HintPath>
<ExcludeFromPlgx />
</Reference>
</ItemGroup>
<ItemGroup Condition=" '$(OS)' != 'Unix' and '$(Configuration)' != 'ReleaseDll' ">
<Reference Include="KeePass">
<HintPath>$(PkgKeePass)\lib\net462\KeePass.exe</HintPath>
<ExcludeFromPlgx />
</Reference>
</ItemGroup>
<ItemGroup Condition=" '$(OS)' == 'Unix' ">
<Reference Include="KeePass">
<HintPath>/usr/lib/keepass2/KeePass.exe</HintPath>
Expand Down

0 comments on commit a7af99c

Please sign in to comment.