-
Notifications
You must be signed in to change notification settings - Fork 258
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
Please allow extension SDK manifests to light up for Windows Forms also #6440
Comments
@anangaur could you please take a look at this issue? |
/cc: @karann-msft |
Are there any updates on this? I've built several controls for Windows Forms and I need to have them automatically added to the Visual Studio Toolbox. |
Any updates on this? I am looking for this feature as well. |
I'm using Visual Studio 15.8 Preview 4 and I'm not sure what I'm seeing, but the toolbox is behaving very differently! Is work being done in 15.8 to discover Windows Forms toolbox items in package references? |
@karann-msft any news about this feature? It would be awesome to finally be able to share controls via NuGet (and have them in Toolbox). |
We did add support for WinForms in 15.8 (and fixed a few bugs in 15.9). However, it does not use the manifest but does it the traditional WinForms way showing all IComponent derived controls and using attributes to control the behavior: Hide Controls Category Name Tooltip Description |
@mgoertz-msft Even better than the manifest, I think! Thanks! I noticed that no icons are showing up in the toolbox for components discovered this way. Will that be fixed? |
No plans at the moment. Icon support will be a little harder since we don't actually load the assemblies and therefore cannot get to the embedded resources where the icons usually are. |
I see, too bad. Looks like you'd need https://github.com/dotnet/corefx/issues/23372. |
Yes, that would help. Of course I would need that on .NET Framework and not just Core. |
@mgoertz-msft thanks for the update, I'll try that right away. After adding a class that inherits Is this feature somewhere documented? Or maybe there is a sample NuGet package we can check as a reference? |
@mgoertz-msft I'm interested in the ability to keep design-time assemblies in the nupkg, both as a producer of multiple Windows Forms libraries and as a customer of DevExpress who I wish would also be able to use this. The company I work with has had issues with the design-time assemblies being resolved through If this isn't something you're already working on, may I open a new issue? |
@jnm2 thanks for the hint, now it works fine 😄 |
@Misiu Yes. So long as our Windows Forms projects require us to use the legacy csproj format and there's no way to set this in the csproj, you use the AssemblyInfo.cs file: // Shows up as company in Windows Explorer file properties
[assembly: AssemblyCompany("Misiu Corp.")]
// Shows up as product name in Windows Explorer file properties
[assembly: AssemblyProduct("Misiu.Controls")]
// Shows up as copyright in Windows Explorer file properties
[assembly: AssemblyCopyright("Copyright © 2018 Misiu Corp.")]
// Sets .NET assembly version and shows up as file version in Windows Explorer file properties
[assembly: AssemblyVersion("1.2.3")]
// Shows up as product version in Windows Explorer file properties
// Right now it's redundant because it defaults to AssemblyVersion, but I have a build script that
// modifies this one to 1.2.3+build.5678.commit.e6e24391d in CI.
[assembly: AssemblyInformationalVersion("1.2.3")]
// Shows up as Windows Explorer file description and as "Open with" description if this was an EXE
[assembly: AssemblyTitle("Misiu user interface components")] If you have multiple projects in your solution that ship to production, I'd suggest putting only |
@jnm2 I have all of those in my I want to add Not sue if this is possible when sharing controls via NuGet. |
Oh, I see. I'm not sure I can answer that. @mgoertz-msft? |
@jnm2, @mgoertz-msft could You take a look at this: https://github.com/dotnet/corefx/issues/23372#issuecomment-484481574? |
@Misiu Sorry, this had dropped off my radar. It looks like Version is already supported for NuGet assemblies but Company name is not. This is what shows up for the WebView control: @Misiu Just like with the icon request, I would suggest that you create a feedback ticket for this through VS so it gets tracked in our work item tracking system in VS. That way it can also get upvoted, which would increase the priority of this investigation. Please mention my name somewhere in the description or add the link here so I can find it and make sure it ends up in the right spot. |
@mgoertz-msft I've created a feature request for Company attribute: https://developercommunity.visualstudio.com/idea/539607/support-company-attribute-for-user-controls-instal.html Please moderate them if needed. Hopefully, this will be added at some point, ideally to VS2019 and VS2017. |
@Misiu Got them, thank you! No promises though on if or when these will be addressed but at least we have them in Visual Studio's tracking system now, which will notify you of any changes to these tickets. |
@mgoertz-msft , the .NET Framework assemblies are loaded in the Visual Studio 2019 toolbox when installing the NuGet package. But, the custom control is not configured in toolbox for .NET Core 3.0 WinForms application. Do we have the solution for this? |
Walking through this thread, are there any asks from NuGet that are not captured in other issues? |
Duplicate of https://github.com/dotnet/winforms-designer/issues/202. Please track that effort there. Thank you all. |
@nkolev92 https://github.com/dotnet/winforms-designer/issues/202 gives me a 404. Can there be a public thread to track, please? |
Oh my bad. |
The issue about icon support when a custom control .net framework is added via NuGet package is still here. I tested it with the latest versions of Visual Studio 2022 (17.7.3). Here is a ready-to-use sample project that can be used to reproduce the issue. |
There seems to be two errors in your screenshot:
See https://learn.microsoft.com/en-us/dotnet/desktop/winforms/controls-design/how-to-set-toolbox-icon?view=netdesktop-7.0 for reference. The steps are still the same since .NET Framework. |
@tbolon I tried the suggestions you provided, but unfortunately, it doesn't seem to be working. :( Please, have a look at the updated sample project here. P.S. In .Net Framework documentation, I cannot see any reference to "magenta as transparency color". |
My bad, displaying icons for controls inside nuget package is only supported when using the new out-of-proc designer. When using the legacy winforms designer, only the default icon will be used. |
No problem. Fact is that Microsoft stated that the issue was solved, but it's not so. |
The discussion linked is closed. I have tried to create a full summary of what is supported or not depending of the designer used, see my conclusions here: https://github.com/tbolon/winforms-playground/tree/main/ToolboxTests/PackageRefApps Perhaps we should create issues or feedback on VS hub to track these features? |
Great!
Already done here, but it was closed :( |
The toolbox can automatically display XAML controls from referenced NuGet packages via extension SDK manifests. It would be amazing if the same behavior lit up for Windows Forms projects too:
This current lack in Visual Studio has been an ongoing issue as my company has migrated from shared projects to NuGet packages for our own internal controls. I eventually came up with a workaround (detailed at #3509 (comment)) which does install tools into the toolbox automatically. It's not perfect but it's a lifesaver. It's a shame that we're forced to use such a dubious workaround though.
NuGet has recently become a popular distribution model for DevExpress's many Windows Forms controls as well. I've gathered that you worked with Telerik on the XAML control distribution model. The NuGet/toolbox work seems to be mostly done. It would make sense to afford the same convenience to DevExpress customers who use Windows Forms.
Would you please consider this?
The text was updated successfully, but these errors were encountered: