Reputation: 95
I have a .Net Core web application that has two .Net Core class project dependencies in the same solution.
The scaffold structure of the project solution is as follows.
MyProject.sln
I want to publish this solution in my web hosting but the publish option only appears on the WebUI does not appear on the solution.
How can I solve this ?
Upvotes: 1
Views: 571
Reputation: 62088
If the UI project has a dependency (i.e. a reference) to the other two projects, then when you build the UI project (which will happen at publish time, if you don't do it separately beforehand), the other two projects will be compiled into DLL files and the resulting DLLs will be added to the build of the UI project automatically. This is how all .NET programs work.
So yes it's logical that you can only publish the UI project - the other two, being simple class libraries, would be no use on their own anyway, so it makes no sense to be able to publish them separately. You can only publish something which can actually be executed.
Upvotes: 2