Add deleted files when publishing ASP.NET Core

Asked

Viewed 97 times

0

In my Asp.Net Core project I have some deleted files from the project.

inserir a descrição da imagem aqui

Only when I publish these files do not appear in the wwwroot folder of the project.

<ItemGroup>
  <None Include="wwwroot\Features\**" CopyToOutputDirectory="Always" />
  <!-- CopyToOutputDirectory = { Always, PreserveNewest, Never } -->

  <Content Include="wwwroot\Features\**" CopyToPublishDirectory="Never" />
  <None Include="wwwroot\Features\**" CopyToPublishDirectory="Never" />
  <!-- CopyToPublishDirectory = { Always, PreserveNewest, Never } -->
</ItemGroup>

With this code I tried to add those files while publishing but it didn’t work.

inserir a descrição da imagem aqui

NOTE: This folder cannot be visible in the project, but must be published.

Can anyone help me or tell me what I’m doing wrong?

  • I did not understand why these files cannot be visible... if they are not part of your solution you should not carry out your publication during the project’s Publish...

  • Because I use the CQS standard where this Insert.js file is inside the Features folder, and in order not to generate dependency and stay with the unified files I made a copy using Libman into wwwroot, so just publish.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.