Using Visual Studio 2019, I have an sdk project, generating a .net 4.8 assembly. I am using Nuget 5.11.0.10.
I want to include .cs files in the project so when I add a nuget package to a project it adds the reference to the nuget assembly but also ads the .cs to the root
I've tried putting my .cs files in content, contentFiles, contentFiles\any\any
When add a reference to my nuget package, it adds the .cs files to my project, but it puts then in either content, contentFiles, contentFiles\any\any, depending on how I had set up the nuget project. How do I get the files to deploy to root?
The relevant part of my csproj file looks like this:
<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup Label="Globals"><SccProjectName>SAK</SccProjectName><SccProvider>SAK</SccProvider><SccAuxPath>SAK</SccAuxPath><SccLocalPath>SAK</SccLocalPath></PropertyGroup><PropertyGroup><TargetFramework>net48</TargetFramework><PackageId>mytest</PackageId> ...<PackageReadmeFile>readme.md</PackageReadmeFile></PropertyGroup><ItemGroup><Content Include="contentFiles\any\any\Test2.cs" /><Content Include="content\Test1.cs" /><Content Include="readme.md"><Pack>true</Pack><PackagePath>\</PackagePath><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></Content></ItemGroup><ItemGroup> <Reference Include="System" /><Reference Include="System.Core" /><Reference Include="System.Drawing" /><Reference Include="System.Xml.Linq" /><Reference Include="System.Data.DataSetExtensions" /><Reference Include="Microsoft.CSharp" /><Reference Include="System.Data" /><Reference Include="System.Net.Http" /><Reference Include="System.Xml" /></ItemGroup></Project>