Open
Description
Projects whose assembly name is the same as culture name (cs
, de
, es
, fr
, it
, ja
, ko
, pl
, pt-BR
, ru
, tr
, zh-Hans
, zh-Hant
) fail to build on Unix system with error
sdk/10.0.100-ci/Microsoft.Common.CurrentVersion.targets(5381,5):
error MSB3024: Could not copy the file "cs/obj/Debug/net10.0/apphost"
to the destination file "bin/Debug/net10.0/cs", because the destination is a folder instead of a file.
To copy the source file into a folder, consider using the DestinationFolder parameter instead of DestinationFiles.
This is because the apphost file is named as $(AssemblyName)$(_NativeExecutableExtension)
and $(_NativeExecutableExtension)
is empty:
Repro:
dotnet new console -o cs
cd cs
dotnet add package Microsoft.CodeAnalysis.CSharp
dotnet build
(adding package that deploys resource files)
This is a low pri corner case but it'd be nice to report a better error.
Might be somewhat more interesting for project-less apps (dotnet run it.cs
).