Skip to content
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

Custom Component Designer (RootDesigner) not working with projects targeting > netcoreapp3.1 #23

Closed
valiahmetovv opened this issue Aug 8, 2023 · 6 comments

Comments

@valiahmetovv
Copy link

valiahmetovv commented Aug 8, 2023

Environment
Visual Studio Version 17.7.0 Preview 6.0
OS Version WIN 11

Steps to reproduce the problem:

Unzip attached archive
CustomComponentDesigner.zip
Build solution projects all except Package and TestProjNetCore31
Build Package project - note that a nuget package will appear in folder …\CustomComponentDesigner\Package\bin\Debug
Add nuget package source and point it to the above mentioned folder
Build TestProjNetCore31

Actuall problem:
1.Go to TestProjNet462
2.Find TestObj.cs , right click and choose “View Designer”, you should see a blue screen as illustrated below:
image

Go to TestProjNetCore31
4.Find TestObj.cs , right click and choose “View Designer”, instead of designer, an error is shown:
image
Expected: same result as in step 2.

Notes:
Attached solution is an attempt to make custom component designers work using the new out-of-process designer approach.

Take a look at TestObj.cs inside Component project, you will notice that this object is assigned with a Designer attribute:
[Designer(“ExtensionExample.TestObjDesigner, ServerDesigner”, typeof(IRootDesigner))]

The designer implementation is just a stub view, which can be found in projects:DesignerNet462 and DesignerNetCore31, both implementations are mostly the same except that they target different .net versions.

Since VS is a net472 process, the TestProjNet462 project loads the custom designer without any issues.

TestProjNetCore31 targets netcore3.1 app, so it uses the Out-of-proc approach when opening custom controls and components.

cc @merriemcgaw @KlausLoeffelmann

Please reply if custom component designers are supported by latest Microsoft.WinForms.Designer.SDK
If yes, then please assist with making attached project work as expected.

If not, please let me know if such functionality will be supported in near future

@valiahmetovv valiahmetovv changed the title Custom Component Designer not working with projects targeting > netcoreapp3.1 Custom Component Designer (RootDesigner) not working with projects targeting > netcoreapp3.1 Aug 8, 2023
@KlausLoeffelmann
Copy link
Member

Hey @valiahmetovv,

let me take a look at it and come back to you.
Principally, Core 3.1 should be working just fine.

@KlausLoeffelmann
Copy link
Member

KlausLoeffelmann commented Aug 8, 2023

Oh, I just saw. This is about custom root designers, not about custom type editors.

We are working on the first iteration of the API for custom root designers, but while your general approach is absolutely correct, you will need a new (Beta) SDK for that. We are aiming for Visual Studio 17.8 Preview 2 for the release of that Beta SDK.

@valiahmetovv
Copy link
Author

Hi @KlausLoeffelmann.
Thank you for prompt reply, looking forward to Visual Studio 17.8 Preview 2 release.

@KlausLoeffelmann
Copy link
Member

Slipped to Preview 3, but we're preparing a new Preview SDK shortly.
Closing this for now.

@valiahmetovv
Copy link
Author

Hello @KlausLoeffelmann,
As i understand Preview 3 should be available soon, so i wanted to clarify if root designers support is going to be included in this release.

@Bitcosoftware
Copy link

Why was this closed? This hasn't been addressed and not fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants