Specifying the .Net solution to open in a dev container in Rider?
I set up a dev container for my .Net API I'm working on. It works well enough, except whenever I open the dev container, I get "Looking for solutions..." and it loops through my entire container looking for the .Net solution file.
The solution is in the root of my workspace, and is specified in the devcontainer.json. After loading the container and letting it search for several minutes, it does finally find the solution and open it.
Is there a way to specify the solution in the devcontainer.json file so I don't have to wait for it to search each time? I saw online somewhere that the customizations > jetbrains > settings > SolutionFile should let me specifiy this, but it doesn't seem to be working.
Is this because I'm using the newer .slnx solution format instead of the older .sln? Or do I just have the setting wrong?
{
"customizations": {
"jetbrains": {
"backend": "Rider",
"plugins": [],
"settings": {
"Git4Idea:app:Git-Application-Settings.staging_area_enabled": true,
"com.intellij:app:BuiltInServerOptions.builtInServerPort": 52108,
"com.intellij:app:HttpConfigurable.use_proxy_pac": true,
"SolutionFile": "/workspace/MyProject.slnx",
"BackendType": "Local",
"EnableDotNetCoreCLR": true,
"RunConfigurationsEnabled": true,
"AutoOpenSolution": true
}
}
},
"containerEnv": {
"NUGET_PACKAGES": "/home/vscode/.nuget/packages",
"DOTNET_CLI_HOME": "/home/vscode",
"DOTNET_SKIP_FIRST_TIME_EXPERIENCE": "1",
"DOTNET_USE_POLLING_FILE_WATCHER": "false",
"CHOKIDAR_USEPOLLING": "false",
"WATCHMAN_DISABLE_RECRAWL": "true"
},
"dockerComposeFile": "docker-compose.yml",
"features": {
"ghcr.io/devcontainers/features/dotnet:2": {
"version": "9.0",
"installUsingApt": true
},
"ghcr.io/devcontainers/features/node:1": {
"version": "lts",
"nodeGypDependencies": true
},
"ghcr.io/devcontainers/features/git:1": {
"version": "latest"
}
},
"forwardPorts": [
5432,
7071,
5173,
15888
],
"mounts": [
"source=myproject-nuget-cache,target=/home/vscode/.nuget/packages,type=volume",
"source=myproject-dotnet-tools,target=/home/vscode/.dotnet/tools,type=volume",
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind",
"source=myproject-rider-config,target=/home/vscode/.config/JetBrains,type=volume",
"source=myproject-rider-plugins,target=/home/vscode/.local/share/JetBrains,type=volume"
],
"name": "MyProject Development",
"overrideCommand": false,
"portsAttributes": {
"5432": {
"label": "PostgreSQL",
"onAutoForward": "notify"
},
"7071": {
"label": "API",
"onAutoForward": "openBrowser"
},
"5173": {
"label": "Web Client",
"onAutoForward": "openBrowser"
},
"15888": {
"label": "Aspire Dashboard",
"onAutoForward": "openBrowser"
}
},
"postCreateCommand": "bash .devcontainer/post-create.sh",
"postStartCommand": "echo 'Container ready! Solution: /workspace/MyProject.slnx'",
"remoteUser": "vscode",
"runArgs": [
"--init"
],
"service": "devcontainer",
"workspaceFolder": "/workspace",
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached"
}
请先登录再写评论。
Hello, chris. We don't provide this option in the
customizations.jetbrainsblock, so this recommendation is not correct. In fact, we didn't implement any special functionality for Rider in dev containers; it should work the same way as the whole Remote Development feature (used in dev containers unders the hood) works.On my side, I wasn't able to reproduce the issue on the sample dev container in Rider 2025.3.0.2. Could you please specify your version of the local IDE and backend you use for dev containers?