-
Notifications
You must be signed in to change notification settings - Fork 984
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
[Regression] Designer fails to load with multi target frameworks. #12297
Comments
@LeafShi1 this is not my repro app on the screen. |
Designer fail to load only with: And this issue related to the version of the package This problem has occurred since version 1.9.2, @kirsan31 you can consider using 1.9.1 in your project |
Nice catch - thank you! 🙏 I am a maintainer of We have:
So the bug appears only if package support multiple tfms including <ItemGroup>
<PackageReference Include="WinForms.DataVisualization" Version="1.9.2" />
</ItemGroup> And designer fail to load with the same error. So I think we have here some sort of very interesting bug 🤔 P.s. I've tried to build package with updated |
@Tanya-Solyanik @merriemcgaw This issue also related to multitarget, should we investigate further? |
Yes, please. Search the designer repo issues to see if we have a duplicate please. |
There are 2 multi target issues in designer repo, but they are not the same |
To make sure I've got the right of it - what we're seeing is that if we're targeting net8.0-windows first of multiple tfms and reference the DataVis 1.9.2 component we have the problem. Otherwise, we're seeing generally the right behavior? |
I can't be 100% sure, but most likely it sounds like this: If we're targeting net8.0-windows first of multiple tfms and reference the user component that support multiple tfms and out of process designer - we have the problem. Otherwise, we're seeing generally the right behavior. In this case designer tring to load wrong dependencys : NullableContextAttribute version 7, but it was introduced only in .Net8. So the problem not in .net8, we just caught this bug on net8 because earlier versions didn't have the NullableContextAttribute and we crashed. |
Great explanation @kirsan31 thanks! |
I'm going to go ahead and close this since we've got an internal issue tracking it now. @kirsan31 we'll reach out or reply on this issue when we have an update. I'm creating an internal item to review multi-targeting in general to do a deep dive and make sure we support as much as we can. |
Environment
17.11.5
.NET version
.Net8 and .Net9
Did this work in a previous version of Visual Studio and/or previous .NET release?
Yes in .Net 7 and .Net 6.
Issue description
Designer fail to load with:
<TargetFrameworks>net8.0-windows;net7.0-windows</TargetFrameworks>
But load normally with:
<TargetFrameworks>net8.0-windows</TargetFrameworks>
<TargetFrameworks>net7.0-windows;net8.0-windows</TargetFrameworks>
Detailed analysis in this comment.
Steps to reproduce
DesignerFail.zip
Form1.cs
form in designer - will see an error.Modify
DesignerFail.csproj
to -<TargetFrameworks>net8.0-windows</TargetFrameworks>
or<TargetFrameworks>net7.0-windows;net8.0-windows</TargetFrameworks>
and restart VS.Try to open
Form1.cs
form in designer - the designer will open normally.Diagnostics
The text was updated successfully, but these errors were encountered: