FileNotFoundException Could not load file or assembly Syncfusion Shared WPF Classic

Hello,

I added GanttControl to a wpf project. It appears smoothly in the xaml field. When I run the project and add a Task to the project, I get the following error.


System.Windows.Markup.XamlParseException: 'Set property 'System.Windows.ResourceDictionary.Source' threw an exception.'

FileNotFoundException: Could not load file or assembly 'Syncfusion.Shared.WPF.Classic, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.


If I do the data binding after page load, there is no problem.

private void Button_Click(object sender, RoutedEventArgs e)

{

    Gant.ItemsSource = viewModel.TaskDetails;

}

     <syncfusion:GanttControl x:Name="Gant">

         <interact:Interaction.Behaviors>

             <behaviors:GanttBehavior />

         </interact:Interaction.Behaviors>

     </syncfusion:GanttControl>


The problematic code is as follows:

        <syncfusion:GanttControl x:Name="Gant" ItemsSource="{Binding TaskDetails}">

            <interact:Interaction.Behaviors>

                <behaviors:GanttBehavior />

            </interact:Interaction.Behaviors>

        </syncfusion:GanttControl>


4 Replies

ÖZ Özgür January 12, 2024 08:01 AM UTC

I've included a problematic example below. It is a structure I took from your sample codes. If the connection is done with an external model, there will be no problem.


Attachment: GanttControlTrial_85e511f7.rar


VM Vidyalakshmi Mani Syncfusion Team January 12, 2024 02:02 PM UTC

Hi Özgür,


#Regarding Syncfusion.Shared.WPF.Classic package is not found

We recommend adding the Syncfusion.Shared.WPF.Classic packages to the sample. You can include Syncfusion.Shared.WPF.Classic through the NuGet Manager console. Please refer to the User Guide documentation on 'How to add the classic NuGet package to the sample' at the following link.


UG: https://help.syncfusion.com/wpf/installation/install-nuget-packages#installation-using-package-manager-console


Please use the below command line in the package manager console.

NuGet\Install-Package Syncfusion.Shared.WPF.Classic -Version 24.1.45


Regards,

Vidyalakshmi M.




David Šeda February 1, 2024 07:32 AM UTC

Hello,

I want to report same problem in my project, gantt loads correctly but when resizing window, same error pops up (XamlParseException) but on older version (20.2.0.50). Either way, this is not something that should be happening, when some package needs it's dependencies, it should install with it.

Have a nice day
David



VM Vidyalakshmi Mani Syncfusion Team February 2, 2024 01:14 PM UTC

 Hi David,


The 'Syncfusion.Shared.WPF.Classic' package is a classic dependency. The Syncfusion classic package will not appear in the Visual Studio NuGet dialog. Therefore, we recommend adding the Syncfusion classic package via the NuGet Package Manager Console.

Please refer to the User Guide documentation on 'How to add the classic NuGet package to the sample' at the following link.


UG: https://help.syncfusion.com/wpf/installation/install-nuget-packages#installation-using-package-manager-console


Please use the below command line in the package manager console.

 

NuGet\Install-Package Syncfusion.Shared.WPF.Classic -Version 20.2.0.50

 


Regards,

Vidyalakshmi M.



Loader.
Up arrow icon