This is one of those problems that is … well, 🤦♂️ face palming-ly easy 🤦♀️ when you see how it’s done. But I confess to spending ages trying to figure this out. And Google wasn’t much help, either.
OK, so the problem is this: You want to create a new
docker-compose.yaml file in your C# project in JetBrains Rider.
You have a project, it might look something like this:
I’ve just created a brand new, empty C# project using the Rider menu.
My first requirement was to add in a
docker-compose.yaml file so I could get my DB up and running.
However… how do I do this?
There’s no way to add a new file. Only a new project, or a new solution folder.
What about if I try and copy / paste an existing
docker-compose.yaml file into my project?
No dice there, either.
One of the options in the context menu above is to “open in” – so I opened the project in the file explorer.
From there I copy / pasted an existing
docker-compose.yaml file into the directory:
But still, it didn’t show.
That’s when I realised I was in the wrong view!
From the top menu, change from Solution view to File System view:
And now you can see your file(s):
Like I say, a bit of a face palm and probably blindingly obvious.
But not to me.
And judging by the unsolved Stack Overflow post on the same subject, not to at least a few others, either.