-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
.NET 7.0 RC2 breaks MVC build where a view references an F# model #44749
Comments
I'm not sure if this is the proper repository for this issue. If not, will you please give me a pointer to the correct one? Thanks! |
@jaredpar This looks like it may be a compiler issue? I'm able to reproduce this with just a normal debug build. It looks like the |
@danroth27 at a glance I'd say it's a dupe of dotnet/fsharp#14088 @KevinRansom @vzarytovskii to confirm |
The issue was related to the reference assemblies. I will move this one to the F# repo and take a look at it. Update: on a second thought - looks like the same issue. The fix to was pushed and inserted into .NET7. |
Thanks for response! I can confirm that the suggested workaround resolved the issue for me.
Does that mean the fix will be available in .NET7 RTM next month? |
Yep |
Great. Thank you! |
Is there an existing issue for this?
Describe the bug
I have an existing C# ASP.NET Core MVC application that references an F# class library. The F# library exposes several record types that the MVC application consumes directly. The view model class has a reference to one of these F# records and tries to display it in the corresponding view.
F# record:
C# view model:
ASP.NET Core MVC Razor view (.cshtml):
The application has built and functioned correctly for years, including with .NET SDK
6.0.402
. However, when I switched to .NET SDK7.0.100-rc.2.22477.23
and updated the nuget packages and project TFMs accordingly, the MVC project no longer compiles in Release mode.My environment:
Expected Behavior
The solution should continue to build without errors, as it has with .NET SDK
6.0.402
and prior releases.Steps To Reproduce
I have created a solution to reproduce the issue, along with a README that details the steps to reproduce:
https://github.com/jonsagara/CSharpWebAppWithFSharpModel
Exceptions (if any)
No response
.NET Version
7.0.100-rc.2.22477.23
Anything else?
dotnet --info
The text was updated successfully, but these errors were encountered: