Given: There are 2 solutions.
- MVC application
- A set of libraries with business logic
For debugging, I have to add the necessary projects to one solution. I just add the necessary projects with business logic from Solution 2 to my Solution 1 with my MVC application.
Problem: The problem is in the hint path and packages. The fact is that when you download Nuget Packages for a project, it puts them in the packages folder near the solution within which you did it.
When I add a project from solution 2 to solution 1, and then update / add some Nuget packages, they are downloaded to the packages folder for solution 1. While the project from solution 2 has a hint path of the type "/ packages. .. ". That is, he looks at his packages folder, 2nd, solyushna. Naturally you have to change the hint path so that they look at the packages folder not from 2 solution.
Why this is a problem: Because the check-in such hint path is impossible. And in the case when the csproj file has changed (for example, some files have been added), then you have to clean the csproj file. Write the correct hint path while leaving other changes, check-in-it, and then return the desired hint path.
Question: How to avoid these dances with the hint path and at the same time leave the opportunity to develop and build the project within the framework of different solutions?
Clarification: Each library with business logic lies in a nugget. And with the usual job decoding, I plug it in as a nugget. Without these dances with the addition of the project to the solyushnu. BUT. When a situation arises when I need to change this business logic and immediately update it within a specific application, then I have to take the source of this nuge and add it to the solution with my application. But my question is not about that at all.
My question is about the fact that this library with business logic, which I add to my solution for debug, has dependencies on other nuggets. And these nuggets need to be crossed in order to compile everything. But the problem is that the restaurant puts all the libraries in the package folder near the solution within which we do it.
A project with business logic, which I add to my solution, is physically stored elsewhere, and is part of another solution. And the hint path in csproj looks at the packages folder for its solution, and not for the one I add it to. Here is the problem.
I can not check these hint paths, which are changed to look at the packages folder of another solution. Because then the build will break on the build server.
Yes, I can keep an open solution which consists of a business logic to make a nuget-restaurant there. But I want to get rid of it and work within the same studio.