FS2030 Invalid use of emitting a reference assembly : when compiling with VS 2022, .NET 7, F# 7
See original GitHub issueI 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:
- Created 10 months ago
- Comments:18 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The
ProduceReferenceAssembly
fix is released in v0.21.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.