Closed eatenupme closed 2 weeks ago
Files that start with a . are excluded by default when you Pack the project. You can add the property NoDefaultExcludes to prevent that https://learn.microsoft.com/en-us/nuget/reference/cli-reference/cli-ref-pack#options.
Because I'm using the .NET CLI instead of NuGet, I haven't found an option to disable file exclusion. I used the renamefile to solve this issue, and it works for me.
Product
dotnet CLI (dotnet new)
Describe The Bug
When I create a custom project template, I need to add a .gitignore template to it. I have written the .gitignore file, but it does not appear in the generated files. I did not find any description of the .gitignore rules in the documentation.
To Reproduce
Steps:
vi template.csproj
dotnet Info
output
.NET SDK: Version: 8.0.105 Commit: eae90abaaf Workload version: 8.0.100-manifests.796a77f8 Runtime Environment: OS Name: ubuntu OS Version: 22.04 OS Platform: Linux RID: ubuntu.22.04-x64 Base Path: /usr/lib/dotnet/sdk/8.0.105/ .NET workloads installed: Workload version: 8.0.100-manifests.796a77f8 There are no installed workloads to display. Host: Version: 8.0.5 Architecture: x64 Commit: 087e15321b .NET SDKs installed: 8.0.105 [/usr/lib/dotnet/sdk] .NET runtimes installed: Microsoft.AspNetCore.App 8.0.5 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 8.0.5 [/usr/lib/dotnet/shared/Microsoft.NETCore.App] Other architectures found: None Environment variables: Not set global.json file: Not found Learn more: https://aka.ms/dotnet/info Download .NET: https://aka.ms/dotnet/downloadVisual Studio Version
No response
Additional context
No response