IfYouSaySo
Well-known member
I have a program that dynamically compiles and runs code. It uses the System.CodeDom.Compiler namespace to achieve this. I recently ran into a problem where it does not seem to find certain assemblies when they are referenced in the compiler parameters. For example:
System.data.dll
System.xml.dll
System.Web.dll
are found, but the assemblies:
CrystalDecisions.Shared.dll
CrystalDecisions.CrystalReports.Engine.dll
are not. If I reference the CR dll's with a full pathname everything works OK, for example:
My understanding is that these Crystal Reports DLL's are in the GAC, so I shouldn't need to give a full path. Definately if I do "gacutil -l" they show up in the output list. Am I missing something here?
System.data.dll
System.xml.dll
System.Web.dll
are found, but the assemblies:
CrystalDecisions.Shared.dll
CrystalDecisions.CrystalReports.Engine.dll
are not. If I reference the CR dll's with a full pathname everything works OK, for example:
VB.NET:
Dim x As New System.CodeDom.Compiler.CompilerParameters
x.ReferencedAssemblies.Add("C:\Program Files\Common7\CrystalDecisions\1.1\Managed\CrystalDecisions.CrystalReports.Engine.dll")
' and then compile the code, it works ok...
' but this fails...
x.ReferencedAssemblies.Add("CrystalDecisions.Shared.dll")
My understanding is that these Crystal Reports DLL's are in the GAC, so I shouldn't need to give a full path. Definately if I do "gacutil -l" they show up in the output list. Am I missing something here?