C-Sharp

From Braindump
Revision as of 11:23, 11 October 2022 by Jan (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

https://learn.microsoft.com/en-us/nuget/what-is-nuget

dotnet --version
dotnet run
dotnet restore
dotnet publish -c Release -r win10-x64
bin\Release\net6.0\win10-x64

NUGET

NuGet is the package manager for .NET. The NuGet client tools provide the ability to produce and consume packages. The NuGet Gallery is the central package repository used by all package authors and consumers. https://learn.microsoft.com/en-us/nuget/quickstart/install-and-use-a-package-in-visual-studio

dotnet nuget locals all --clear

dotnet nuget list source
dotnet add package Microsoft.NETCore.App.Runtime.win-x64 --version 6.0.9
dotnet add package System.IO.Packaging --version 6.0.0


Powershell

Get-PackageSource
Install-Package Microsoft.NETCore.App.Runtime.win-x64
https://www.powershellgallery.com/
 <PropertyGroup>
   <OutputType>Exe</OutputType>
   <TargetFramework>net6.0</TargetFramework>
   <ImplicitUsings>enable</ImplicitUsings>
   <Nullable>enable</Nullable>
   <RuntimeIdentifier>win-x64</RuntimeIdentifier>
   <PublishSingleFile>true</PublishSingleFile>
   <SelfContained>true</SelfContained>
   <PublishReadyToRun>true</PublishReadyToRun>
 </PropertyGroup>