S
S
Sergey K2018-05-06 01:22:39
C++ / C#
Sergey K, 2018-05-06 01:22:39

What does adding a ProjectReference to a csproj file do?

Hello, I found out here that in the form of a reference you can add not a DLL, but a whole project. This is done with the dotnet add reference command , or you can add it manually.
Actually the question is, how to use it correctly? The studio generally swears and writes that "The referenced component 'interfaces\Interfaces.csproj' could not be found.", but the error is not fatal, and in general reference can be referenced without problems and no errors occur. But only if you go in and build a separately connected project. But is it possible to make the studio build from the connected project on its own, when building the main project?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
denismaster, 2018-05-06
@AceLightning

ProjectReference is a reference to another project. Previously, we added it through Visual Studio.
When building a project, msbuild builds a graph based on project references and builds them all automatically.
Most likely, you have the wrong path to the project.
Of course, it is also desirable to have a link to this plug-in project in the sln-file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question