0

I'm having an issue with my .NET application. When I use both Prism (version 8.1.97) and Costura.Fody (version 5.7.0) in my project, the application fails to start. However, if I only use one or the other, the application works fine.

Here is how I'm initializing Prism and configuring Costura.Fody in my code: App.xaml.cs

<prism:PrismApplication x:Class="WpfApp1.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:WpfApp1"
             xmlns:prism="http://prismlibrary.com/"
            >
    <Application.Resources>
         
    </Application.Resources>
</prism:PrismApplication>

App.xaml

<prism:PrismApplication x:Class="WpfApp1.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:WpfApp1"
             xmlns:prism="http://prismlibrary.com/"
            >
    <Application.Resources>
         
    </Application.Resources>
</prism:PrismApplication>

FodyWeavers.xml

<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
  <Costura />
</Weavers>

I'm using .NET 7.0 and Visual Studio 2022. I've tried updating all my NuGet packages, cleaning and rebuilding the project, and checking the configuration of Costura.Fody and initialization of Prism, but none of these have solved the issue.

When I start the application, I expect it to open the user interface, but instead, nothing happens. There are no error messages, and no breakpoints are hit when I run the application in the debugger.

Does anyone have any idea what the problem could be? I'd appreciate any suggestions.

  • Ok what happens when you run it in the Debugger? Does it freeze or terminate? Does it spit out anything in the output window? Does an exception occur? – Joe Jun 05 '23 at 18:39

0 Answers0