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 copy to publish directory? #59154

Open
ahdung opened this issue Nov 26, 2024 · 1 comment
Open

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

ahdung opened this issue Nov 26, 2024 · 1 comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates

Comments

@ahdung
Copy link

ahdung commented Nov 26, 2024

VS 2022 17.11.5
asp.net core webapi .net8.0 project

I make a http-client.env.json file in my project, see docs, then .csproj become this:

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

and after I published project, this file appears in publish directory, I don't want it, I tried change .csproj to:

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

Not working, please help.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Nov 26, 2024
@ahdung
Copy link
Author

ahdung commented Nov 26, 2024

also tried:

<None Update="http-client.env.json">
  <CopyToPublishDirectory>Never</CopyToPublishDirectory> (or CopyToOutputDirectory)
</None>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Projects
None yet
Development

No branches or pull requests

1 participant