Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1441,10 +1441,6 @@ Copyright (c) .NET Foundation. All rights reserved.
<RunCommand Condition="'$(RunCommand)' == ''">$(TargetPath)</RunCommand>
<RunArguments Condition="'$(RunArguments)' == ''">$(StartArguments)</RunArguments>
</PropertyGroup>
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After removing mono support, when users try to run .NET Framework applications on non-Windows platforms, the RunCommand property will be empty, which will cause a generic error message. Consider adding a PropertyGroup block that sets a more helpful error message or detection for this unsupported scenario. The current implementation will result in the error from RunCommand.ThrowUnableToRunError, but it would be more user-friendly to have a specific message explaining that .NET Framework applications can only be run on Windows and suggesting alternatives like upgrading to .NET or using Windows.

Suggested change
</PropertyGroup>
</PropertyGroup>
<PropertyGroup Condition="'$([MSBuild]::IsOSPlatform(`Windows`))' != 'true' and '$(RunCommand)' == '' and '$(RunCommandErrorMessage)' == ''">
<RunCommandErrorMessage>.NET Framework applications can only be run on Windows. To run this application, use a Windows machine or upgrade to .NET.</RunCommandErrorMessage>
</PropertyGroup>

Copilot uses AI. Check for mistakes.
<PropertyGroup Condition="$([MSBuild]::IsOSUnixLike())">
<RunCommand Condition="'$(RunCommand)' == ''">mono</RunCommand>
<RunArguments Condition="'$(RunArguments)' == ''">&quot;$(TargetPath)&quot; $(StartArguments)</RunArguments>
</PropertyGroup>
</When>
</Choose>

Expand Down