© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
2 replies
cumslvt13

dotnet publish solution excluding projects with tests

Is it possible to publish solution and exclude projects with tests?

I have the following project structure and docker image doesn't actually need those
*.Tests
*.Tests
projects to be published:

└───src
    ├───DemoApp.Publisher
    ├───DemoApp.Publisher.Tests
    ├───DemoApp.Shared
    ├───DemoApp.Worker
    └───DemoApp.Worker.Tests
└───src
    ├───DemoApp.Publisher
    ├───DemoApp.Publisher.Tests
    ├───DemoApp.Shared
    ├───DemoApp.Worker
    └───DemoApp.Worker.Tests


Also, is it a good idea to build single docker image instead of two separate ones?
DemoApp.Publisher
DemoApp.Publisher
and
DemoApp.Worker
DemoApp.Worker
are meant to be standalone apps.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ How to publish multiple projects under one solution?
C#CC# / help
4y ago
❔ dotnet publish docker fails
C#CC# / help
3y ago
(SOLVED) dotnet publish complains about missing Emscripten
C#CC# / help
16mo ago