You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a repository (I cannot share unfortunately) where we modelled some additional dependencies between projects that cannot be replaced by project references.
Essentially, we have a custom type of "project references".
These references are evaluated by custom MSBuild targets to make information about the referenced project available in the build of the current project (e.g. the output path).
We don't use project references since we do not want to one project to influence the assembly and package dependencies of the other project.
Everything works as expected when building the project using dotnet build.
However, there are occasional build errors when building in Visual Studio.
These are caused by differences between how Visual Studio and MSBuild handle dependencies and Visual Studio seems to only read the ProjectReference items from the project.
To workaround, the dependencies currently must be modelled inside the solution file (via the ProjectDependencies project section) in addition to the project files which is error-prone.
Is there a way to tell Visual Studio about these additional dependencies ? Maybe some special item group that needs to be populated?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a repository (I cannot share unfortunately) where we modelled some additional dependencies between projects that cannot be replaced by project references.
Essentially, we have a custom type of "project references".
These references are evaluated by custom MSBuild targets to make information about the referenced project available in the build of the current project (e.g. the output path).
We don't use project references since we do not want to one project to influence the assembly and package dependencies of the other project.
Everything works as expected when building the project using
dotnet build
.However, there are occasional build errors when building in Visual Studio.
These are caused by differences between how Visual Studio and MSBuild handle dependencies and Visual Studio seems to only read the
ProjectReference
items from the project.To workaround, the dependencies currently must be modelled inside the solution file (via the
ProjectDependencies
project section) in addition to the project files which is error-prone.Is there a way to tell Visual Studio about these additional dependencies ? Maybe some special item group that needs to be populated?
Any help with this would be highly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions