Skip to content

File linked to .NET core project gets removed from the project when the BuildAction is set to AdditionalFiles from None. #1149

Closed
@aakash-johari

Description

@aakash-johari

Scenario:

  1. Create a .NET core project and have a file linked to the project which has BuildAction=None.
  <ItemGroup>
    <None Include="..\abc\xyz.txt">
      <Link>xyz.txt</Link>
    </None>
  </ItemGroup>

Adding a link from Visual Studio 2017 doesn't seem to be possible. It makes a copy of the file in the project folder. So I edited the .csproj file. In our scenario we don't want to make duplicates of the file.

  1. From Visual Studio, change the BuildAction to AdditionalFiles. The file disappears from the project.

ConsoleApp1.csproj

Metadata

Metadata

Assignees

Labels

Area-External-CPSOwned by CPS and not this repo. Likely be closed in lieu of issue filed against VS platform.

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions