How to setup EditorAttribute to UITypeEditor in another file?


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I've written a UITypeEditor and it works when the editor lives in the same assembly (or one of the referenced assemblies) as the types using it. Then I can use something like:



[Editor(typeof(MyUIEditor), typeof(UITypeEditor))]

public MySpecialType SpecialType { get; set; }




However, I'd like to move this to a separate assembly, one that is not referenced by the assemblies with types that use it, because I don't want to have to distribute the code that is solely to for the VS designer. I know this can be done, as SF does this quite nicely. I've attempted to figure out how it was done (looked at SF code) and then I tried this:



[Editor("MyProject.Extensibility.MyUIEditor, MyProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e54367fa007b34d2", typeof(UITypeEditor))]

public MySpecialType SpecialType { get; set; }




with the extensibility assembly copied into the bin\debug folder with the main project. No joy.



How is this done? What am I missing? Can this be done if the assembly isn't strong-named?

Replies
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Trent L. Taylor (10/28/2009)
Testing them is actually really easy. All you need to do is set the DevEnv.exe as the debug program from your extensibility project. Then once the new devenv.exe instance is opened as part of the debug session, you open a project that you want to test. Then you can debug it just like you would anything else. Makes it super easy!




I'm a bit slow. This is like the 100th time this has been explained to me, but with this post, the light bulb finally went off. I had another question and Paul explained how to do this exact thing, but I didn't quite get it. Then I realized that I needed a separate solution for the extensibility project (duh!) (not strictly required, but then it is just setup and ready to go) and it all made more sense and I got it to work!



Here is Paul's post that explains how to actually do what Trent just said!



http://forum.strataframe.net/FindPost24961.aspx
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Greg McGuffey (10/28/2009)
I'm a bit slow. This is like the 100th time this has been explained to me...


Guess that comes with the aging process Smile



It is happening to me more frequently BigGrin

Edhy Rijo

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I prefer to think of my aging process as something more like fine wine, just getting better with age.... Tongue



My mother used to say senility was hereditary....you get it from your kids! I'm starting to believe her (I have a 13yr old daughter...and the gray hairs are multiplying!).



Oh, and fortunately, for y'all, no web cams were present during the jig!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search