Problem
With the following .csproj build settings to specify the assembly name, Rider will be failed to run the project in IDE.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyName>ConsoleApp1.Service</AssemblyName>
</PropertyGroup>
</Project>
The <AssemblyName> property specified with .Service causing the problem. It only impacts macOS users.
Cause
There is no known solution for the issue with dotnet runtime on Mac.
https://github.com/dotnet/runtime/issues/93716
Using dotnet run also causes the issue.
The binary can be executed directly without any problem after a successful build. The dotnet ConsoleApp1.Service.dll works.
Resolution
Prevent using *.Service naming style for assemblies on macOS.
or
Change the "Exe Path" in the corresponding Run/Debug configuration, referring to *.Service.dll as the executable.

Comments
0 comments
Please sign in to leave a comment.