Wrong Paths in StiRibbonDesignerControl
Posted: Thu Jul 16, 2015 1:10 pm
Hello,
we implements the Demoversion of Stimulsoft Reports.Net and we want to buy the product.
But we got a error when we starts the StiRibbonDesignerControl:
Our program starts with a trivial starter.exe.
The starter.exe starts the main program with 'InvokeMember'. The main program is on a another directory (AppData).
That looks like this:
The error is in this line:
There is no error when we copy all dlls in the directory of the starter.exe.
But the dll must be placed in the directory of the main program. That works with all other libaries. Even with the stiViewerControl1.
In my opinion the designer is looking in the wrong directory for the other DLLs.
Where the designer brings this path?
We have already tried the following (gPath is the directory of the main program):
Many thanks for your help!
Thorsten
we implements the Demoversion of Stimulsoft Reports.Net and we want to buy the product.
But we got a error when we starts the StiRibbonDesignerControl:
Code: Select all
Failed Loading assembly "Stimulsoft.Report.Design\,Version\=2015.1.0\, Culture\=neutral\, PublicKeyToken\=ebe6666cba19647a\, Version\=2015.1.0.0\, Culture\=neutral\, PublicKeyToken\=ebe6666cba19647a" or one of it's dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
bei System.Reflection.AssemblyName.nInit(RuntimeAssembly& assembly, Boolean forIntrospection, Boolean raiseResolveEvent)
bei System.Reflection.RuntimeAssembly.CreateAssemblyName(String assemblyString, Boolean forIntrospection, RuntimeAssembly& assemblyFromResolveEvent)
bei System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
bei System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
bei System.Reflection.Assembly.Load(String assemblyString)
bei Stimulsoft.Base.StiAssemblyFinder.GetAssembly(String assemblyName)
bei Stimulsoft.Report.Design.StiResourcesHelper..cctor()
The starter.exe starts the main program with 'InvokeMember'. The main program is on a another directory (AppData).
That looks like this:
Code: Select all
Assembly asm = Assembly.LoadFrom(cpath);
Type t = asm.GetType("Assembly.Class");
Object ob = t.InvokeMember("Main", BindingFlags.InvokeMethod | BindingFlags.Static | BindingFlags.Public, null, null, new object[1] { new String[2] { "", "" } });
Code: Select all
Stimulsoft.Report.Design.StiRibbonDesignerControl ctr = new Stimulsoft.Report.Design.StiRibbonDesignerControl();
But the dll must be placed in the directory of the main program. That works with all other libaries. Even with the stiViewerControl1.
In my opinion the designer is looking in the wrong directory for the other DLLs.
Where the designer brings this path?
We have already tried the following (gPath is the directory of the main program):
Code: Select all
Environment.CurrentDirectory = gPath;
Stimulsoft.Report.StiConfig.ApplicationDirectory = gPath;
Stimulsoft.Report.StiConfig.DefaultReportConfigPath = gPath;
Stimulsoft.Report.StiOptions.Configuration.DefaultReportConfigPath = gPath;
Stimulsoft.Report.StiOptions.Configuration.DefaultReportSettingsPath = gPath;
Thorsten