I have a solution named: MyProject.sln and project related to docker called - docker-compose.dcproj.
I want to create dotnet new template which will contain support for docker-compose through project docker-compose.dcproj.
I tried this command:
dotnet sln MyProject.sln add docker-compose.dcproj
I got this error message:
Project 'C:\MyProject\docker-compose.dcproj' has an unknown project type and cannot be added to the solution file. Contact your SDK provider for support.
I am using .net core sdk version 3.1.100.
How to add docker-compose.dcproj into solution via command above?

I was able to get it to working at least two ways.
1. Visual Studio
I created a .net framework project. Right clicked on Project. Add > Docker Support. I moved
to a .NET Core project folder.
Select Added new project and picked up this dcproj file. With a few edits to the compose file. I was able to get it to working.
2. When you don't have visual studio.
I see the mentioned error too. Not able to add the project through cli
I modified the sln file text as below.
$ type docker-compose.dcproj
Add below two lines above
Globalin the solution file.Please do not mess up the file format. Be very careful. Save a copy of solution file before you attempt any of this. Good luck.