Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
theimowski opened this issue Jan 14, 2019 · 10 comments
Closed
Assignees
Milestone

Comments

@theimowski
Copy link

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]
@livarcocc
Copy link
Contributor

@peterhuene can you take a look?

@livarcocc livarcocc added this to the 3.0.1xx milestone Jan 14, 2019
@peterhuene
Copy link
Contributor

Can do.

@peterhuene peterhuene self-assigned this Jan 14, 2019
@nguerrera
Copy link
Contributor

cc @KevinRansom I seem to recall there was an issue in the F# compiler implementation on core where it wasn't writing win32 resources.

@theimowski
Copy link
Author

Do you have any update? I'd also highly appreciate any kind of workaround

@nguerrera
Copy link
Contributor

@KevinRansom I think this is a dupe of an F# bug. Can you comment?

@theimowski
Copy link
Author

/cc @cartermp

@cartermp
Copy link
Contributor

cartermp commented Feb 7, 2019

I don't know about this specifically. @KevinRansom was doing related work a while ago but I don't know if it was this or not. Can't find anything on our repo.

@livarcocc
Copy link
Contributor

Maybe we should move this issue to microsoft/visualfsharp?

@nguerrera
Copy link
Contributor

Found it: dotnet/fsharp#3113 (comment)

The application icon is just another win32 resource so it is the same issue for the assembly info as the icon.

@nguerrera
Copy link
Contributor

Duplicate of dotnet/fsharp#3113

@nguerrera nguerrera marked this as a duplicate of dotnet/fsharp#3113 Feb 7, 2019
enricosada added a commit to enricosada/Paket that referenced this issue Nov 28, 2019
to add icons with `fsc` it's possible to use native resources (like `<Win32Resource>paket.res</Win32Resource>`).
the `ApplicationIcon` property is not supported either ( ref dotnet/sdk#2818 ).

The `fsc` running on coreclr doesnt support yet native resources (ref dotnet/fsharp#1172 )

As workaround, a free tool (http://angusj.com/resourcehacker/) is used to add the icon after the exe is generated
wli3 pushed a commit that referenced this issue Feb 7, 2020
….6 (#2818)

- Microsoft.DotNet.Cli.Runtime - 3.1.100-preview1.19461.6
wli3 pushed a commit that referenced this issue Feb 7, 2020
…elease/3.1.1xx-to-master

* upstream/release/3.1.1xx: (603 commits)
  [release/3.0.1xx] Update dependencies from microsoft/vstest (#2809)
  Update dependencies from https://github.com/dotnet/cli build 20190911.11 (#2823)
  Update dependencies from https://github.com/dotnet/cli build 20190911.7 (#2819)
  Update dependencies from https://github.com/dotnet/cli build 20190911.6 (#2818)
  Update dependencies from https://github.com/aspnet/websdk build 20190911.2 (#2816)
  Update dependencies from https://github.com/dotnet/arcade build 20190910.3 (#2815)
  Update dependencies from https://github.com/dotnet/cli build 20190911.1 (#2807)
  Update dependencies from https://github.com/dotnet/fsharp build 20190910.5 (#2804)
  Update dependencies from https://github.com/dotnet/cli build 20190910.6 (#2803)
  Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190910.13 (#2802)
  Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190910.12 (#2801)
  Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190910.11 (#2800)
  Update dependencies from https://github.com/dotnet/cli build 20190910.5 (#2799)
  Update dependencies from https://github.com/aspnet/websdk build 20190910.5 (#2798)
  Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190910.5 (#2797)
  Update dependencies from https://github.com/dotnet/arcade build 20190910.3 (#2796)
  Update dependencies from https://github.com/dotnet/cli build 20190910.4 (#2794)
  Update dependencies from https://github.com/aspnet/websdk build 20190910.4 (#2795)
  Update dependencies from https://github.com/aspnet/AspNetCore-Tooling build 20190910.3 (#2793)
  [release/3.0.1xx] Update dependencies from aspnet/AspNetCore-Tooling (#2759)
  ...

Conflicts:
eng/Version.Details.xml
eng/Versions.props
eng/common/native/install-cmake-test.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants