What kind of visual studio is right for me?

I currently have a program that I wrote that is divided into 3 separate solutions.

  • Front end (all related to display)
  • Parsers (several (39) projects, each of which creates a dll to analyze specific data)
  • Globals (several (5) projects, each of which creates a DLL, which is used by projects in solving parsers and the front end).

Requirements -

  • Both Front end and Parsers require globals dll tables to exist at compile time and be used at runtime.
  • Parsers plugins are loaded at runtime using assembly.LoadReference.
  • Development: C:\projects\myProg
  • expanded location: C:\myProg

My problem is that I go back and forth with questions related to project dependencies, where to point to my global DLLs. Am I pointing to a detailed location or development location, and if so, release or debug?

So, I started looking for different types of solutions, and I wonder if I need to create a partitioned solution or several solutions for my specific situation.

+6
source share
4 answers

Add all projects in one solution.

Change any links between projects to "project links" rather than direct links to dll files. This will fix many dependency issues.

If you have any “library” files that do not change often, you can move them to a separate solution if necessary. The result of this should be a “pre-built” version of the dll, which you can reference from a standard location in your main solution (the best way to do this is to add a post-build step that copies the output to the library’s library development folder. Thus, the build process doesn’t changes, you just add an extra step to get the files where you need them, and you have complete control over the build process). This works well, but it’s a pain if you need to change these pre-created DLLs often, so it’s best to use it only for fairly static parts of your code base.

Finally, consider combining many of your projects into a single project / assembly. The killer during assembly is not the amount of code, the number of assemblies - on my PC, each project adds a fairly constant 3 seconds to the build time, so by combining small projects, I saved a lot of build time.

+3
source

Since these 3 are part of the same system, it will probably be easier to have a single solution with every Project added to it.

NOTE. You do not need to move anything from your current locations.

Just create a new blank solution and right-click "Add> Existing Project ..." for each project that you want to include, they will remain where they are on the disk, but will open together.

Existing ("old") solutions will be available as they are.

Also keep in mind that if you simultaneously edit the same project in two copies of VS, this will lead to an error when you reload the source code when making and saving changes.

Most importantly, projects in one solution will allow you to add links between them, not DLL files.

+2
source

why they are scattered on separate projects, combine parses and globals into a single assembly. keep the user interface node separate and as simple / small as possible.

0
source

Let's say you have a good reason for having so many projects (example: a different number of parsers are available for different product licenses).

Dependency management in visual studio is simplified:

  • Right click your solution node

  • Select "Order Build Project ..."

Make sure that each project does not need a project under it in this dialog box.

About "where to deploy": visual studio does this by default. If you are in debugging, it will be displayed in the folder for debugging your solution, as well as for release.

NTN.

0
source

Source: https://habr.com/ru/post/904330/


All Articles