Skip to content

Commit a7af99c

Browse files
committed
Use official KeePass for ReleaseDll
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.
1 parent a947e8e commit a7af99c

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ jobs:
1212
with:
1313
submodules: true
1414

15-
- run: nuget restore
15+
- name: Install prerequisites
16+
run: |
17+
choco install keepass.install
18+
nuget restore
1619
1720
- name: Setup MSBuild.exe
1821
uses: microsoft/[email protected]

KeeAgent/KeeAgent.csproj

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@
254254
<None Include="Resources\help-3.png" />
255255
</ItemGroup>
256256
<ItemGroup Condition=" '$(OS)' != 'Unix' ">
257-
<PackageReference Include="KeePass">
257+
<PackageReference Include="KeePass" ExcludeAssets="Compile" GeneratePathProperty="true">
258258
<Version>2.53.0.21099</Version>
259259
<ExcludeFromPlgx />
260260
</PackageReference>
@@ -269,6 +269,18 @@
269269
<ExcludeFromPlgx />
270270
</PackageReference>
271271
</ItemGroup>
272+
<ItemGroup Condition=" '$(OS)' != 'Unix' and '$(Configuration)' == 'ReleaseDll' ">
273+
<Reference Include="KeePass">
274+
<HintPath>$(ProgramW6432)\KeePass Password Safe 2\KeePass.exe</HintPath>
275+
<ExcludeFromPlgx />
276+
</Reference>
277+
</ItemGroup>
278+
<ItemGroup Condition=" '$(OS)' != 'Unix' and '$(Configuration)' != 'ReleaseDll' ">
279+
<Reference Include="KeePass">
280+
<HintPath>$(PkgKeePass)\lib\net462\KeePass.exe</HintPath>
281+
<ExcludeFromPlgx />
282+
</Reference>
283+
</ItemGroup>
272284
<ItemGroup Condition=" '$(OS)' == 'Unix' ">
273285
<Reference Include="KeePass">
274286
<HintPath>/usr/lib/keepass2/KeePass.exe</HintPath>

0 commit comments

Comments
 (0)