Strange Exception
Posted: Mon Apr 30, 2012 8:31 am
I have a program that takes in parameters and executes a Stimulsoft report. When the utility is run from Visual Studio everything works as expected, but when the utility is run on its own I get an exception. The event log shows that it cannot load System.Data.dll. Here is the event log details.
jmill: System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.Dll' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Data.Dll'
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at Stimulsoft.Base.StiAssemblyFinder.GetAssembly(String assemblyName)
at Stimulsoft.Report.StiReport.GetReferencedAssemblies()
at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate, Object standaloneReportType)
at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate)
at Stimulsoft.Report.StiReport.Compile(String path, StiOutputType outputType, Boolean autoCreate)
at Exec_Report.Exec_Report.RunReportExec() in C:\Utilities\Stimulsoft Command Line\Exec_Report\Exec_Report.cs:line 468
=== Pre-bind state information ===
LOG: User = NJ\jmill
LOG: DisplayName = System.Data.Dll
(Partial)
LOG: Appbase = file:///C:/Projects/Testing/
LOG: Initial PrivatePath = NULL
Calling assembly : Stimulsoft.Base, Version=2011.1.1000.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Projects/Testing/System.Data.Dll.DLL.
LOG: Attempting download of new URL file:///C:/Projects/Testing/System.Data.Dll/System.Data.Dll.DLL.
LOG: Attempting download of new URL file:///C:/Projects/Testing/System.Data.Dll.EXE.
LOG: Attempting download of new URL file:///C:/Projects/Testing/System.Data.Dll/System.Data.Dll.EXE.
jmill: System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.Dll' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Data.Dll'
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at Stimulsoft.Base.StiAssemblyFinder.GetAssembly(String assemblyName)
at Stimulsoft.Report.StiReport.GetReferencedAssemblies()
at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate, Object standaloneReportType)
at Stimulsoft.Report.StiReport.Compile(String path, Stream stream, StiOutputType outputType, Boolean autoCreate)
at Stimulsoft.Report.StiReport.Compile(String path, StiOutputType outputType, Boolean autoCreate)
at Exec_Report.Exec_Report.RunReportExec() in C:\Utilities\Stimulsoft Command Line\Exec_Report\Exec_Report.cs:line 468
=== Pre-bind state information ===
LOG: User = NJ\jmill
LOG: DisplayName = System.Data.Dll
(Partial)
LOG: Appbase = file:///C:/Projects/Testing/
LOG: Initial PrivatePath = NULL
Calling assembly : Stimulsoft.Base, Version=2011.1.1000.0, Culture=neutral, PublicKeyToken=ebe6666cba19647a.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Projects/Testing/System.Data.Dll.DLL.
LOG: Attempting download of new URL file:///C:/Projects/Testing/System.Data.Dll/System.Data.Dll.DLL.
LOG: Attempting download of new URL file:///C:/Projects/Testing/System.Data.Dll.EXE.
LOG: Attempting download of new URL file:///C:/Projects/Testing/System.Data.Dll/System.Data.Dll.EXE.