Ignoring import conditions #7171
-
Hey! I'm currently reworking a dependency management tool, and I'm trying to leverage MSBuild in order to prevent hardcoding conventional file names ( The current strategy is to preprocess a project using the I'm looking for a flag (or something of the likes) which causes MSBuild to ignore import conditions (thus generating the largest possible project). Is this currently possible? Would you consider accepting a pull request, if not? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I don't think this could work because imports can be mutually incompatible. For instance some project type might have <Import Condition="'$(ProjectSetting)' == 'true'" Project="WithSetting.targets" />
<Import Condition="'$(ProjectSetting)' != 'true'" Project="WithDefaultSettings.targets" /> And importing both could leave you in a highly undefined state. Also,
I would recommend using the MSBuild API (with MSBuildLocator) instead; that will help with things like item |
Beta Was this translation helpful? Give feedback.
I don't think this could work because imports can be mutually incompatible. For instance some project type might have
And importing both could leave you in a highly undefined state.
Also,
I would recommend using the MSBuild API (with MSBuildLocator) instead; that will help with things like item
Update
operations that you might be missing with preprocessing.