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.

FS2030 Invalid use of emitting a reference assembly : when compiling with VS 2022, .NET 7, F# 7

See original GitHub issue

I get this error when I try to compile with VS 2022 Preview latest just installed, .NET 7 and F# 7. It happens in all my Bolero client projects, including latest version of Bolero.

FS2030 Invalid use of emitting a reference assembly, do not use '--staticlink', or '--refonly' and '--refout' together.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:18 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Tarmilcommented, Feb 18, 2023

The ProduceReferenceAssembly fix is released in v0.21.

1reaction
r-dahlstedt-linux-guycommented, Nov 10, 2022

The error you started the issue with relates to using net7.0 as the target framework. If you simply revert the target framework back to net6.0 (which is the default when creating a new Bolero project) using the .NET 7.0 toolchain as well as the .NET 6.0 runtime it works just as it always did under .NET 6.0. The desire to generate or not generate a reference assembly by default only seems to be an issue if the target framework is net7.0. Whether this is a nuance of using .NET 7.0 or something needs to be changed in Bolero is more capably handled by others but if either yourself or others want to use .NET 7.0 it can be used but you likely should not yet target the .NET 7.0 runtime for Bolero even if the TodoMVC might work as something may not work precisely the way it had.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FS2030 Invalid use of emitting a reference assembly
I get this error when I try to compile with VS 2022 Preview latest just installed, .NET 7 and F# 7. It happens...
Read more >
Visual Studio 2022 assembly references missing
When trying to use vs2022, starting a new project or loading a project that works in 2019, no references are loading.
Read more >
Cannot add assembly in VS 2022 C# - Microsoft Q&A
net windows forms (winforms) app) with C# filter. I loaded code from an existing project from VS 2019. It was public Microsoft.Data.SqlClient.
Read more >
MSB3277: Found conflicts between different versions of ' ...
This error occurs during a build when more than one version of the same dependent assembly is referenced in a build of the...
Read more >
MSB3644: The reference assemblies for 'version' were not ...
This error occurs when the .NET reference assemblies aren't found for the version of .NET that a project requests.
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