I have an ASP.NET Core app that will be using some class library projects e.g. domain, repositories, etc.
These class libraries will also be used in another cloud app that runs as a worker role which is why I want to keep them separate and their development should follow its own course and not necessarily depend on the ASP.NET Core app.
With that said, the ASP.NET Core project should be aware of any changes made to the class library projects which is why I want to link them to the solution for the ASP.NET project.
What's the best way to structure these project folders? Currently my folder structure is as follows:
My Projects Folder
--- MyAspNetCoreProject (Has its own solution)
--- MyBackendProject (Has its own solution which contains the following projects)
----- DomainProject
----- RepositoriesProject
When I try to "Add Existing Project" to link my backend projects to my ASP.NET Core project, I get the following message:
The project that you are attempting to add to source control may cause other source control users to have difficulty opening this solution or getting newer versions of it. To avoid this problem, add the project from a location below the binding root of the other source controlled projects in the solution.
You'll need to move the referenced project under the same solution. If you do want separate solutions you can't link as a project -- before .NET Core you could link the assembly(s) instead.
One problem of trying to link projects under other solutions is that other users may not have a copy of all the necessary solutions and may be installed in different locations from other users. The solution needs to keep track of where the assemblies are built.
If you build the library as a NuGet package then linking the reference is easy.
Your options become