Adding a ProjectReference to a project that is not in the same solution

You can’t do this. A project reference includes an identifying GUID for the referenced project, which is maintained in the solution file in order to track solution build options and dependencies. If you try to reference a project that is not in the solution, Visual Studio will complain.

You can add a file reference to the assembly produced by a project that’s not in the solution, of course.

UPDATE: Since this got downvoted, I’ll refine my answer.

Though it’s technically possible to craft a project file that references another project outside the same solution, Visual Studio won’t help you to do it easily. One very good reason why it’s a bad idea to do this (that I’ve observed) is that whatever Solution Configuration and Platform you’re building (the referencing project) will be ignored if MSBuild decides to build the referenced project – the default Configuration and Platform specified in that referenced project file will be used instead. Thus you may end up with a mixture of binary types in different folders.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)