Question

I have defined a WPF application that uses Telerik controls using Visual Studio 2010 SP1. I have copied what is in Debug folder (.exe files and .dll binaries) to another machine and it worked great. However, I don't want the Telerik binaries to be copied along the exe file. I want the exe to work with the local install of Telerik on the target machine.

What I tried so far:

  • I installed Telerik on the target machine and added the Paths to binaries to the System Environment Path variable. Yet, I couldn't run the .exe file yet. How can I achieve this?
  • I installed gacutil.exe and added the binaries to GAC. I can test: gacutil /l | findstr “Telerik” and find all assemblies I added.
  • I tried to place these assemblies (Telerik) in C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0 trying both x64 and x86.
  • I tried to place these assemblies (Telerik) in C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5 trying both x64 and x86.
  • I also tried to place assemblies here: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0

None of the above works. The only way is having the .dll files right next to the .exe in the same directory which I do not want.

EDIT: Event Log Error: (Application Error in Application Event Log ID 1000)

Faulting application name: WpfApplication.exe, version: 1.0.0.0, time stamp: 0x51f6aef5
Faulting module name: KERNELBASE.dll, version: 6.1.7601.17651, time stamp: 0x4e21213c
Exception code: 0xe0434352
Fault offset: 0x000000000000cacd
Faulting process id: 0x34c
Faulting application start time: 0x01ce8cba7febd62e
Faulting application path: C:\Users\administrator.MyPC\Desktop\Debug\WpfApplication.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: bdb99d28-f8ad-11e2-89c4-00155db4f007

EDIT 2: Event Log Error ID 1026

Application: WpfApplication.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Windows.Markup.XamlParseException
Stack:
   at System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)
   at System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri)
   at System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, System.Windows.Markup.ParserContext, System.Object, Boolean)
   at System.Windows.Application.LoadBamlStreamWithSyncInfo(System.IO.Stream, System.Windows.Markup.ParserContext)
   at System.Windows.Application.LoadComponent(System.Uri, Boolean)
   at System.Windows.Application.DoStartup()
   at System.Windows.Application.<.ctor>b__1(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Threading.ExecutionContext.runTryCode(System.Object)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Application.RunInternal(System.Windows.Window)
   at System.Windows.Application.Run()
   at SilverlightApp.App.Main()

Thank You,

Was it helpful?

Solution

EDIT The GAC assemblies I added conflicted with the references assembly versions!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top