microsoft / microsoft/winget-cli
COM InProc E2E tests cannot load the string resources
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
In the COM InProc E2E tests, if the COM call hits a path that needs to resolve a string resource, the call will fail with "File Not Found" when looking for the resources file, which later causes the tests to fail.
Steps to reproduce
- Add a use of the ResourceLoader in a path used by the COM commands, for example a
Resource::LocString{ someStringId }in any common code path. - Build the project.
- Copy the WindowsPackageManager.dll to the E2E tests build output folder (needed to run the InProc tests)
- Run the tests
Expected behavior
The tests should pass
Actual behavior
The tests fail due to the COM call not finding the Resources.pri. Using ProcMon one can see that it is looking for it under C:\Program Files\dotnet\Resources.pri, which likely means it's trying to find it next to the executable running.
A hacky solution is to copy the file there (and it did work for me), but we should find a better way before we hit this.
Environment
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the COM InProc E2E tests and the COM command paths that use ResourceLoader. Reproduce the failure after copying WindowsPackageManager.dll to the E2E test output folder, then use ProcMon to confirm where Resources.pri is searched for. Done means the tests can resolve string resources without copying Resources.pri to C:\Program Files\dotnet.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100