Repository navigation
Description
Describe the bug
File-based apps produce a different artifacts output layout comparing to normal projects when <UseArtifactsOutput> is enabled.
For a regular project, the project name is included in the artifacts path: artifacts/bin/MyProject/debug/.
For a file-based app, the project name/directory is omitted: artifacts/bin/debug/.
This cause multiple file-based apps using the same ArtifactsPath to share the same output directory, which is bad from both aesthetic and practical sides.
Steps to reproduce
I created a repository for easy issue reproduction: https://github.com/iikuzmychov/dotnet-file-based-app-artifacts-path-issue-repro.
Expected behavior
For a file-based app, I would expect the artifacts path look smth like this: artifacts/bin/FileBasedApp-cs/debug.
Actual behavior
For a file-based app, the artifacts path look like this: artifacts/bin/debug/.
Is this a regression?
No response
Are there any workarounds?
No response
dotnet --info output
PS C:\Users\iikuzmychov\source\repos\dotnet-file-based-app-artifacts-path-issue> dotnet --info
.NET SDK:
Version: 10.0.302
Commit: 35b593bebf
Workload version: 10.0.300-manifests.714b12c0
MSBuild version: 18.6.11+35b593beb
Runtime Environment:
OS Name: Windows
OS Version: 10.0.26200
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.302\
.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.
Host:
Version: 11.0.0-preview.4.26230.115
Architecture: x64
Commit: 4370ea1634
.NET SDKs installed:
10.0.103 [C:\Program Files\dotnet\sdk]
10.0.201 [C:\Program Files\dotnet\sdk]
10.0.302 [C:\Program Files\dotnet\sdk]
11.0.100-preview.4.26230.115 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 10.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 11.0.0-preview.4.26230.115 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 11.0.0-preview.4.26230.115 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 8.0.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 11.0.0-preview.4.26230.115 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Invalid [C:\Users\iikuzmychov\source\repos\dotnet-file-based-app-artifacts-path-issue\global.json]
Version '10.0.0' is not valid for the 'sdk/version' value. SDK feature bands start at 1 - for example, 10.0.100
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/downloadIDE version
No response
Other details
No response
Activity
github-actions commentedon Aug 9, 2026
🎯 Agentic Issue Triage
Triage Assessment:
@dsplaisted|@dotnet/dotnet-clihigh- Issue clearly describes a file-based app artifact path bug in the run-file area.➡️ Summary: File-based apps with
UseArtifactsOutputenabled produce an output path missing the project name, causing output directory collisions. Review the file-based app build targets to include the file name in the artifacts path segment.jjonescz commentedon Aug 10, 2026
I had a PR for this that got stale: #49863. I will try to reopen it.
jjonescz commentedon Aug 11, 2026
FYI, I think you can work around this in the meantime by setting property
IncludeProjectNameInArtifactsPaths=trueinDirectory.Build.props(or wherever you are settingUseArtifactsOutput).iikuzmychov commentedon Aug 13, 2026
@jjonescz Thanks for fixing!