Can we have one .exe calling a .dll with XAML and Prism (for MVVM)?Composite WPF (Prism) module resource data templatesHow to use DataTemplates in PrismCreating WPF ResourceDictionary from code doesn't seem to work when setting ResourceDictionary.SourceMVVM separate assemblies Visual Studio: What should I choose as the project types?Resolve ViewModels in separated assembly with ViewModelLocator in Prism 6Compatibility issue with Expression.Blend.Sdk 1.0.2 System.Windows.Interactivity.dllPrismDryIoc.Forms AutowireViewModel not workingConfigureViewModelLocator to bind views in different assemblysBind ViewModel to XAML View in Prism.FormsPrism region not changing in content region - WPF

Divide Numbers by 0

Displaying Time in HH:MM Format

Colored grid with coordinates on all sides?

How could reincarnation magic be limited to prevent overuse?

From not IT background to being a programmer

Should we run PBKDF2 for every plaintext to be protected or should we run PBKDF2 only once?

Is there anything in the universe that cannot be compressed?

Killing task by name - start menu shortcut

Why do modes sound so different, although they are basically the same as a mode of another scale?

How can I improve my formal definitions?

Polarity of gas discharge tubes?

Squares inside a square

Single vs Multiple Try Catch

Could a simple hospital oxygen mask protect from aerosol poison?

How do you manage to study and have a balance in your life at the same time?

Can users with the same $HOME have separate bash histories?

Ideas behind the 8.Bd3 line in the 4.Ng5 Two Knights Defense

Correct way of simplifying the result of an integral

D Scale Question

What happens if you just start drawing from the Deck of Many Things without declaring any number of cards?

What are the electrical characteristics of a PC gameport?

When you have to wait for a short time

Why is Mitch McConnell blocking nominees to the Federal Election Commission?

Given a specific computer system, is it possible to estimate the actual precise run time of a piece of Assembly code



Can we have one .exe calling a .dll with XAML and Prism (for MVVM)?


Composite WPF (Prism) module resource data templatesHow to use DataTemplates in PrismCreating WPF ResourceDictionary from code doesn't seem to work when setting ResourceDictionary.SourceMVVM separate assemblies Visual Studio: What should I choose as the project types?Resolve ViewModels in separated assembly with ViewModelLocator in Prism 6Compatibility issue with Expression.Blend.Sdk 1.0.2 System.Windows.Interactivity.dllPrismDryIoc.Forms AutowireViewModel not workingConfigureViewModelLocator to bind views in different assemblysBind ViewModel to XAML View in Prism.FormsPrism region not changing in content region - WPF






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















My question is this: How can I call a library project (DLL) that contains all my XAML (Views) and ViewModel classes from another project that is meant to only run as an "EXE"? (I want to use Prism 7 for MVVM purposes).



My intent is to have one project whose only purpose is to create an .EXE. This EXE will load the assembly where the actual WPF views and the viewmodels reside.



Ideally, I'd like to have App.xaml in the EXE project... But I want to have my Bootstrapper in the Assembly project... Is this possible with Prism 7?



I want to have an App.xaml in "Company.Product.Application" project (which produces an EXE):



 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Company.Product.Application"
xmlns:Presentation="clr-namespace:Company.Product.Presentation;assembly=Product.Presentation"
DispatcherUnhandledException="Application_DispatcherUnhandledException"
xmlns:prism="http://prismlibrary.com/">
<Application.Resources>
<ResourceDictionary>
<Presentation:AppBootstrapper x:Key="Bootstrapper" />
</ResourceDictionary>
</Application.Resources>




Then from my Bootstrapper, I want to load my IoC and create my views and viewmodels.



I have been able to accomplish this with Caliburn.Micro... The idea here is that "Company.Product.Presentation" DLL can be tested out without having to create an EXE in itself. I could add the reference to "Presentation" in my test project (NUnit) and test it independently. The EXE is just a project that calls on "Company.Product.Presentation" DLL to actually generate Graphical User Interface goodness.



I appreciate any insight you may have in regards to this question. Thanks!










