G
Giulio Petrucci
Good morning everybody,
I have been dealing with this strange issue for almost two days: I got
stuck and I can't get out of it. I built up for the first time in my life
(I'm quite new in stuff like .NET, C#, Visual Studio, windows programming
and so on...) a Windows Service. Debugging it in Visual Studio (Express
Edition) everything worked fine, but debugging it "live" I found a strange
behaviour. My application must dynamically compile some C# code generated
at run-tim. In order to perform this compilation I use an object called
"compiler" implementing an ICodeCompiler interface. Compiling the code, I
have a CS0006 compiler error, with this error message:
Metadata file 'dll_name' could not be found
I imported the missinng library in the VisualStudio project, I added it in
the CompilerParameters.ReferencedAssemblies collection and I set the
statement "using MyLibrary;" in the source code to be compiled. What am I
missing more?
Another question (something like a "best practice") about using
VisualStudio: which's the better way to add assembly references? Importing
the other projects in the solution and then add them from the "Projects"
tab, or adding them via the "Browse" one?
Thanks in advance.
--
Kind regards,
Giulio - Italia
p.s. sorry for my "bovine" english...
I have been dealing with this strange issue for almost two days: I got
stuck and I can't get out of it. I built up for the first time in my life
(I'm quite new in stuff like .NET, C#, Visual Studio, windows programming
and so on...) a Windows Service. Debugging it in Visual Studio (Express
Edition) everything worked fine, but debugging it "live" I found a strange
behaviour. My application must dynamically compile some C# code generated
at run-tim. In order to perform this compilation I use an object called
"compiler" implementing an ICodeCompiler interface. Compiling the code, I
have a CS0006 compiler error, with this error message:
Metadata file 'dll_name' could not be found
I imported the missinng library in the VisualStudio project, I added it in
the CompilerParameters.ReferencedAssemblies collection and I set the
statement "using MyLibrary;" in the source code to be compiled. What am I
missing more?
Another question (something like a "best practice") about using
VisualStudio: which's the better way to add assembly references? Importing
the other projects in the solution and then add them from the "Projects"
tab, or adding them via the "Browse" one?
Thanks in advance.
--
Kind regards,
Giulio - Italia
p.s. sorry for my "bovine" english...