I have a simple library that has two content files. Readme.txt and SomeOtherFile.txt. What i am trying to achieve is to show the Readme.txt during the NuGet package installation on the target project and also copy the SomeOtherFile.txt to the target project.
Currently only the opening of Readme.txt is working. The SomeOtherFile.txt is not copied or it creates a link instead of actual file.
Here is the .csproj
for the Library:
<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><TargetFramework>netstandard2.0</TargetFramework><GeneratePackageOnBuild>True</GeneratePackageOnBuild><Version>1.0.6</Version></PropertyGroup><ItemGroup><Content Include="ReadMe.txt"><Pack>True</Pack><PackagePath>\</PackagePath></Content><Content Include="SomeOtherFile.txt"><CopyToOutputDirectory>Always</CopyToOutputDirectory><CopyToPublishDirectory>Always</CopyToPublishDirectory></Content></ItemGroup></Project>
I have also tried to use Pack = false
and PackagePath = \
for SomeOtherFile.txt but it didn't work.
What i get is a shortcut in the target app:C:\Users\Admin.nuget\packages\demoapp.amazinglibrary\1.0.6\contentFiles\any\netstandard2.0\SomeOtherFile.txt
I want a copy to the project files.