Can the "Add Project Reference Post Action" be used to reference an existing project? #7833
Replies: 1 comment
-
After reviewing the source it appears that the current version does not support this functionality, although it potentially could or should. This also applies to #7508. The reason behind this limitation is that the PostActionProcessor only finds project files to add references to if:
If the last two checks fail to find issues the PostActionProcessor gives up and throws I'm creating an issue and pull request to add a third option: If no project files are found after the last two checks, try to find a project file in the relative path as specified in the "targetFiles" without checking for a matching IFileChange (i.e. an existing .csproj) |
Beta Was this translation helpful? Give feedback.
-
I have a project template that creates several projects and inserts them into an existing solution. I'm trying to include these newly generated projects in another already existing project within the solution. However, specifying the relative path of the existing .csproj file doesn't seem to work if it wasn't generated as part of the initial template creation process. Is there a way to achieve this?
What works:
What doesn't work:
Unable to determine which project file to add the reference to. Post action failed.
My environment:
My current post action looks like this:
And my directory structure:
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions