DEV Community

Cover image for Coding a .NETCore project on an iPad using Github Codespaces
Warren Buckley
Warren Buckley

Posted on

Coding a .NETCore project on an iPad using Github Codespaces

Ever wondered if you could use an iPad to develop C# code for a .NETCore project. Surely thats not possible, how do you run the database server, node and the .NETCore runtime. It just seems impossible.

Take a look for yourselves

I work for an open source .NET CMS Umbraco and I wanted to investigate the snazzy new feature of GitHub Codespaces and VSCode remote container development.

Where's the code ?

Well the work in progress PR for the Umbraco CMS repository can be found here - https://github.com/umbraco/Umbraco-CMS/pull/9835

.NETCore & SQL Docker Image for Container Isolated Development & GitHub CodeSpaces #9835

Resources

Below is a mix of documentation and resources that was used for this

TL:DR Using docker locally with WSL2 on Windows with the VSCode extension Remote Containers gives the same experience as GitHub CodeSpaces.

VSCode Container Docs & tutorials

https://channel9.msdn.com/Series/Beginners-Series-to-Dev-Containers 📺 https://channel9.msdn.com/Shows/Tabs-vs-Spaces/Visual-Studio-Code-Remote-dev-with-Containers--Codespaces 📺 https://code.visualstudio.com/docs/remote/containers https://docs.microsoft.com/en-us/learn/modules/use-docker-container-dev-env-vs-code/

Docker Image & Software Installed

Docker Base Image from MS with SQL that allows .SQL scripts to be run on image creation https://github.com/microsoft/vscode-dev-containers/tree/master/containers/dotnet-mssql https://hub.docker.com/_/microsoft-vscode-devcontainers

  • .NETCore 5.0
  • NodeJS LTS installed
  • SQL Server installed
  • Blank DB created with .sql script called UmbracoUnicore

SQL Server Login

Server Username Password Database Name
localhost sa P@ssw0rd UmbracoUnicore

Pre Installed VSCode Extensions in Container

To give a consistent experience for all users using this development container (local or GitHub CodeSpaces) the VSCode instance will have the following extensions installed

Using SQL Server Management Studio

If you wish to connect to the localhost SQL server running in the container locally you can connect with the same credentials but change the server name to host.docker.internal

Server Username Password Database Name
host.docker.internal sa P@ssw0rd UmbracoUnicore

Related PR

The PR for automated user creation for unattended install from this PR has been merged into this PR https://github.com/umbraco/Umbraco-CMS/pull/9934

Outstanding Issues

  • [ ] Jasmine tests fail/do not run
  • [x] In GitHub hosted CodeSpace .gitattributes line endings saying lots of files to commit (was casing for paths so gitignore)

Notes for issues above ⬆️

I can highly recommend adding a .devcontainer to your opensource project

Top comments (0)