Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to prevent http-client.env.json file copy to publish directory? #34212

Open
ahdung opened this issue Nov 26, 2024 · 2 comments
Open

How to prevent http-client.env.json file copy to publish directory? #34212

ahdung opened this issue Nov 26, 2024 · 2 comments
Assignees

Comments

@ahdung
Copy link

ahdung commented Nov 26, 2024

Description

CopyToPublishDirectory not working for this file.

<ItemGroup>
  <None Include="http-client.env.json" CopyToPublishDirectory="Never" />
</ItemGroup>

Page URL

https://learn.microsoft.com/en-us/aspnet/core/test/http-files?view=aspnetcore-9.0

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/test/http-files.md

Document ID

26f1374f-556a-35fc-cc42-b8911746db80

Article author

@tdykstra

Related Issues

@tdykstra
Copy link
Contributor

Did you try this in the project file:

<ItemGroup>
  <None Update="http-client.env.json">
    <CopyToPublishDirectory>Never</CopyToPublishDirectory>
  </None>
</ItemGroup>

And you can try setting file properties:

  • Right-click on the http-client.env.json file in Solution Explorer.
  • Select Properties.
  • Set the Copy to Output Directory option to Do not copy.

@ahdung
Copy link
Author

ahdung commented Nov 26, 2024

@tdykstra I tried, not working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants