Skip to content

Avoid copying http-client.env.json to the output folder #50280

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Varorbc
Copy link

@Varorbc Varorbc commented Aug 15, 2025

@github-actions github-actions bot added the Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch label Aug 15, 2025
Copy link
Contributor

Thanks for your PR, @@Varorbc.
To learn about the PR process and branching schedule of this repo, please take a look at the SDK PR Guide.

@@ -40,6 +40,9 @@ Copyright (c) .NET Foundation. All rights reserved.
<Content Include="**\*.config" ExcludeFromSingleFile="true" CopyToPublishDirectory="PreserveNewest" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(DefaultWebContentItemExcludes)" Condition="'$(ExcludeConfigFilesFromBuildOutput)'=='true'" />
<Content Include="**\*.json" ExcludeFromSingleFile="true" CopyToPublishDirectory="PreserveNewest" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);$(DefaultWebContentItemExcludes)" Condition="'$(ExcludeConfigFilesFromBuildOutput)'=='true'" />

<!-- Avoid copying http-client.env.json to the output directory. -->
<Content Update="**\http-client.env.json" CopyToOutputDirectory="Never" CopyToPublishDirectory="Never" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these files actually need to be Content items? Could they be added to DefaultItemExcludes above, on line 25.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, I added it to DefaultItemExcludes, which resulted in the file not being visible in Vs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it can/should be a None item instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just throwing ideas around. Someone from the SDK team will know better.

@Varorbc
Copy link
Author

Varorbc commented Aug 18, 2025

@javiercn @halter73 Could you please help take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

http-client.env.json incorrectly copied to publish output directory
2 participants