Maria Adamsky
Maria Adamsky

Reputation: 19

How to use prism/unity for vspackage development since Bootstrapper is obsolete?

I create wpf application with Prism modularity. Now i'd like to create Visual Studio plugin(vspackage) while reusing UI part from previous app, aka using appropriate module from this app. I thought i could use Unity.Bootstrapper for it, but it seems to be obsolete and i guess deprecated in the future. What the way to load modules and use all Prism DI abilities in such case, when i don't have an app shell actually. Thanks.

Upvotes: 1

Views: 203

Answers (2)

Yann Duran
Yann Duran

Reputation: 3879

This is a great question!!! I'm still actively looking for solutions to this scenario myself.

The ONLY article that I've managed to find so far that addresses this is Dependency Injection For Visual Studio Extensions.

Although the article uses Autofac, I imagine would that the same principles contained in it would work for other IOC containers as well. It seems to work well enough in one of his extensions at least: Gist Manager, but I've yet to successfully retrofit the technique into my own extensions (yet).

Upvotes: 1

Maria Adamsky
Maria Adamsky

Reputation: 19

I already have read this answer, but it doe not help me, since my application starts not as usual WPF app, but as VSPackage and its entry point is AsyncPackage, a can't to call new App(), it throw exception "can not create a new application within existing app.domain".

Upvotes: 0

Related Questions