Comments (9)
Current template flow
Creating dev container
- Start with empty folder
- Run command "Dev Containers: New Dev Container"
- Choose .NET template, latest .NET image (7.0)
- Build container
Using dev container template
- Install C# Dev Kit
- In container, run: ".NET: New Project", choose Console App
- Select
Upgrade
to use C# pre-release extension, extension installs and dev container rebuilds- Change to make: Install pre-release version of C# extension in dev container: Use
@prerelease
- Change to make: Install pre-release version of C# extension in dev container: Use
- Try ".NET: New Project" again, now I get quick pick of options
- Select Console App
- Not sure what to do next, so I open the
Get Started with C# Dev Kit
walkthrough- Issue, now resolved: Ran into microsoft/vscode#184960
- Sign in
- Issue, now resolved: microsoft/vscode-dotnettools#124
- Don't see new solution explorer
- Issue filed: microsoft/vscode-dotnettools#129
- Can run app with
F5
; Run and Debug view works if I switch to Debug Console- Issue, now resolved: microsoft/vscode-dotnettools#130
- Wasn't sure how to run tests, eventually got there through command
Test: Run All Tests
- Issue filed: microsoft/vscode-dotnettools#131
Takeaway
- Switch to pre-release version of C# extension in image
- Miscellaneous other issues, not necessarily dev container specific
Current Feature flow
Creating dev container
- Start with empty folder
- Run command "Dev Containers: New Dev Container"
- Choose Ubuntu template
- Add .NET CLI Feature, version
latest
- Build container
Using dev container with .NET Feature
- Switch to pre-release of C# extension, reload
- Install C# Dev Kit extension
- In container, run: ".NET: New Project", choose Console App
- Get below error, and
dotnet --version
doesn't work- Seems to be this issue: devcontainers/features#560, with workaround in this comment
Takeaway
- Switch to pre-release version of C# extension in Feature
- Team is working on a fix for devcontainers/features#560 now since it seems this is more prevalent and not just a one-off
Next steps
- Open PRs for Feature and image to use pre-release version of C# extension (append
@prerelease
, as described in this issue) - Work on fix for devcontainers/features#560
- Discuss with .NET team experts (like Tim) further to ensure changes look accurate to them too
from templates.
- Can we install pre-release version of C# extension in dev container?
If you can figure out a way for us to do this, it would be huge. We're trying to get out of pre-release state for v2 as fast as possible, but have some compat things to work through. But if there is a way in devcontainer or other means to declare that to install (without a custom container) that'd be amazing.
from templates.
@timheuer thanks for the context. @chrmarti shared that we can append @prerelease
after the extension name in devcontainer.json - I just tried it out, and it worked!
Based on the investigation I documented above, we have 2 main next steps to optimize our resources for the C# Dev Kit:
- I'm going to open PRs on our .NET image and Feature to use the pre-release version of the C# extension
- @samruddhikhandale is working on a fix for devcontainers/features#560, which causes issues with installing the .NET SDK in the .NET Feature
@timheuer I'm going to tag you in the 2 PRs I open, which will also be great spots where you can share if there are other issues you've experienced with any of these resources or other ideas for enhancements. Thanks for your help and insights!
from templates.
PRs opened:
Edit: Closing the above as this probably isn't ideal as it may introduce breakages.
from templates.
@timheuer the main changes seem to be using the pre-release version of the C# extension and fixing the .NET SDK installation issue in the .NET Feature.
Considering we want to avoid potential breakage that could be caused by using the pre-release C# extension in the official spec-hosted resources, were there other changes your team identified that we should consider for our resources? Please just let me know, happy to discuss further!
One idea is for the .NET team to host a C# Dev Kit template somewhere in the .NET GitHub org, which would allow for further / more experimental customization (i.e. pre-release version of the C# extension, include the C# Dev Kit extension directly, other Features or settings you think are useful in this development flow). If this is something you'd be interested in, we have a guide here, and I'd be happy to chat through any questions through the process.
from templates.
One idea is for the .NET team to host a C# Dev Kit template somewhere in the .NET GitHub org
I thought about this and just enabling it also as a feature. However given I now know of this little @prerelease
trick ;-) -- I think just sharing a snippet is actually the simplest way for now...example: https://gist.github.com/timheuer/694f8a3ef565b1cb5fbe616c9a1e18cc
from templates.
Great, totally makes sense!
I'll leave this issue open for a bit until devcontainers/features#560 is complete and in case folks have further ideas in the coming days.
from templates.
Flujo de plantilla actual
Creando un contenedor de desarrollo
- Empezar con carpeta vacía
- Ejecute el comando "Dev Containers: New Dev Container"
- Elija la plantilla .NET, la última imagen .NET (7.0)
- Construir contenedor
Uso de la plantilla de contenedor de desarrollo
Instale el kit de desarrollo de C#
En el contenedor, ejecute: ".NET: Nuevo proyecto", elija Aplicación de consola
Select
Upgrade
to use C# pre-release extension, extension installs and dev container rebuilds
- Change to make: Install pre-release version of C# extension in dev container: Use
@prerelease
Try ".NET: New Project" again, now I get quick pick of options
Select Console App
Not sure what to do next, so I open the
Get Started with C# Dev Kit
walkthrough
- Issue, now resolved: Ran into All walkthroughs don't show immediately from "Welcome: Open Walkthrough" microsoft/vscode#184960
Sign in
- Issue, now resolved: [BUG] Stuck signing in microsoft/vscode-dotnettools#124
Don't see new solution explorer
Can run app with
F5
; Run and Debug view works if I switch to Debug Console
- Issue, now resolved: [BUG] Improve C# Dev Kit Debugging Walkthrough microsoft/vscode-dotnettools#130
Wasn't sure how to run tests, eventually got there through command
Test: Run All Tests
Takeaway
- Switch to pre-release version of C# extension in image
- Miscellaneous other issues, not necessarily dev container specific
Current Feature flow
Creating dev container
- Start with empty folder
- Run command "Dev Containers: New Dev Container"
- Choose Ubuntu template
- Add .NET CLI Feature, version
latest
- Build container
Using dev container with .NET Feature
Switch to pre-release of C# extension, reload
Install C# Dev Kit extension
In container, run: ".NET: New Project", choose Console App
Get below error, and
dotnet --version
doesn't work
- Seems to be this issue: dotnet feature fails to install on ubuntu:jammy features#560, with workaround in this comment
Takeaway
- Switch to pre-release version of C# extension in Feature
- Team is working on a fix for dotnet feature fails to install on ubuntu:jammy features#560 now since it seems this is more prevalent and not just a one-off
Next steps
- Open PRs for Feature and image to use pre-release version of C# extension (append
@prerelease
, as described in this issue)- Work on fix for dotnet feature fails to install on ubuntu:jammy features#560
- Discuss with .NET team experts (like Tim) further to ensure changes look accurate to them too
from templates.
Thanks again for the discussion here! I'll close out this issue, but please let me know if folks find other ways our .NET resources could even better work with the C# Dev Kit.
from templates.
Related Issues (20)
- Request: a devcontainer suitable for developing Electron applications HOT 2
- The Anaconda image specified in the documentation is not available.
- [JS -node-mongo] Add Template options for bookworm
- How to initiate xdebug via web browser? HOT 2
- "Using localhost in Docker Compose" doc can have some improvement HOT 1
- ruby-rails-postgres devcontainer has no internet access
- Hi 👋 HOT 1
- dotnet template should include a volume mount for nuget package caching HOT 1
- include C# Dev Kit in dotnet template HOT 3
- Pin PostgreSQL version in `*-postgres` templates HOT 2
- javascript-node-mongo not building the container HOT 2
- Could not connect to mariaDB with imageVariant default HOT 1
- Docs about templates usage and behavior HOT 4
- Is there a way to `publish` template as image?
- typescript-node npm scripts error access HOT 1
- Stuck in "Replacing imageVariant with ..." step HOT 7
- I am a greener. Just ask a simple question about the toolchain in the container. HOT 1
- C+
- Active HOT 2
- postCreateCommand Permission denied HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from templates.