Skip to main content

Using GitHub Codespaces with .NET Core

In May of this year we announced Visual Studio Codespaces and early support for .NET Core developers.  Since then we’ve had some early adopters try it out and they gave us great feedback.  We’ve made a bunch of progress on enabling more in the Codespaces capabilities as well.  We’ve also made some fundamental changes as we are now GitHub Codespaces!  Just a few weeks back, Allison wrote about how Visual Studio Codespaces is consolidating into GitHub Codespaces explaining the transition to a single service and experience for Visual Studio developers and other developers connecting to the Codespaces service.

You can read more about general Codespaces experience updates on the Visual Studio blog.   There are some great new changes like the ability to specify some more initialization setup information in your repo so developers can rapidly get started when connecting to your code! The .NET team wanted to share a few brief updates of our own specifically about some of the capabilities we’ve enabled for developers connecting to Codespaces!

Azure Functions support

Initially we enabled support for writing .NET Core applications targeting class library, console, and web applications.  We have expanded to enable running and debugging Azure Functions projects. We’ve also provided you with the ability to run more of your complete solution. For example, you can run a front-end ASP.NET application with a serverless backend all from a Codespace.

Editing, debugging, and testing

We know that the key to your Visual Studio experience is being productive in the editor and we’ve enabled more of those great features in Codespaces environments now as well.  A few of the additions we’ve enabled when connected to a Codespace are:

  • Project Context information in top Navigation Bar
  • Partial support for diagnostics, completion, quick info, and smart indent in HTML, CSS, and Razor
  • Most scenarios are now supported such as Find All References, Find in Files, Go to Declaration, Go to Implementation, etc. including support for navigating from C# to Razor
  • Secondary menus of lightbulbs such as setting severity and changing code style rules from the editor are now supported
  • Format document
  • Doc comment support both during typing ‘///’ above a method/class, and when pressing enter within a doc comment.

Of course, part of development isn’t just writing the code, but finding the bugs we create, right?  We’ve now added the following test and debug capabilities:

  • Test Explorer functionality is more complete including test outcome filters, run failing tests, run last test run, etc.
  • Basic debugger stepping is supported
  • Locals, autos, watch windows with highlighting what is in search box is now supported

Publishing your project

We know that a lot of Visual Studio developers use Publish for various reasons and we’ve enabled the Publish experience when in Codespaces.  In this update, we’re previewing a new capability in the Publish experience for deploying to Azure to help you get your builds more automated in a CI/CD flow using GitHub Actions.  When you publish now you’ll see a new option to create a GitHub Actions workflow for your repo that will automatically build and deploy your app to the Azure resource you selected.

Screenshot of publish wizard with new GitHub Actions option

This workflow can easily be modified to accommodate various configurations or different triggers (like on push or pull request) that you may want to implement.  We’d love for you to try this out and give us feedback.

Coming in the Future

In the future we are continuing to enable more for .NET Core developers including:

  • Scaffolding for ASP.NET Core projects
  • Publishing directly to Azure and other hosting targets
  • Managing Azure Service dependencies for .NET Core projects.
  • Creating new Functions projects and Function endpoints (items)

And of course more features will be prioritized based on your feedback.  We encourage you to read the Codespaces documentation to learn more about what is supported and what is still in progress for your development needs.

How do I try out Codespaces?

We’re glad you asked!  For .NET Core developers we are still in a private preview state as we build up support for more scenarios and learn various configuration needs from you all.  But we’re looking for more customers to on-board to the service and who can commit to providing some feedback for us to improve the experiences.  To do so, please visit https://aka.ms/codespaces-signup to get on the list!

Thank you for reading this far and on behalf of the team bringing you .NET Core development on Codespaces, thank you!

The post Using GitHub Codespaces with .NET Core appeared first on .NET Blog.



source https://devblogs.microsoft.com/dotnet/using-github-codespaces-with-net-core/

Comments

Popular posts from this blog

Fake CVR Generator Denmark

What Is Danish CVR The Central Business Register (CVR) is the central register of the state with information on all Danish companies. Since 1999, the Central Business Register has been the authoritative register for current and historical basic data on all registered companies in Denmark. Data comes from the companies' own registrations on Virk Report. There is also information on associations and public authorities in the CVR. As of 2018, CVR also contains information on Greenlandic companies, associations and authorities. In CVR at Virk you can do single lookups, filtered searches, create extracts and subscriptions, and retrieve a wide range of company documents and transcripts. Generate Danish CVR For Test (Fake) Click the button below to generate the valid CVR number for Denmark. You can click multiple times to generate several numbers. These numbers can be used to Test your sofware application that uses CVR, or Testing CVR APIs that Danish Govt provide. Generate

How To Iterate Dictionary Object

Dictionary is a object that can store values in Key-Value pair. its just like a list, the only difference is: List can be iterate using index(0-n) but not the Dictionary . Generally when we try to iterate the dictionary we get below error: " Collection was modified; enumeration operation may not execute. " So How to parse a dictionary and modify its values?? To iterate dictionary we must loop through it's keys or key - value pair. Using keys

How To Append Data to HTML5 localStorage or sessionStorage?

The localStorage property allows you to access a local Storage object. localStorage is similar to sessionStorage. The only difference is that, while data stored in localStorage has no expiration time untill unless user deletes his cache, data stored in sessionStorage gets cleared when the originating window or tab get closed. These are new HTML5 objects and provide these methods to deal with it: The following snippet accesses the current domain's local Storage object and adds a data item to it using Storage.setItem() . localStorage.setItem('myFav', 'Taylor Swift'); or you can use the keyname directly as : localStorage.myFav = 'Taylor Swift'; To grab the value set in localStorage or sessionStorage, we can use localStorage.getItem("myFav"); or localStorage.myFav There's no append function for localStorage or sessionStorage objects. It's not hard to write one though.The simplest solution goes here: But we can kee