Getting an exception when .exe tested on another system
I am working on the WPF application and i have created an exe file. When i run the exe file on my computer,it works perfectly.But when i try using my exe with another system.It throws an exception and when i debug the exception it says...
Cannot find type 'Microsoft.Windows.Controls.DataGrid'. The assembly used when compiling might be different than that used when loadin开发者_JAVA技巧g and the type is missing. Error at object 'MyWork.App' in markup file 'MyWork.App;component/app.xaml' Line 15 Position 6.
Any idea ?
Regards,
Sangram Nandkhile.
It sounds like you haven't installed the dll that contains Microsoft.Windows.Controls.DataGrid
. This is part of the WPF Toolkit so you will need to either install that on the target machine or include the dll in your installation program.
If you don't want to create an installer then you can merge assemblies using ILMerge which:
is a utility for merging multiple .NET assemblies into a single .NET assembly. It works on executables and DLLs alike and comes with several options for controlling the processing and format of the output.
精彩评论