Problem with “dotnet ef dbcontext scaffold” on Linux Bash












1














while issuing following command in linux bash,



dotnet ef dbcontext scaffold "Server=192.168.1.5MSSQLSERVER2017;Database=TestDb;User Id=test;Password=test@987" Microsoft.EntityFrameworkCore.SqlServer -o Models --context AppDbContext -t solid


I get this error message:



Unrecognized command or argument 'Microsoft.EntityFrameworkCore.SqlServer'


I figured out the problem that it is being caused by space in "User Id" in the command because when i remove space i get this message.



Keyword not supported: 'userid'


I tried lots of combinations like putting User Id, 'User Id', "User Id", User" "Id and a lot more I found on the internet but I am still stuck on this. How can I solve this?



My EF version:



Entity Framework Core .NET Command-line Tools
2.1.4-rtm-31024


My dotnet version:



.NET Core SDK (reflecting any global.json):
Version: 2.1.500
Commit: b68b931422

Runtime Environment:
OS Name: arch
OS Version:
OS Platform: Linux
RID: arch-x64
Base Path: /opt/dotnet/sdk/2.1.500/

Host (useful for support):
Version: 2.1.6
Commit: 3f4f8eebd8

.NET Core SDKs installed:
2.1.500 [/opt/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.NETCore.App 2.1.6 [/opt/dotnet/shared/Microsoft.NETCore.App]


P.S. I've already added "Microsoft.EntityFrameworkCore.Design" package in the project too.










share|improve this question





























    1














    while issuing following command in linux bash,



    dotnet ef dbcontext scaffold "Server=192.168.1.5MSSQLSERVER2017;Database=TestDb;User Id=test;Password=test@987" Microsoft.EntityFrameworkCore.SqlServer -o Models --context AppDbContext -t solid


    I get this error message:



    Unrecognized command or argument 'Microsoft.EntityFrameworkCore.SqlServer'


    I figured out the problem that it is being caused by space in "User Id" in the command because when i remove space i get this message.



    Keyword not supported: 'userid'


    I tried lots of combinations like putting User Id, 'User Id', "User Id", User" "Id and a lot more I found on the internet but I am still stuck on this. How can I solve this?



    My EF version:



    Entity Framework Core .NET Command-line Tools
    2.1.4-rtm-31024


    My dotnet version:



    .NET Core SDK (reflecting any global.json):
    Version: 2.1.500
    Commit: b68b931422

    Runtime Environment:
    OS Name: arch
    OS Version:
    OS Platform: Linux
    RID: arch-x64
    Base Path: /opt/dotnet/sdk/2.1.500/

    Host (useful for support):
    Version: 2.1.6
    Commit: 3f4f8eebd8

    .NET Core SDKs installed:
    2.1.500 [/opt/dotnet/sdk]

    .NET Core runtimes installed:
    Microsoft.NETCore.App 2.1.6 [/opt/dotnet/shared/Microsoft.NETCore.App]


    P.S. I've already added "Microsoft.EntityFrameworkCore.Design" package in the project too.










    share|improve this question



























      1












      1








      1







      while issuing following command in linux bash,



      dotnet ef dbcontext scaffold "Server=192.168.1.5MSSQLSERVER2017;Database=TestDb;User Id=test;Password=test@987" Microsoft.EntityFrameworkCore.SqlServer -o Models --context AppDbContext -t solid


      I get this error message:



      Unrecognized command or argument 'Microsoft.EntityFrameworkCore.SqlServer'


      I figured out the problem that it is being caused by space in "User Id" in the command because when i remove space i get this message.



      Keyword not supported: 'userid'


      I tried lots of combinations like putting User Id, 'User Id', "User Id", User" "Id and a lot more I found on the internet but I am still stuck on this. How can I solve this?



      My EF version:



      Entity Framework Core .NET Command-line Tools
      2.1.4-rtm-31024


      My dotnet version:



      .NET Core SDK (reflecting any global.json):
      Version: 2.1.500
      Commit: b68b931422

      Runtime Environment:
      OS Name: arch
      OS Version:
      OS Platform: Linux
      RID: arch-x64
      Base Path: /opt/dotnet/sdk/2.1.500/

      Host (useful for support):
      Version: 2.1.6
      Commit: 3f4f8eebd8

      .NET Core SDKs installed:
      2.1.500 [/opt/dotnet/sdk]

      .NET Core runtimes installed:
      Microsoft.NETCore.App 2.1.6 [/opt/dotnet/shared/Microsoft.NETCore.App]


      P.S. I've already added "Microsoft.EntityFrameworkCore.Design" package in the project too.










      share|improve this question















      while issuing following command in linux bash,



      dotnet ef dbcontext scaffold "Server=192.168.1.5MSSQLSERVER2017;Database=TestDb;User Id=test;Password=test@987" Microsoft.EntityFrameworkCore.SqlServer -o Models --context AppDbContext -t solid


      I get this error message:



      Unrecognized command or argument 'Microsoft.EntityFrameworkCore.SqlServer'


      I figured out the problem that it is being caused by space in "User Id" in the command because when i remove space i get this message.



      Keyword not supported: 'userid'


      I tried lots of combinations like putting User Id, 'User Id', "User Id", User" "Id and a lot more I found on the internet but I am still stuck on this. How can I solve this?



      My EF version:



      Entity Framework Core .NET Command-line Tools
      2.1.4-rtm-31024


      My dotnet version:



      .NET Core SDK (reflecting any global.json):
      Version: 2.1.500
      Commit: b68b931422

      Runtime Environment:
      OS Name: arch
      OS Version:
      OS Platform: Linux
      RID: arch-x64
      Base Path: /opt/dotnet/sdk/2.1.500/

      Host (useful for support):
      Version: 2.1.6
      Commit: 3f4f8eebd8

      .NET Core SDKs installed:
      2.1.500 [/opt/dotnet/sdk]

      .NET Core runtimes installed:
      Microsoft.NETCore.App 2.1.6 [/opt/dotnet/shared/Microsoft.NETCore.App]


      P.S. I've already added "Microsoft.EntityFrameworkCore.Design" package in the project too.







      bash entity-framework-core asp.net-core-2.0






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 21 at 5:36

























      asked Nov 21 at 5:29









      S. Gajurel

      62




      62
























          1 Answer
          1






          active

          oldest

          votes


















          0














          I'm not familiar with .NET scaffolding, but I can tell you that bash is not your problem here. I believe the error you're getting when removing the space from "User Id" is unrelated, and the space is working as intended. Instead you're getting an error that the SqlServer command is unrecognized. This is likely because it is either not installed or the path/permissions are not appropriately set.



          https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.SqlServer/






          share|improve this answer





















          • Yes, I agree bash is not problem here, It's problem with EF and how it parses that connection string from bash. This exact command works fine in Windows machine so what I mean is there must be some work around for this to accomplish this task in bash.
            – S. Gajurel
            Nov 21 at 5:49










          • On the contrary, it likely has to do with the fact that SqlServer is not appropriately set up on that linux machine.
            – Conner
            Nov 21 at 5:50










          • The SqlServer is running on another Windows machine in the same network. I followed the official guide:docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet
            – S. Gajurel
            Nov 21 at 6:07










          • Try adding a semi-colon at the end of the string: "Server=192.168.1.5MSSQLSERVER2017;Database=TestDb;User Id=test;Password=test@987;"
            – Conner
            Nov 21 at 6:19










          • Still got the same output.
            – S. Gajurel
            Nov 21 at 6:49











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53405760%2fproblem-with-dotnet-ef-dbcontext-scaffold-on-linux-bash%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          I'm not familiar with .NET scaffolding, but I can tell you that bash is not your problem here. I believe the error you're getting when removing the space from "User Id" is unrelated, and the space is working as intended. Instead you're getting an error that the SqlServer command is unrecognized. This is likely because it is either not installed or the path/permissions are not appropriately set.



          https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.SqlServer/






          share|improve this answer





















          • Yes, I agree bash is not problem here, It's problem with EF and how it parses that connection string from bash. This exact command works fine in Windows machine so what I mean is there must be some work around for this to accomplish this task in bash.
            – S. Gajurel
            Nov 21 at 5:49










          • On the contrary, it likely has to do with the fact that SqlServer is not appropriately set up on that linux machine.
            – Conner
            Nov 21 at 5:50










          • The SqlServer is running on another Windows machine in the same network. I followed the official guide:docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet
            – S. Gajurel
            Nov 21 at 6:07










          • Try adding a semi-colon at the end of the string: "Server=192.168.1.5MSSQLSERVER2017;Database=TestDb;User Id=test;Password=test@987;"
            – Conner
            Nov 21 at 6:19










          • Still got the same output.
            – S. Gajurel
            Nov 21 at 6:49
















          0














          I'm not familiar with .NET scaffolding, but I can tell you that bash is not your problem here. I believe the error you're getting when removing the space from "User Id" is unrelated, and the space is working as intended. Instead you're getting an error that the SqlServer command is unrecognized. This is likely because it is either not installed or the path/permissions are not appropriately set.



          https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.SqlServer/






          share|improve this answer





















          • Yes, I agree bash is not problem here, It's problem with EF and how it parses that connection string from bash. This exact command works fine in Windows machine so what I mean is there must be some work around for this to accomplish this task in bash.
            – S. Gajurel
            Nov 21 at 5:49










          • On the contrary, it likely has to do with the fact that SqlServer is not appropriately set up on that linux machine.
            – Conner
            Nov 21 at 5:50










          • The SqlServer is running on another Windows machine in the same network. I followed the official guide:docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet
            – S. Gajurel
            Nov 21 at 6:07










          • Try adding a semi-colon at the end of the string: "Server=192.168.1.5MSSQLSERVER2017;Database=TestDb;User Id=test;Password=test@987;"
            – Conner
            Nov 21 at 6:19










          • Still got the same output.
            – S. Gajurel
            Nov 21 at 6:49














          0












          0








          0






          I'm not familiar with .NET scaffolding, but I can tell you that bash is not your problem here. I believe the error you're getting when removing the space from "User Id" is unrelated, and the space is working as intended. Instead you're getting an error that the SqlServer command is unrecognized. This is likely because it is either not installed or the path/permissions are not appropriately set.



          https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.SqlServer/






          share|improve this answer












          I'm not familiar with .NET scaffolding, but I can tell you that bash is not your problem here. I believe the error you're getting when removing the space from "User Id" is unrelated, and the space is working as intended. Instead you're getting an error that the SqlServer command is unrecognized. This is likely because it is either not installed or the path/permissions are not appropriately set.



          https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.SqlServer/







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 21 at 5:38









          Conner

          23.1k84568




          23.1k84568












          • Yes, I agree bash is not problem here, It's problem with EF and how it parses that connection string from bash. This exact command works fine in Windows machine so what I mean is there must be some work around for this to accomplish this task in bash.
            – S. Gajurel
            Nov 21 at 5:49










          • On the contrary, it likely has to do with the fact that SqlServer is not appropriately set up on that linux machine.
            – Conner
            Nov 21 at 5:50










          • The SqlServer is running on another Windows machine in the same network. I followed the official guide:docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet
            – S. Gajurel
            Nov 21 at 6:07










          • Try adding a semi-colon at the end of the string: "Server=192.168.1.5MSSQLSERVER2017;Database=TestDb;User Id=test;Password=test@987;"
            – Conner
            Nov 21 at 6:19










          • Still got the same output.
            – S. Gajurel
            Nov 21 at 6:49


















          • Yes, I agree bash is not problem here, It's problem with EF and how it parses that connection string from bash. This exact command works fine in Windows machine so what I mean is there must be some work around for this to accomplish this task in bash.
            – S. Gajurel
            Nov 21 at 5:49










          • On the contrary, it likely has to do with the fact that SqlServer is not appropriately set up on that linux machine.
            – Conner
            Nov 21 at 5:50










          • The SqlServer is running on another Windows machine in the same network. I followed the official guide:docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet
            – S. Gajurel
            Nov 21 at 6:07










          • Try adding a semi-colon at the end of the string: "Server=192.168.1.5MSSQLSERVER2017;Database=TestDb;User Id=test;Password=test@987;"
            – Conner
            Nov 21 at 6:19










          • Still got the same output.
            – S. Gajurel
            Nov 21 at 6:49
















          Yes, I agree bash is not problem here, It's problem with EF and how it parses that connection string from bash. This exact command works fine in Windows machine so what I mean is there must be some work around for this to accomplish this task in bash.
          – S. Gajurel
          Nov 21 at 5:49




          Yes, I agree bash is not problem here, It's problem with EF and how it parses that connection string from bash. This exact command works fine in Windows machine so what I mean is there must be some work around for this to accomplish this task in bash.
          – S. Gajurel
          Nov 21 at 5:49












          On the contrary, it likely has to do with the fact that SqlServer is not appropriately set up on that linux machine.
          – Conner
          Nov 21 at 5:50




          On the contrary, it likely has to do with the fact that SqlServer is not appropriately set up on that linux machine.
          – Conner
          Nov 21 at 5:50












          The SqlServer is running on another Windows machine in the same network. I followed the official guide:docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet
          – S. Gajurel
          Nov 21 at 6:07




          The SqlServer is running on another Windows machine in the same network. I followed the official guide:docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet
          – S. Gajurel
          Nov 21 at 6:07












          Try adding a semi-colon at the end of the string: "Server=192.168.1.5MSSQLSERVER2017;Database=TestDb;User Id=test;Password=test@987;"
          – Conner
          Nov 21 at 6:19




          Try adding a semi-colon at the end of the string: "Server=192.168.1.5MSSQLSERVER2017;Database=TestDb;User Id=test;Password=test@987;"
          – Conner
          Nov 21 at 6:19












          Still got the same output.
          – S. Gajurel
          Nov 21 at 6:49




          Still got the same output.
          – S. Gajurel
          Nov 21 at 6:49


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53405760%2fproblem-with-dotnet-ef-dbcontext-scaffold-on-linux-bash%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          404 Error Contact Form 7 ajax form submitting

          How to know if a Active Directory user can login interactively

          Refactoring coordinates for Minecraft Pi buildings written in Python