Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Cross-Platform: dotnet core web api QR Codes

Cross-Platform: dotnet core web api QR Codes

Scheduled Pinned Locked Moved The Weird and The Wonderful
csharpasp-netvisual-studiolinuxtutorial
4 Posts 3 Posters 7 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • raddevusR Online
    raddevusR Online
    raddevus
    wrote on last edited by
    #1

    I found a very cool library for creating QR Codes[^] from text input. I decided I wanted to create a DotNet Core (3.1) WebAPI so I could see some (or all) of the QRCoder functionality in action. However, I run Linux (Ubuntu) exclusively at home and Win10 at work. The Premise I wanted to know if I could create a DotNet Core project (using Visual Studio Code) that I could later 1) clone from GitHub (to my Linux box), 2) build and 3) run. Visual Studio Code Since it runs on both Win10 and Linux I knew I needed to use Visual Studio Code (instead of plain old Visual Studio). Of course, that also meant I'd need to run dotnet core command line. I gen'd up a Web API project on the command line following this tutorial[^]. Basically just :

    /> dotnet new webapi -o /> cd

    Then I was able to add the QRCode library from nuget via:

    /> dotnet add package QRCoder --version 1.3.6

    There was bit of a problem when I went to build, because even though I have dotnet 3.1 installed the qrcoder had a dependency on a newer system.drawing.common. Luckily at Nuget you can click the dependencies tab and see how to get that newer library like:

    /> dotnet add package System.Drawing.Common --version 4.7.0

    After that, everything built and worked. I added some URLs that allows the user to generate QRCodes as JPGs or as Ascii Text (see below). Ok, ok, but what about Linux!?! Building and Running On Linux I went home, pulled my GitHub repo for the project[^] made sure my dotnet core installation was up to 3.1 and ran: /> git clone href="https://github.com/raddevus/QRCodeGen" /> cd QRCodeGen /> dotnet restore -- restores all required libraries for project /> dotnet build /> dotnet run The web api app started running on localhost:5001 and I made calls into the QRCoder API. This is where the cross-platform pa

    R B 2 Replies Last reply
    0
    • raddevusR raddevus

      I found a very cool library for creating QR Codes[^] from text input. I decided I wanted to create a DotNet Core (3.1) WebAPI so I could see some (or all) of the QRCoder functionality in action. However, I run Linux (Ubuntu) exclusively at home and Win10 at work. The Premise I wanted to know if I could create a DotNet Core project (using Visual Studio Code) that I could later 1) clone from GitHub (to my Linux box), 2) build and 3) run. Visual Studio Code Since it runs on both Win10 and Linux I knew I needed to use Visual Studio Code (instead of plain old Visual Studio). Of course, that also meant I'd need to run dotnet core command line. I gen'd up a Web API project on the command line following this tutorial[^]. Basically just :

      /> dotnet new webapi -o /> cd

      Then I was able to add the QRCode library from nuget via:

      /> dotnet add package QRCoder --version 1.3.6

      There was bit of a problem when I went to build, because even though I have dotnet 3.1 installed the qrcoder had a dependency on a newer system.drawing.common. Luckily at Nuget you can click the dependencies tab and see how to get that newer library like:

      /> dotnet add package System.Drawing.Common --version 4.7.0

      After that, everything built and worked. I added some URLs that allows the user to generate QRCodes as JPGs or as Ascii Text (see below). Ok, ok, but what about Linux!?! Building and Running On Linux I went home, pulled my GitHub repo for the project[^] made sure my dotnet core installation was up to 3.1 and ran: /> git clone href="https://github.com/raddevus/QRCodeGen" /> cd QRCodeGen /> dotnet restore -- restores all required libraries for project /> dotnet build /> dotnet run The web api app started running on localhost:5001 and I made calls into the QRCoder API. This is where the cross-platform pa

      R Offline
      R Offline
      RickZeeland
      wrote on last edited by
      #2

      Hard .Core again :-\

      1 Reply Last reply
      0
      • raddevusR raddevus

        I found a very cool library for creating QR Codes[^] from text input. I decided I wanted to create a DotNet Core (3.1) WebAPI so I could see some (or all) of the QRCoder functionality in action. However, I run Linux (Ubuntu) exclusively at home and Win10 at work. The Premise I wanted to know if I could create a DotNet Core project (using Visual Studio Code) that I could later 1) clone from GitHub (to my Linux box), 2) build and 3) run. Visual Studio Code Since it runs on both Win10 and Linux I knew I needed to use Visual Studio Code (instead of plain old Visual Studio). Of course, that also meant I'd need to run dotnet core command line. I gen'd up a Web API project on the command line following this tutorial[^]. Basically just :

        /> dotnet new webapi -o /> cd

        Then I was able to add the QRCode library from nuget via:

        /> dotnet add package QRCoder --version 1.3.6

        There was bit of a problem when I went to build, because even though I have dotnet 3.1 installed the qrcoder had a dependency on a newer system.drawing.common. Luckily at Nuget you can click the dependencies tab and see how to get that newer library like:

        /> dotnet add package System.Drawing.Common --version 4.7.0

        After that, everything built and worked. I added some URLs that allows the user to generate QRCodes as JPGs or as Ascii Text (see below). Ok, ok, but what about Linux!?! Building and Running On Linux I went home, pulled my GitHub repo for the project[^] made sure my dotnet core installation was up to 3.1 and ran: /> git clone href="https://github.com/raddevus/QRCodeGen" /> cd QRCodeGen /> dotnet restore -- restores all required libraries for project /> dotnet build /> dotnet run The web api app started running on localhost:5001 and I made calls into the QRCoder API. This is where the cross-platform pa

        B Offline
        B Offline
        Brisingr Aerowing
        wrote on last edited by
        #3

        Look here[^] There’s a library you can install to enable System.Drawing on Linux.

        What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

        raddevusR 1 Reply Last reply
        0
        • B Brisingr Aerowing

          Look here[^] There’s a library you can install to enable System.Drawing on Linux.

          What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

          raddevusR Online
          raddevusR Online
          raddevus
          wrote on last edited by
          #4

          Brisingr Aerowing wrote:

          There’s a library you can install to enable System.Drawing on Linux.

          That's cool. Thanks for posting. I browsed it and I'll look at it a lot more closely. :thumbsup:

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups