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.

Static linking: Understanding FS2009 warnings

See original GitHub issue

Please provide a succinct description of the issue.

Repro steps

  1. Clone https://github.com/VsVim/VsVim
  2. Checkout the branch dev/jaredpar/fs2009
  3. cd src\VimCore
  4. run dotnet build

Expected behavior

The build completes cleanly

Actual behavior

The build produces several FS2009 warnings

Microsoft (R) Build Engine version 17.2.0-preview-22152-03+719247ede for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.
FSC : warning FS2009: Ignoring mixed managed/unmanaged assembly 'System.Configuration.ConfigurationManager' during static linking [C:\Users\jaredpar\c 
ode\VsVim\Src\VimCore\VimCore.fsproj]
FSC : warning FS2009: Ignoring mixed managed/unmanaged assembly 'System.Security.Permissions' during static linking [C:\Users\jaredpar\code\VsVim\Src\ 
VimCore\VimCore.fsproj]
  VimCore -> C:\Users\jaredpar\code\VsVim\Binaries\Debug\VimCore\net472\Vim.Core.dll
  VimCore -> C:\Users\jaredpar\code\VsVim\Binaries\Debug\VimCore\net6.0\Vim.Core.dll

This project does link the FSharp runtime into the DLL which is likely the source of the FS2009 warnings. Unfortunately though I can’t find any information on what this warning is, how to mitigate it, etc … Looked in a number of places but coming up empty. Want to try and understand this warning so I can move forward with fixing this correctly vs suppressing and moving on.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jaredparcommented, May 6, 2022

A bit more detail. I noticed when looking at the binlog file that this warning is only happening when building the net6.0 target framework. The net472 target framework builds without any issues

0reactions
KevinRansomcommented, Jul 15, 2022

@jaredpar , just to follow up from our earlier chat. This is absolutely supported on the coreclr, if it weren’t then generative type providers would fail to work. We currently have a bug that adds an unnecssary reference, I haven’t tracked down where and why yet, but I am working on it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the meaning of "Warning: Linking the shared library ...
It tells you, that the operation you asked for will do different things on different systems and some of those things are probably...
Read more >
Static Linking - where did it go?
We've been warning users against static linking for some time now, and linking against libc.a has been especially problematic.
Read more >
i do not understand what's good about static linking
from what i had read, static linking is simply building the libraries into the end executable. and what i see from this is...
Read more >
Dynamic and static linking
Static linking means that the code for all routines called by your program becomes part of the executable file. On Blue Gene®/Q platforms,...
Read more >
Fsx engine sounds. FSX, P3D & X-Plane downloads ...
Fsx engine sounds. FSX, P3D & X-Plane downloads which include aircraft, scenery, and more - click here to view the library for free...
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