question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ApplicationIcon property doesn't work for F# projects when targeting Full .NET

See original GitHub issue

This works correctly for C# and VB.NET projects:

  1. dotnet new console -lang C# / dotnet new console -lang VB
  2. place any icon file (icon.ico) in the root directory
  3. in project file, change TargetFramework to net45 and add <ApplicationIcon>icon.ico</ApplicationIcon>
  4. dotnet build

The *.exe in bin/Debug/net45 has a proper icon set. If however you repeat the same steps above, but for F# (dotnet new console -lang F#) the icon is not set.


> dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.1.503
 Commit:    4c506e0f35

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17134
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.503\

Host (useful for support):
  Version: 2.1.7
  Commit:  cca5d72d48

.NET Core SDKs installed:
  2.1.202 [C:\Program Files\dotnet\sdk]
  2.1.503 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
peterhuenecommented, Jan 14, 2019

Can do.

0reactions
nguerreracommented, Feb 7, 2019

Duplicate of Microsoft/visualfsharp#3113

Read more comments on GitHub >

github_iconTop Results From Across the Web

Application Icon doesn't change correctly using c# - ...
First place · Right click on the project · Select Property · Go in Application Tabs · Choose Icon and Manifest and select...
Read more >
How to: Specify an application icon (Visual Basic, C#) - ...
Learn how to use the Icon property to specify the icon that File Explorer and the Windows taskbar displays for the compiled application....
Read more >
Troubleshoot .NET Framework targeting errors
Open Solution Explorer. · Select Show All Files. · Expand My Project (Visual Basic) or Properties (C#), and then edit the Resources.resx file...
Read more >
Getting Started With MAUI Xamarin Forms Application ...
In this article, you will learn about MAUI Xamarin Forms Application using Visual Studio 2019 Preview 16.10.
Read more >
Creating Executables and Components - - Users Guide
You can build many types of targets with PowerBuilder. For traditional client/server applications, you need to create an executable version of your target...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found