what is major difference between dotnet publish and dotnet pack

dotnet pack – Produces a NuGet package of your code. That is the key difference – this will enable to publish to http://nuget.org, or to a nuget server that can be pulled down by other developers, or even for use with Octopus Deploy. dotnet publish – Produces a .NET framework-dependent or self-contained application. Keyword is … Read more

How do you add additional files to a NuGet package in Visual Studio 2017?

I have now changed my project file again, so it now reads: <Project Sdk=”Microsoft.NET.Sdk”> <PropertyGroup> <TargetFramework>net45</TargetFramework> <GeneratePackageOnBuild>True</GeneratePackageOnBuild> <Authors>Nikki Locke</Authors> <Company>Trumphurst Ltd</Company> <Description>Easy to use web server for building web apps that use sql databases generated from c# classes</Description> <Copyright>2017 Trumphurst Ltd.</Copyright> <PackageProjectUrl>https://github.com/nikkilocke/CodeFirstWebFramework</PackageProjectUrl> <RepositoryUrl>https://github.com/nikkilocke/CodeFirstWebFramework</RepositoryUrl> <RepositoryType>Github</RepositoryType> <PackageTags>C# SQL Code First Web Server</PackageTags> </PropertyGroup> <ItemGroup> <PackageReference Include=”Markdig” Version=”0.12.1″ … Read more

References from class library are not copied to running project bin folder

Explanation For a sample scenario let’s say we have project X, assembly A, and assembly B. Assembly A references assembly B, so project X includes a reference to both A and B. Also, project X includes code that references assembly A (e.g. A.SomeFunction()). Now, you create a new project Y which references project X. So … Read more

Error NU5012 – nuget pack unable to find path (/bin/release/MyProject/bin/release)

TL;DR For the new <Project Sdk=”Microsoft.NET.Sdk”> .csproj file format, use dotnet pack to build NuGet packages, even if they target .Net Framework or if the project is multi-targeted. Run this from the directory containing your .csproj (and optionally a .nuspec) dotnet pack MyProject.csproj -c Release Note that by default dotnet pack places the output .nupkg … Read more

Download Nuget Packages Without VS/NuGet Package Manager

How to download NuGet Package without Visual Studio or Nuget Package Manager: Search your desired package at NuGet Official Site. Copy the end of the URL of the package page. For Example: http://nuget.org/packages/EntityFramework => Package Name is “EntityFramework” Enter the URL: http://packages.nuget.org/api/v1/package/{Package Name} For Example: http://packages.nuget.org/api/v1/package/EntityFramework

Git submodules vs Nuget packages [closed]

I prefer using submodules over Nuget packages for frequently changing internal libraries. Here’s why: Merging: If several developers make changes to the same library at the same time, with submodules, these changes can be merged. With Nuget packages, obviously there’s no concept of merging. Less wait: With submodules, you push, and then pull with whatever … Read more

NuSpec version attribute vs assembly version

With regards to convention, the NuGet software itself, and the semantics it applies to packages in the gallery, does versioning as described by SemVer. Specifically you can designate beta versions by suffixing your nuspec version number with “-beta.4” or something. For example, see how the gallery displays the latest version of AutoFac, and compare how … Read more

tech