Skip to content

Auto-generate ImportConfig.xml and order solutions by csproj reference order#63

Open
zekelinAlex wants to merge 3 commits into
TALXIS:masterfrom
zekelinAlex:users/alexander.zekelin/pdpackage-importconfig-autogen
Open

Auto-generate ImportConfig.xml and order solutions by csproj reference order#63
zekelinAlex wants to merge 3 commits into
TALXIS:masterfrom
zekelinAlex:users/alexander.zekelin/pdpackage-importconfig-autogen

Conversation

@zekelinAlex

@zekelinAlex zekelinAlex commented May 27, 2026

Copy link
Copy Markdown
Contributor

#59
#58
ImportConfig.xml is no longer required. If the file is missing, the build generates a skeleton at $(IntermediateOutputPath)<FolderName>/ImportConfig.xml before MSBuild starts validating it, and rewires @(PdImportConfig) to point at the generated copy. The folder name is picked up from GetImportPackageDataFolderName on any ImportExtension-derived class in the project's top-level .cs files, defaulting to PkgAssets.

The solutions list is also derived from the .csproj. When AutoGeneratePdImportConfig is on and the source ImportConfig.xml has no <configsolutionfile> entries, the <solutions> block is built from <PackageReference> items (for pp-solution NuGets) and <ProjectReference> items, in the order they appear in the project file
If you ship a hand-written ImportConfig.xml with explicit <configsolutionfile> entries, nothing changes — your file is used as-is and auto-generation is skipped entirely.

@zekelinAlex zekelinAlex force-pushed the users/alexander.zekelin/pdpackage-importconfig-autogen branch from 1d93612 to a5ddae1 Compare June 16, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant