Develop C# and .NET Core based applications. Includes all needed SDKs, extensions, dependencies and an MS SQL container for parallel database development. Adds an additional MS SQL container to the C# (.NET Core) container definition and deploys any .dacpac files from the mssql .devcontainer folder.
| Options Id | Description | Type | Default Value |
|---|---|---|---|
| imageVariant | .NET version: | string | 7.0 |
| nodeVersion | Node.js version: | string | lts/* |
A secondary container for MS SQL is defined in .devcontainer/devcontainer.json with the Dockerfile and supporting scripts in the mssql folder. This container is deployed from the latest developer edition of Microsoft SQL 2019. The database(s) are made available directly in the Codespace/VS Code through the MSSQL extension with a connection labeled "mssql-container". The default sa user password is set to P@ssw0rd. The default SQL port is mapped to port 1433 in .devcontainer/docker-compose.yml.
To change the sa user password, change the value in .devcontainer/docker-compose.yml and .devcontainer/devcontainer.json.
By default, a blank user database is created titled "ApplicationDB". To add additional database objects or data through T-SQL during Codespace configuration, edit the file .devcontainer/mssql/setup.sql or place additional .sql files in the .devcontainer/mssql/ folder. Large numbers of scripts may take a few minutes following container creation to complete, even when the SQL server is available the database(s) may not be available yet.
Alternatively, .dacpac files placed in the ./bin/Debug folder will be published as databases in the container during Codespace configuration. SqlPackage is used to deploy a database schema from a data-tier application file (dacpac), allowing you to bring your application's database structures into the dev container easily. The publish process may take a few minutes following container creation to complete, even when the server is available the database(s) may not be available yet.
Note: This file was auto-generated from the devcontainer-template.json. Add additional notes to a NOTES.md.