Core configuration / dependencies RRS feed

  • Question

  • User379720387 posted

    I am taking a stab at the blazor boilerplate site and am having difficulty getting a connection to the db. First step is to verify that I have the dependencies necessary:

    • .Net Core SDK 3.1.100-preview1-014459
    • Visual Studio 2019 Preview with the ASP.NET and web development workload selected.
    • The Blazor templates on the command-line: dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.1.0-preview1.19508.20
    • For Entity Framework Core on the command-line tools: dotnet tool install --global dotnet-ef --version 3.1.100

    How do I verify if I have the correct blazor templates and EF Core stuff?

    dotnet --info:

    Microsoft Windows [Version 10.0.18362.418]
    (c) 2019 Microsoft Corporation. All rights reserved.
    C:\Users\w>cd C:\Users\w\Downloads\blazorboilerplate
    C:\Users\w\Downloads\blazorboilerplate>dotnet --info
    .NET Core SDK (reflecting any global.json):
     Version:   3.1.100-preview1-014459
     Commit:    ac3b59712d
    Runtime Environment:
     OS Name:     Windows
     OS Version:  10.0.18362
     OS Platform: Windows
     RID:         win10-x64
     Base Path:   C:\Program Files\dotnet\sdk\3.1.100-preview1-014459\
    Host (useful for support):
      Version: 3.1.0-preview1.19506.1
      Commit:  bbf5542781
    .NET Core SDKs installed:
      2.1.104 [C:\Program Files\dotnet\sdk]
      2.1.200 [C:\Program Files\dotnet\sdk]
      2.1.202 [C:\Program Files\dotnet\sdk]
      2.1.401 [C:\Program Files\dotnet\sdk]
      2.1.502 [C:\Program Files\dotnet\sdk]
      2.1.600-preview-009472 [C:\Program Files\dotnet\sdk]
      2.1.600-preview-009497 [C:\Program Files\dotnet\sdk]
      2.1.801 [C:\Program Files\dotnet\sdk]
      2.1.802 [C:\Program Files\dotnet\sdk]
      3.0.100-preview9-014004 [C:\Program Files\dotnet\sdk]
      3.0.100 [C:\Program Files\dotnet\sdk]
      3.1.100-preview1-014459 [C:\Program Files\dotnet\sdk]
    .NET Core runtimes installed:
      Microsoft.AspNetCore.All 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
      Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
      Microsoft.AspNetCore.All 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
      Microsoft.AspNetCore.All 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
      Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
      Microsoft.AspNetCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
      Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
      Microsoft.AspNetCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
      Microsoft.AspNetCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
      Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
      Microsoft.AspNetCore.App 3.0.0-preview9.19424.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
      Microsoft.AspNetCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
      Microsoft.AspNetCore.App 3.1.0-preview1.19508.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
      Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      Microsoft.NETCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      Microsoft.NETCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      Microsoft.NETCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      Microsoft.NETCore.App 3.0.0-preview9-19423-09 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      Microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      Microsoft.NETCore.App 3.1.0-preview1.19506.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      Microsoft.WindowsDesktop.App 3.0.0-preview9-19423-09 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
      Microsoft.WindowsDesktop.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
      Microsoft.WindowsDesktop.App 3.1.0-preview1.19506.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    To install additional .NET Core runtimes or SDKs:
    Friday, October 18, 2019 8:31 PM

