Election-Tech-Initiative / Election-Tech-Initiative/electionguard-cpp

🐞 Unit Tests Won't Run in Visual Studio

未关闭
#248 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
C++
星标
26
派生
25
PR 合并指标
30 天内没有已合并 PR

描述

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

1. Compile the C++ with `make test-msvc`
2. Run the unit tests in Visual Studio (under the debug configuration)

Expected: Unit tests should pass
Actual: `System.DllNotFoundException : Unable to load DLL 'electionguard': The specified module could not be found. (Exception from HRESULT: 0x8007007E)`

### Expected Behavior

The problem is that `make test-msvc` generates `electionguard.dll` in the release configuration and `ElectionGuard.Encryption.Tests.csproj` is looking for it in the folder based on its active configuration. In other words `ElectionGuard.Encryption.Tests.csproj` conflates it's own configuration setting with that of the C++ electionguard library.

### Steps To Reproduce

_No response_

### Environment

```markdown
- OS: Windows
```

### Anything else?

_No response_

贡献指南

打开贡献指南

调研方向

首先运行 make test-msvc,并检查 ElectionGuard.Encryption.Tests.csproj 以及生成的 electionguard.dll 所在位置。跟踪 Visual Studio 调试配置如何解析本机库,然后验证单元测试是否能够在不出现 System.DllNotFoundException 的情况下成功运行。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp, csharp
领域
build-system, testing
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
52/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。