microsoft / microsoft/winget-cli

IndexCreationTool.exe - Tryng to find not existing data in WorkingDirectory

Open
#4,181 9 comments 0 reactions 1 assignee View on GitHub

@yao-msft is already working on this.

Since Feb 21, 2024.

Issue-Bug
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Brief description of your issue

I'm trying to create a source.msix file with the IndexCreationTool.exe. Unfortunately I'm getting into an issue resulting in following message: e.g "Could not find a part of the path 'C:\Temp\PrivateStore\WorkDir\7\7zip\7zip\22.00\7zip.7zip.installer.yaml'."

When I copy data into the WorkDir it get's automatically removed once I start the IndexCreationTool. Therefore it makes no sense to me why the data is being looked for in the WorkDir or why the data was not previously copied there.

Steps to reproduce
  1. Build IndexCreationTool.exe

  2. Check out "https://github.com/microsoft/winget-pkgs" and copy manifests you'd like to use (including structure) to C:/Temp/PrivateStore/winget-poc/manifests. e.g 7zip

  3. Create a source.json file
    `{
    "WorkingDirectory": "C:/Temp/PrivateStore/WorkDir",

"AppxManifest": "C:/Temp/PrivateStore/AppxManifest.xml",

"LocalManifests": [
"C:/Temp/PrivateStore/winget-poc/manifests"
],

"Signature": {
"CertFile": "Cert.pfx",
"Password": "*****",
"Publisher": "CN:ThousandSunny"
}
}`

  1. Download https://winget.azureedge.net/cache/source.msix and extract the AppxManifest.xml to C:/Temp/PrivateStore/AppxManifest.xml (no example was provided, I had to start somewhere)

  2. Execute the IndexCreationTool
    C:\Temp\PrivateStore\IndexCreationTool>IndexCreationTool.exe -f C:\Temp\PrivateStore\IndexCreationTool\source.json

  3. Receive the error:
    Could not find a part of the path 'C:\Temp\PrivateStore\WorkDir\7\7zip\7zip\22.00\7zip.7zip.installer.yaml'.

Expected behavior

Manifest files are not being taken from WorkDir but from "LocalManifests" directory or they are copied to WorkDir on time

Actual behavior

Data in WorkDir is removed on application startup. No data is found within the WorkDir causing error below:

Could not find a part of the path 'C:\Temp\PrivateStore\WorkDir\7\7zip\7zip\22.00\7zip.7zip.installer.yaml'.

Environment
Windows 10
VS Professional 2022 17.8.7

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.