Giter Club home page Giter Club logo

Comments (9)

bamurtaugh avatar bamurtaugh commented on July 26, 2024

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
    • Get 2 errors and 1 sign in toast:
    • image
    • image
  • 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
  • Sign in
  • Don't see new solution explorer
  • Can run app with F5; Run and Debug view works if I switch to Debug Console
  • 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

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.

timheuer avatar timheuer commented on July 26, 2024
  • 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.

bamurtaugh avatar bamurtaugh commented on July 26, 2024

@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.

bamurtaugh avatar bamurtaugh commented on July 26, 2024

PRs opened:

Edit: Closing the above as this probably isn't ideal as it may introduce breakages.

from templates.

bamurtaugh avatar bamurtaugh commented on July 26, 2024

@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.

timheuer avatar timheuer commented on July 26, 2024

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.

bamurtaugh avatar bamurtaugh commented on July 26, 2024

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.

Juancanico5 avatar Juancanico5 commented on July 26, 2024

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

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

Takeaway

Next steps

from templates.

bamurtaugh avatar bamurtaugh commented on July 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.