DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Publishing Flutter Packages to JFrog Artifactory
  • Wow, pnpm, You’re Really Fast
  • How To Approach Dependency Management in Java [Video]
  • Tarantool: Speeding Up Development With Rust

Trending

  • The ORM Is Over: AI-Written SQL Is the New Data Access Layer
  • Ujorm3: A New Lightweight ORM for JavaBeans and Records
  • How to Test a PATCH API Request With REST-Assured Java
  • S3 Vectors: How to Build a RAG Without a Vector Database
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. How To Publish and Install DotNet SDK With NuGet

How To Publish and Install DotNet SDK With NuGet

NuGet is the package manager for the Microsoft development platform. The post shares how to publish and install packages with NuGet via the GUI tool.

By 
Eric Parker user avatar
Eric Parker
·
Jan. 30, 24 · Tutorial
Likes (1)
Comment
Save
Tweet
Share
2.2K Views

Join the DZone community and get the full member experience.

Join For Free

A package manager is a tool that automatically installs, updates, and uninstalls distributions of software based on a central installation large database. With a package manager, users do not have to download an application installer manually. There are numerous package managers for various programming languages and platforms like Maven, npm, pip, apt-get Yum, and many more. In this post, we shall look at how to publish and install packages with NuGet. 

What Is NuGet?

NuGet is a package manager for the Microsoft development platform. Users can access NuGet through the command line tool, Visual Studio, or Package Explorer. 

  • Download 
  • Windows x86 Commandline 
  • Visual Studio 2012 
  • NuGet Package Explorer 

It is also possible to install NuGet Package Manager in Visual Studio. Select the Tools > Extensions and Updates menu option, and then search for NuGet: 

package managerOnce the extension is installed, you can find it from the Tools > NuGet Package Manager menu option: 

install extension 

Publishing a Package

 We must first understand how to set up the directory structure before generating a package: 

  • Tools: It is a folder containing PowerShell apps and scripts that may be accessed through the Package Manager Console. 
  • Lib: lib is the folder containing.dll files, which are inserted after package installation as assembly references. 
  • Content: When the package is installed, the files within the folder are copied to the application's root. 
  • Build: build is the folder containing MSBuild targets files that are automatically added to the application's .csproj file. 

Let's use NuGet Package Explorer to develop a package for Dynamic.NET TWAIN. Depending on your desire, you can use a GUI tool or a command line tool. 

To create a new package, choose File > New from the menu. To edit the package data, follow: 

edit the package data

To create the lib folder, choose Content > Add > Lib Folder from the menu. To add a .NET folder, right-click on the lib folder and choose Add.  

Content > Add > Lib

Place already-existing.dll files in the appropriate folders: 

Place already-existing.dll files in the appropriate folders

Choose File > Save As to create Dynamsoft.DotNet.TWAIN.6.1.1.nupkg package. Use a file archiver to view the structure of the.nupkg file:  

File > Save As

You must create an account to publish the package. 

Locate Your API Key

Locate Your API Key

 Now, you may submit your package online and publish it:   

Or with the NuGet Package Explorer: 

 Please read the article Managing Packages Using the Package Manager Console if you would rather update and delete packages using the command line. 

Steps To Install a Package

Make a fresh WinForm or WPF project. To access the Package Manager Console or Manage NuGet Packages for Solution, select Tools > NuGet Package Manager. 

Using a GUI, install a package: 

Using a GUI, install a package

Apply a package using the command line: 

Apply a package using the command line

Upon installation of the package, Dynamic.NET TWAIN references were automatically added: 

Dynamic.NET TWAIN references

The Testing Code Snippet

C#
 
using Dynamsoft.DotNet.TWAIN; 
 namespace WpfApplication1 
{ 
    /// <summary> 
    /// Interaction logic for MainWindow.xaml 
    /// </summary> 
    public partial class MainWindow : Window 
    { 
        public MainWindow() 
        { 
            InitializeComponent(); 
            DynamicDotNetTwain t = new DynamicDotNetTwain(); 

        } 
    } 
} 


NuGet Package manager

Opinions expressed by DZone contributors are their own.

Related

  • Publishing Flutter Packages to JFrog Artifactory
  • Wow, pnpm, You’re Really Fast
  • How To Approach Dependency Management in Java [Video]
  • Tarantool: Speeding Up Development With Rust

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook