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

nuget.config is ending up in my output directory #36198

Open
richlander opened this issue Oct 18, 2023 · 1 comment
Open

nuget.config is ending up in my output directory #36198

richlander opened this issue Oct 18, 2023 · 1 comment
Labels
Area-CLI untriaged Request triage from a team member

Comments

@richlander
Copy link
Member

I am building this app (in containers) and nuget.config is ending up in the output. I cannot tell why.

https://github.com/dotnet/dotnet-docker/tree/main/samples/releasesapi

I have tried other apps and it isn't happening. There must be some nuance that I cannot see.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-CLI untriaged Request triage from a team member labels Oct 18, 2023
@KalleOlaviNiemitalo
Copy link

There are **\*.config wildcards in some SDK files, like here:

<!-- When ExcludeConfigFilesFromBuildOutput is set, do not copy .,config, .json files to the build output directory. -->
<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'" />

Does the behaviour change if you add nuget.config to DefaultWebContentItemExcludes or to some other property referenced there? If so, perhaps it should be added by default.

I suppose this only affects projects that are still using nuget.config and have csproj and nuget.config in the same directory, rather than sln and nuget.config in an outer directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-CLI untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

2 participants