Relative Content

Tag Archive for c#nuget

How to create a custom nuget package in c#with source file as part of the package

i would linke to create a nuget package that allows me to add a file.cs during both install and restore phase of nuget package.
This file must be have as build action “C# Compiler”.
I’ve tryed different approach, but nothing succeded. I managed to copy file to the root of target project (as a link) but its build action is just “content”

Targeted frameworks guidance for library published to NuGet

Is there a consensus regarding which framework(s) a C# library should target when the goal is to publish it on NuGet and the author wants to reach developers who use “reasonably” up-to-date frameworks? In other words it’s safe to exclude outdated frameworks like net45, netstandard1.x, etc.