COM InProc E2E tests cannot load the string resources
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
Per @AmelBawa-msft , we already do this copying a file to the dotnet directory for it to be found for the .winmd: https://github.com/microsoft/winget-cli/blob/5390e1c7873bf9455261be189083498bcb2e8dc1/azure-pipelines.yml#L238-L244