share|improve this question






























    0















    My question is this: How can I call a library project (DLL) that contains all my XAML (Views) and ViewModel classes from another project that is meant to only run as an "EXE"? (I want to use Prism 7 for MVVM purposes).



    My intent is to have one project whose only purpose is to create an .EXE. This EXE will load the assembly where the actual WPF views and the viewmodels reside.



    Ideally, I'd like to have App.xaml in the EXE project... But I want to have my Bootstrapper in the Assembly project... Is this possible with Prism 7?



    I want to have an App.xaml in "Company.Product.Application" project (which produces an EXE):



     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Company.Product.Application"
    xmlns:Presentation="clr-namespace:Company.Product.Presentation;assembly=Product.Presentation"
    DispatcherUnhandledException="Application_DispatcherUnhandledException"
    xmlns:prism="http://prismlibrary.com/">
    <Application.Resources>
    <ResourceDictionary>
    <Presentation:AppBootstrapper x:Key="Bootstrapper" />
    </ResourceDictionary>
    </Application.Resources>




    Then from my Bootstrapper, I want to load my IoC and create my views and viewmodels.



    I have been able to accomplish this with Caliburn.Micro... The idea here is that "Company.Product.Presentation" DLL can be tested out without having to create an EXE in itself. I could add the reference to "Presentation" in my test project (NUnit) and test it independently. The EXE is just a project that calls on "Company.Product.Presentation" DLL to actually generate Graphical User Interface goodness.



    I appreciate any insight you may have in regards to this question. Thanks!










    share|improve this question


























      0












      0








      0








      My question is this: How can I call a library project (DLL) that contains all my XAML (Views) and ViewModel classes from another project that is meant to only run as an "EXE"? (I want to use Prism 7 for MVVM purposes).



      My intent is to have one project whose only purpose is to create an .EXE. This EXE will load the assembly where the actual WPF views and the viewmodels reside.



      Ideally, I'd like to have App.xaml in the EXE project... But I want to have my Bootstrapper in the Assembly project... Is this possible with Prism 7?



      I want to have an App.xaml in "Company.Product.Application" project (which produces an EXE):



       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="clr-namespace:Company.Product.Application"
      xmlns:Presentation="clr-namespace:Company.Product.Presentation;assembly=Product.Presentation"
      DispatcherUnhandledException="Application_DispatcherUnhandledException"
      xmlns:prism="http://prismlibrary.com/">
      <Application.Resources>
      <ResourceDictionary>
      <Presentation:AppBootstrapper x:Key="Bootstrapper" />
      </ResourceDictionary>
      </Application.Resources>




      Then from my Bootstrapper, I want to load my IoC and create my views and viewmodels.



      I have been able to accomplish this with Caliburn.Micro... The idea here is that "Company.Product.Presentation" DLL can be tested out without having to create an EXE in itself. I could add the reference to "Presentation" in my test project (NUnit) and test it independently. The EXE is just a project that calls on "Company.Product.Presentation" DLL to actually generate Graphical User Interface goodness.



      I appreciate any insight you may have in regards to this question. Thanks!










      share|improve this question














      My question is this: How can I call a library project (DLL) that contains all my XAML (Views) and ViewModel classes from another project that is meant to only run as an "EXE"? (I want to use Prism 7 for MVVM purposes).



      My intent is to have one project whose only purpose is to create an .EXE. This EXE will load the assembly where the actual WPF views and the viewmodels reside.



      Ideally, I'd like to have App.xaml in the EXE project... But I want to have my Bootstrapper in the Assembly project... Is this possible with Prism 7?



      I want to have an App.xaml in "Company.Product.Application" project (which produces an EXE):



       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="clr-namespace:Company.Product.Application"
      xmlns:Presentation="clr-namespace:Company.Product.Presentation;assembly=Product.Presentation"
      DispatcherUnhandledException="Application_DispatcherUnhandledException"
      xmlns:prism="http://prismlibrary.com/">
      <Application.Resources>
      <ResourceDictionary>
      <Presentation:AppBootstrapper x:Key="Bootstrapper" />
      </ResourceDictionary>
      </Application.Resources>




      Then from my Bootstrapper, I want to load my IoC and create my views and viewmodels.



      I have been able to accomplish this with Caliburn.Micro... The idea here is that "Company.Product.Presentation" DLL can be tested out without having to create an EXE in itself. I could add the reference to "Presentation" in my test project (NUnit) and test it independently. The EXE is just a project that calls on "Company.Product.Presentation" DLL to actually generate Graphical User Interface goodness.



      I appreciate any insight you may have in regards to this question. Thanks!







      prism






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 28 at 0:29









      lvar82lvar82

      1




      1

























          1 Answer
          1






          active

          oldest

          votes


















          0
















          But I want to have my Bootstrapper in the Assembly project... Is this possible with Prism 7?




          Sure, just reference the dll with the bootstrapper from the exe and put something like this in App.xaml.cs:



          protected override void Onstartup(StartupEventArgs e)

          base.OnStartup(e);
          var bootstrapper = new Company.Product.Presentation.Bootstrapper();
          bootstrapper.Run();






          share|improve this answer

























          • Thank you very much Haukinger. That was indeed very helpful!

            – lvar82
            Mar 29 at 1:08











          • One quick question... Is there a way to completely remove the code behind (MyView.xaml.cs) such that I only end up with the MyView.xaml file? In Caliburn.Micro, I can completely remove the code behind. What I observe in Prism is that if I do not leave the constructor (with its InitializeComponent method) alone, then things don't bind. It is a minor thing, but ideally, I would want my team to not even see code behind in the view files. Thanks again!

            – lvar82
            Mar 29 at 1:10












          • You do not need to use a UserControl for your view, you can use a custom control, too. But I personally just remove everything from code-behind but the constructor calling InitializeComponent and forget about it...

            – Haukinger
            Mar 29 at 9:01










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55388458%2fcan-we-have-one-exe-calling-a-dll-with-xaml-and-prism-for-mvvm%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0
















          But I want to have my Bootstrapper in the Assembly project... Is this possible with Prism 7?




          Sure, just reference the dll with the bootstrapper from the exe and put something like this in App.xaml.cs:



          protected override void Onstartup(StartupEventArgs e)

          base.OnStartup(e);
          var bootstrapper = new Company.Product.Presentation.Bootstrapper();
          bootstrapper.Run();






          share|improve this answer

























          • Thank you very much Haukinger. That was indeed very helpful!

            – lvar82
            Mar 29 at 1:08











          • One quick question... Is there a way to completely remove the code behind (MyView.xaml.cs) such that I only end up with the MyView.xaml file? In Caliburn.Micro, I can completely remove the code behind. What I observe in Prism is that if I do not leave the constructor (with its InitializeComponent method) alone, then things don't bind. It is a minor thing, but ideally, I would want my team to not even see code behind in the view files. Thanks again!

            – lvar82
            Mar 29 at 1:10












          • You do not need to use a UserControl for your view, you can use a custom control, too. But I personally just remove everything from code-behind but the constructor calling InitializeComponent and forget about it...

            – Haukinger
            Mar 29 at 9:01















          0
















          But I want to have my Bootstrapper in the Assembly project... Is this possible with Prism 7?




          Sure, just reference the dll with the bootstrapper from the exe and put something like this in App.xaml.cs:



          protected override void Onstartup(StartupEventArgs e)

          base.OnStartup(e);
          var bootstrapper = new Company.Product.Presentation.Bootstrapper();
          bootstrapper.Run();






          share|improve this answer

























          • Thank you very much Haukinger. That was indeed very helpful!

            – lvar82
            Mar 29 at 1:08











          • One quick question... Is there a way to completely remove the code behind (MyView.xaml.cs) such that I only end up with the MyView.xaml file? In Caliburn.Micro, I can completely remove the code behind. What I observe in Prism is that if I do not leave the constructor (with its InitializeComponent method) alone, then things don't bind. It is a minor thing, but ideally, I would want my team to not even see code behind in the view files. Thanks again!

            – lvar82
            Mar 29 at 1:10












          • You do not need to use a UserControl for your view, you can use a custom control, too. But I personally just remove everything from code-behind but the constructor calling InitializeComponent and forget about it...

            – Haukinger
            Mar 29 at 9:01













          0














          0










          0










          But I want to have my Bootstrapper in the Assembly project... Is this possible with Prism 7?




          Sure, just reference the dll with the bootstrapper from the exe and put something like this in App.xaml.cs:



          protected override void Onstartup(StartupEventArgs e)

          base.OnStartup(e);
          var bootstrapper = new Company.Product.Presentation.Bootstrapper();
          bootstrapper.Run();






          share|improve this answer














          But I want to have my Bootstrapper in the Assembly project... Is this possible with Prism 7?




          Sure, just reference the dll with the bootstrapper from the exe and put something like this in App.xaml.cs:



          protected override void Onstartup(StartupEventArgs e)

          base.OnStartup(e);
          var bootstrapper = new Company.Product.Presentation.Bootstrapper();
          bootstrapper.Run();







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 28 at 14:39









          HaukingerHaukinger

          6,5612 gold badges8 silver badges24 bronze badges




          6,5612 gold badges8 silver badges24 bronze badges















          • Thank you very much Haukinger. That was indeed very helpful!

            – lvar82
            Mar 29 at 1:08











          • One quick question... Is there a way to completely remove the code behind (MyView.xaml.cs) such that I only end up with the MyView.xaml file? In Caliburn.Micro, I can completely remove the code behind. What I observe in Prism is that if I do not leave the constructor (with its InitializeComponent method) alone, then things don't bind. It is a minor thing, but ideally, I would want my team to not even see code behind in the view files. Thanks again!

            – lvar82
            Mar 29 at 1:10












          • You do not need to use a UserControl for your view, you can use a custom control, too. But I personally just remove everything from code-behind but the constructor calling InitializeComponent and forget about it...

            – Haukinger
            Mar 29 at 9:01

















          • Thank you very much Haukinger. That was indeed very helpful!

            – lvar82
            Mar 29 at 1:08











          • One quick question... Is there a way to completely remove the code behind (MyView.xaml.cs) such that I only end up with the MyView.xaml file? In Caliburn.Micro, I can completely remove the code behind. What I observe in Prism is that if I do not leave the constructor (with its InitializeComponent method) alone, then things don't bind. It is a minor thing, but ideally, I would want my team to not even see code behind in the view files. Thanks again!

            – lvar82
            Mar 29 at 1:10












          • You do not need to use a UserControl for your view, you can use a custom control, too. But I personally just remove everything from code-behind but the constructor calling InitializeComponent and forget about it...

            – Haukinger
            Mar 29 at 9:01
















          Thank you very much Haukinger. That was indeed very helpful!

          – lvar82
          Mar 29 at 1:08





          Thank you very much Haukinger. That was indeed very helpful!

          – lvar82
          Mar 29 at 1:08













          One quick question... Is there a way to completely remove the code behind (MyView.xaml.cs) such that I only end up with the MyView.xaml file? In Caliburn.Micro, I can completely remove the code behind. What I observe in Prism is that if I do not leave the constructor (with its InitializeComponent method) alone, then things don't bind. It is a minor thing, but ideally, I would want my team to not even see code behind in the view files. Thanks again!

          – lvar82
          Mar 29 at 1:10






          One quick question... Is there a way to completely remove the code behind (MyView.xaml.cs) such that I only end up with the MyView.xaml file? In Caliburn.Micro, I can completely remove the code behind. What I observe in Prism is that if I do not leave the constructor (with its InitializeComponent method) alone, then things don't bind. It is a minor thing, but ideally, I would want my team to not even see code behind in the view files. Thanks again!

          – lvar82
          Mar 29 at 1:10














          You do not need to use a UserControl for your view, you can use a custom control, too. But I personally just remove everything from code-behind but the constructor calling InitializeComponent and forget about it...

          – Haukinger
          Mar 29 at 9:01





          You do not need to use a UserControl for your view, you can use a custom control, too. But I personally just remove everything from code-behind but the constructor calling InitializeComponent and forget about it...

          – Haukinger
          Mar 29 at 9:01








          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55388458%2fcan-we-have-one-exe-calling-a-dll-with-xaml-and-prism-for-mvvm%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript