Skip to content

MSIX FindPackageFile*() API#6200

Open
DrusTheAxe wants to merge 47 commits intomainfrom
user/drustheaxe/FindPackageFile
Open

MSIX FindPackageFile*() API#6200
DrusTheAxe wants to merge 47 commits intomainfrom
user/drustheaxe/FindPackageFile

Conversation

@DrusTheAxe
Copy link
Copy Markdown
Member

Implementation of MSIX FindPackageFile*() API Spec#5885

https://task.ms/59424502

NOTE: SearchStatic/DynamicDependencies options are dropped from spec because Windows doesn't expose this information. Get[Current]PackageInfo*() accepts an input to optionally filter package graph entries but output doesn't indicate if a package was statically or dynamically added to the package graph.

@DrusTheAxe DrusTheAxe self-assigned this Feb 9, 2026
@DrusTheAxe DrusTheAxe added the area-PackageManagement MSIX deployment technology (eg PackageDeploymentManager) label Feb 9, 2026
Comment thread test/Package/API/PackageTests_Package_CPP.cpp Outdated
Comment thread test/Package/API/PackageTests_Package_WinRT.cpp Outdated
Comment thread build/NuSpecs/AppxManifest.xml
Comment thread dev/Common/AppModel.Package.h Outdated
Comment thread dev/Common/AppModel.Package.h Outdated
{
return options | maskPackageTypes;
}
return options;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The IDL says

        /// @note If SearchInstallPath, SearchMutablePath, SearchMachineExternalPath and SearchUserExternalPath
        ///        are omitted then all locations are searched (i.e. specify all or none yields the same result).

But this path doesn't add all those options if none of them is specified (i.e. when only SearchPackages is specified, but none of SearchPath is specified).

Comment thread dev/Package/package_runtime.cpp
Comment thread dev/Package/Package.idl Outdated
Comment thread dev/Common/AppModel.Package.h Outdated
Comment thread dev/Package/package_runtime.cpp Outdated
Comment thread dev/Package/package_runtime.cpp Outdated
Comment thread dev/Common/AppModel.Package.h Outdated
Comment thread dev/Package/package_runtime.cpp
@letao-msft
Copy link
Copy Markdown
Contributor

path = package.GetInstallPath()

This pseudocode doesn't match the implementation.
package_runtime.cpp line 205 checks if SearchInstallPath is in options before getting install path, but here it's unconditional.


Refers to: specs/package/Package.md:150 in 50e998b. [](commit_id = 50e998b, deletion_comment = False)

Comment thread dev/Package/Package.idl
Comment thread dev/Package/Package.idl
@letao-msft
Copy link
Copy Markdown
Contributor

var options = GetPackageFilePathOptions.SearchInstallPath |

The IDL only defines GetFilePathOptions.
GetPackageFilePathOptions is an internal C++ impl type.

Same applies throughout.


Refers to: specs/package/Package.md:281 in 50e998b. [](commit_id = 50e998b, deletion_comment = False)

@letao-msft
Copy link
Copy Markdown
Contributor

if (absoluteFilename == null)

The API returns empty string - does that really map to null in C#?
Consider using string.IsNullOrEmpty(absoluteFileName).


Refers to: specs/package/Package.md:285 in 50e998b. [](commit_id = 50e998b, deletion_comment = False)

Comment thread specs/package/Package.md Outdated
@letao-msft
Copy link
Copy Markdown
Contributor

    wprintf(L"ERROR: Microsoft.UI.Xaml.winmd not found\n", hr);

There is no % specifier that matches this argument.


Refers to: specs/package/Package.md:356 in 50e998b. [](commit_id = 50e998b, deletion_comment = False)

@letao-msft
Copy link
Copy Markdown
Contributor

    wprintf(L"ERROR: resources.pri not found for %ls\n", hr, packageFullName);

There is no % specifier that matches this argument


Refers to: specs/package/Package.md:262 in 50e998b. [](commit_id = 50e998b, deletion_comment = False)

@letao-msft
Copy link
Copy Markdown
Contributor

    wprintf(L"ERROR: resources.pri not found for %ls\n", hr, packageFullName);

There is no % specifier that matches this argument


Refers to: specs/package/Package.md:312 in 50e998b. [](commit_id = 50e998b, deletion_comment = False)

@letao-msft
Copy link
Copy Markdown
Contributor

    wprintf(L"ERROR: Microsoft.UI.Xaml.winmd not found\n", hr);

There is no % specifier that matches this argument


Refers to: specs/package/Package.md:412 in 50e998b. [](commit_id = 50e998b, deletion_comment = False)

@letao-msft
Copy link
Copy Markdown
Contributor

std::wstring GetResourcesPri(PCWSTR packageFullName)

This parameter is never used


Refers to: specs/package/Package.md:205 in 50e998b. [](commit_id = 50e998b, deletion_comment = False)

Comment thread specs/package/Package.md Outdated
@DrusTheAxe
Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-PackageManagement MSIX deployment technology (eg PackageDeploymentManager) needs-triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants