W
W
wlastas2021-04-03 10:41:24
C++ / C#
wlastas, 2021-04-03 10:41:24

How to properly organize two Solutions with a common project in order to...?

The essence of the problem is probably in the curved architecture:
there are two Solutions, in each of which the same common project is connected, conditionally called Core.
Server_Solution = (conditionally Server(c#)+Core(c#) ) is debugged and run on the server.
Client_Solution = (conditionally Client(c++)+Core(c#) ) is debugged on the server, launched on remote clients - conditionally an AI game bot running on GPU VPS/VPS
All projects of both Solutions are collected in one folder on the server: conditionally \\server\c$\bin
Each client is tracked by file version changes in Client+Core, and automatically restarts when updates are accepted (approved) in debug mode from VisualStudio 2019.
The server is started in debug mode from VS on \\server
When glitches are found in the work of any client on the server, changes are made to the "Client", and sometimes in the "Core" (new features are conditionally added, old ones are changed), the Client_Solution project is rebuilt. The Test Client sees the changes and restarts. The rest work on the old version.

Problem:
I can't rebuild Client_Solution without shutting down a running Server_Solution, since it contains the same Core project that is already running from \\server\c$\bin as Server_Solution.
But I need the server to continue running the old version so that I can interactively observe the difference in behavior between the old and new clients. Also, it is not advisable to restart the server, since it contains a conditional "state of the world".
Question;
how to properly organize the placement of files \ structure Solutions \ debugging process in my case.
Perhaps you need to make two independent "Cores" that will somehow be synchronized, but this is a terrible additional hemorrhoids, since the Core is actually a mix of 10+ assemblies that are also updated.

PS do not offer version control options, since
I have a separate application that downloads modified .cs / .cpp from the server and rebuilds Client_Solution from them on clients - it’s convenient for me and everything suits me.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
W
wlastas, 2021-04-03
@wlastas

The correct solution turned out to be the one proposed by
Evgeny Shatunov Curator of the C++ tag


Your build configuration is wrong. Your Intermediate and Output Path must be strictly relative to $(SolutionDir). No absolute paths. No paths relative to the project. No paths hanging in the air. Everything should be strictly from the root of the solution.
In this case, one project opened in two solutions will have a different working environment. Only in this way the project will not interfere with itself in different solutions.

V
Vasily Bannikov, 2021-04-03
@vabka

In your case, I would keep all three projects in one sln.
If you really want two solutions, I would copy Core

B
BasiC2k, 2021-04-03
@BasiC2k

Running production from Debug/bin is not a good idea. Production should be published and rotated on the server. And the version from Debug/bin should only be run by the VS IDE.
It is clear that you are already used to something, but it is better to get used to generally accepted patterns.
In your situation it is worth:
1. Start publishing the working version (production, release) on the server;
2. Implement logging in the database to understand what is happening;
3. Think about how to work with the debug (Debug) version of the code. And then how to release it without problems.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question