What's new for .NET Core and Visual Studio 2017

Download this episode

Download Video

Download captions

Download Captions

Description

Announcing .NET Core tools are 1.0! Check out the changes in .NET Core tooling such as csproj and the new dotnet commands. Get a recap of recent .NET Core news. Refresh your knowledge of LTS and Current release trains. Learn about .NET and Docker.

See a demo of dotnet migrate in Visual Studio 2017 and the open source docs.microsoft.com.

Get started today by downloading Visual Studio 2017, visit: http://www.visualstudio.com/vs/whatsnew

For more information, check out these courses on Microsoft Virtual Academy:

Day:

0

Session Type:

Pre-recorded

Code:

T108

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image
      dcuccia

      Awesome. Congrats to all on the release.

      Regarding "dotnet migrate," is the plan to use this same tooling/framework to assist migration from .NET Framework as well? If so, what's the timeline on that? It's great to have assistance for people that used project.json, but obviously the much bigger cohort are those of us who have waited for 1.0 tooling to migrate over from the full framework. Something along the lines of the MoMA/Xamarin tools for checking compatibility against different profiles will be crucial for this.

    • User profile image
      kendrahavens

      @dcuccia: Thank you! Immo Landwerth has a great blog post covering the challenges associated with porting from the .NET Framework to .NET Core. For now, we have dotnet-apiport that will help identify what libraries are compatible and what will need more work put into them. Keep in mind, many APIs will be added to .NET Core 2.0 that will make porting even easier with .NET Standard 2.0. Currently, .NET Core 2.0 and .NET Standard 2.0 are planned for Q3 2017.

    • User profile image
      Eric Schneider

      No Netstandard or Core templates for vb.net !!!!!

    • User profile image
      anurajp

      ASP.NET Core tooling is still in RTM?

    • User profile image
      Amirsas
      • Thank you @kendra for the recap. Any clue when will the live unit tests feature be supported for dotnet core? In the meantime, is there any alternative? (Besides waiting :) )
    • User profile image
      Juan

      Hello I see them from Argentina and I am learning English to understand their instructive events. In the future it would be possible to add subtitles in English because very fast and one can not continue in their dialogues, thanks for the instruction

    • User profile image
      iAmBipinPaul

      I migrated my ASP.NET core project to VS 2017 , it works fine but while applying migrations  getting an error as

      "No database provider has been configured for this DbContext. A provider can be configured by overriding the DbContext.OnConfiguring method or by using AddDbContext on the application service provider. If AddDbContext is used, then also ensure that your DbContext type accepts a DbContextOptions<TContext> object in its constructor and passes it to the base constructor for DbContext"

       public void ConfigureServices(IServiceCollection services)
              {
                  // Add framework services.
      
                  services.AddApplicationInsightsTelemetry(Configuration);
      
                  services.AddDbContext<ApplicationDbContext>(options =>
                      options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
      
                  services.AddIdentity<ApplicationUser, IdentityRole>()
                      .AddEntityFrameworkStores<ApplicationDbContext>()
                      .AddDefaultTokenProviders();
      
      
                  services.AddMvc();
      
                  // Add application services.
                  services.AddTransient<IEmailSender, AuthMessageSender>();
                  services.AddTransient<ISmsSender, AuthMessageSender>();
              }

      But it works fine with VS 2015

    • User profile image
      dcuccia

      @dcuccia: Thank you! Immo Landwerth has a great blog post covering the challenges associated with porting from the .NET Framework to .NET Core. For now, we have dotnet-apiport that will help identify what libraries are compatible and what will need more work put into them. Keep in mind, many APIs will be added to .NET Core 2.0 that will make porting even easier with .NET Standard 2.0. Currently, .NET Core 2.0 and .NET Standard 2.0 are planned for Q3 2017.

      Thanks for your reply and for the timelines. I'd seen that dotnet-apiport hadn't been worked on for a while, so I assumed it wasn't supported/recommended for the 1.0 tooling release. I'm just one voice, but it would sure be nice to have this baked in to the shipped tooling, and "dotnet migrate" sure sounds relevant to this class of compatibility assesment.

    • User profile image
      kendrahavens

      @Juan:Hey there! You should be able to turn on English subtitles on all channel 9 videos! There is a small CC button in the bottom of the video. Click that and select "On" for English subtitles.

       

      @Amirsas: I'm not sure. I think we are keeping it vague for now. It's definitely something we are working on.

       

      @iAmBipinPaul:Looks like a few people ran into this problem during our RC releases and the solution was creating your own default constructor described here: https://github.com/aspnet/EntityFramework/issues/4825#issuecomment-248652706. Let me know if that helps!

       

      @anurajp:Yep, but that's just the tooling (SDK) version going 1.0. The .NET libraries and runtime are well past 1.0.

       

      @dcuccia:That is great feedback. Thank you! You can track progress on adding the api-port to VS2017 Tooling here: https://github.com/Microsoft/dotnet-apiport/issues/397 The "migrate" and "port" tools do sound similar. That's a great point to bring up. We definitely don't want them to be conflated. I'll be looking into the documentation on these. :)

    • User profile image
      iAmBipinPaul

      @kendrahavens: There was already default constructor for ApplicationDbContext but it was before the constructor which takes the argument as ApplicationDbContext .

      Before my code was like

       public ApplicationDbContext()
              {
                   Database.EnsureCreated();
              }
      
                      public DbSet<Team> Teams { get; set; }
              public DbSet<Player> Players { get; set; }
              
              public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
                  : base(options)
              {
              }

       

      After

                 public DbSet<Team> Teams { get; set; }
              public DbSet<Player> Players { get; set; }
      
              public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
                  : base(options)
              {
              }
      
              public ApplicationDbContext()
              {
                  Database.EnsureCreated();
              }
      

      Thanks !,  It Worked.

      I think, Constructor order matters in VS 2017 but not in VS 2015 because it was working perfectly in VS 2015.

       

    Add Your 2 Cents