All replies

  • User-474980206 posted

    Blazor as a webassembly technology, does not support EF. It should make http calls to a web api to access EF.

    While many browsers support a sql database, webassembly must call JavaScript to access. It should be possible to write an EF driver that used JavaScript interop to access the sql database. 

    Sunday, October 20, 2019 8:58 AM
  • User379720387 posted

    This is about EF Core.

    This is a sample from here, first project under the Authentication header.

    Those are the dependencies for this project provided by the author.

    Trying to get it running and it won't because of named pipes sql error 40 issues.

    My question is how do I verify if I have the dependencies necessary.

    Sunday, October 20, 2019 12:04 PM
  • User-474980206 posted

    There should be two projects. A blazor UI project, and a server project. The EF dependencies should be in the server project.

    Sunday, October 20, 2019 8:45 PM
  • User379720387 posted

    Correct, that is all there, including a what looks to me like a valid connection string to localdb.

    my question is how do I verify I have:

    • The Blazor templates on the command-line: dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.1.0-preview1.19508.20
    • For Entity Framework Core on the command-line tools: dotnet tool install --global dotnet-ef --version 3.1.100

    Sunday, October 20, 2019 10:06 PM
  • User1634355159 posted

    Hi wavemaster,

    Are you wondering if you have the correct package installed in your project?You could use “Get-Package” statement in PMC, to retrieves the list of packages installed in the local repository.So you could use "Get-Package -ListAvailable -Filter Microsoft.AspNetCore.Blazor.Templates" in PMC to check the version of your "Microsoft.AspNetCore.Blazor.Templates",  “global dotnet-ef” is similar.More information about it,Please read here.

    Best Regards,


    Monday, October 21, 2019 6:35 AM
  • User-474980206 posted

    package.json will list the nuget packages used by the project. A template file just builds a sample project with source files, a project file and package file. You would need to know what a template would generate, to know if a given project was created with a given template.

    the easiest way to learn about the output of a given template is to just create a sample project with one.

    Monday, October 21, 2019 8:54 AM
  • User379720387 posted

    The Get-Package did the trick:

    PM> Get-Package
    Id                                  Versions                                 ProjectName                                                                                                                        
    --                                  --------                                 -----------                                                                                                                        
    Microsoft.EntityFrameworkCore       {3.0.0}                                  BlazorBoilerplate.Server                                                                                                           
    Microsoft.EntityFrameworkCore.Sq... {3.0.0}                                  BlazorBoilerplate.Server                                                                                                           
    AutoMapper                          {9.0.0}                                  BlazorBoilerplate.Server                                                                                                           
    MailKit                             {}                                BlazorBoilerplate.Server                                                                                                           
    Microsoft.EntityFrameworkCore.De... {3.0.0}                                  BlazorBoilerplate.Server                                                                                                           
    NSwag.AspNetCore                    {13.0.6}                                 BlazorBoilerplate.Server                                                                                                           
    Microsoft.EntityFrameworkCore.Tools {3.0.0}                                  BlazorBoilerplate.Server                                                                                                           
    Serilog.Settings.Configuration      {3.1.1-dev-00209}                        BlazorBoilerplate.Server                                                                                                           
    Microsoft.AspNetCore.Mvc.Newtons... {3.0.0}                                  BlazorBoilerplate.Server                                                                                                           
    Microsoft.EntityFrameworkCore.Sq... {3.0.0}                                  BlazorBoilerplate.Server                                                                                                           
    Serilog.Sinks.File                  {4.1.0-dev-00850}                        BlazorBoilerplate.Server                                                                                                           
    Microsoft.AspNetCore.Identity.En... {3.0.0}                                  BlazorBoilerplate.Server                                                                                                           
    Microsoft.AspNetCore.Blazor.Server  {3.0.0-preview9.19465.2}                 BlazorBoilerplate.Server                                                                                                           
    Serilog                             {2.9.0-dev-01124}                        BlazorBoilerplate.Server                                                                                                           
    Serilog.AspNetCore                  {3.0.1-dev-00099}                        BlazorBoilerplate.Server                                                                                                           
    Newtonsoft.Json                     {12.0.3-beta1}                           BlazorBoilerplate.Shared                                                                                                           
    System.ComponentModel.Annotations   {4.6.0}                                  BlazorBoilerplate.Shared                                                                                                           
    Microsoft.AspNetCore.Authorization  {3.0.0}                                  BlazorBoilerplate.Shared                                                                                                           
    NETStandard.Library                 {2.0.3}                                  BlazorBoilerplate.Shared                                                                                                           
    Microsoft.AspNetCore.Components.... {3.0.0}                                  BlazorBoilerplate.Client                                                                                                           
    Microsoft.AspNetCore.Blazor.Build   {3.0.0-preview9.19465.2}                 BlazorBoilerplate.Client                                                                                                           
    Microsoft.AspNetCore.Blazor.DevS... {3.0.0-preview9.19465.2}                 BlazorBoilerplate.Client                                                                                                           
    MatBlazor                           {1.9.0}                                  BlazorBoilerplate.Client                                                                                                           
    Toolbelt.Blazor.LoadingBar          {7.0.0}                                  BlazorBoilerplate.Client                                                                                                           
    Microsoft.AspNetCore.Blazor         {3.0.0-preview9.19465.2}                 BlazorBoilerplate.Client                                                                                                           
    Microsoft.AspNetCore.Blazor.Http... {3.0.0-preview9.19465.2}                 BlazorBoilerplate.Client                                                                                                           
    NETStandard.Library                 {2.0.3}                                  BlazorBoilerplate.Client        

    • The Blazor templates on the command-line: dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.1.0-preview1.19508.20
    • For Entity Framework Core on the command-line tools: dotnet tool install --global dotnet-ef --version 3.1.100

    I don't know enough to say that I have the right tooling as per the requirements. What say you?

    Monday, October 21, 2019 7:32 PM
  • User379720387 posted


    I have the project created, it compiles and runs without a connection to the db.

    As soon as I uncomment the connection string I get sql error 40 "named pipes".

    I have exhausted all the most common suggestions to fix this error, none of them worked. 

    It is not entirely impossible that this sql 40 error is caused by something else, so that is why I am exploring "Blazor tooling hell" possibilities.

    Feel free to clone or download the sample at https://github.com/enkodellc/blazorboilerplate.

    Curious if this is something unique to my setup.

    Monday, October 21, 2019 7:44 PM