Repost: ICodeCompiler
-
hello, when the below line runs it creates the dll in the application's bin\Debug directory. i'm trying to write it to a directory of my choice instead. i posted this last week. did anyone come across how i might do this. i'll post more code if you need it but the example that's basically the same thing i'm doing is at. http://www.codeproject.com/csharp/cscompiler.asp compilerResults = codeCompiler.CompileAssemblyFromSource(compilerParamaters, sourceWSProxy); i've played around with some of the Parameter properties and couldn't get it to work. so maybe i'm just not doing it right. CompilerResults has a PathToAssembly property but that's after the fact. any help is appreciated. By the way Tom, if you read this good book on C#. we've got 2 copies of it in our office. thanks Orion
-
hello, when the below line runs it creates the dll in the application's bin\Debug directory. i'm trying to write it to a directory of my choice instead. i posted this last week. did anyone come across how i might do this. i'll post more code if you need it but the example that's basically the same thing i'm doing is at. http://www.codeproject.com/csharp/cscompiler.asp compilerResults = codeCompiler.CompileAssemblyFromSource(compilerParamaters, sourceWSProxy); i've played around with some of the Parameter properties and couldn't get it to work. so maybe i'm just not doing it right. CompilerResults has a PathToAssembly property but that's after the fact. any help is appreciated. By the way Tom, if you read this good book on C#. we've got 2 copies of it in our office. thanks Orion
i've tried a couple of things but still doesn't work. or maybe i'm doing something wrong. i can get it to write to some directory but then the file(dll) that i'm creating loses its COM component qualities. so its no longer considered a dll, although it still has the extension. at least that's the error i get when i go to Add Reference to the newly created dll. i'm attempting to pass the path in as part of the OutputAssembly CompilerParameter. compilerParamaters.OutputAssembly = File.CreateText(@"C:\WUTemp\" + fileNameAssembly).ToString(); the other thing i've tried is to create it InMemory and then try to write to some directory. this produces the same result. the file is created with the dll extension but its missing the components. any thoughts?? thanks Orion
-
i've tried a couple of things but still doesn't work. or maybe i'm doing something wrong. i can get it to write to some directory but then the file(dll) that i'm creating loses its COM component qualities. so its no longer considered a dll, although it still has the extension. at least that's the error i get when i go to Add Reference to the newly created dll. i'm attempting to pass the path in as part of the OutputAssembly CompilerParameter. compilerParamaters.OutputAssembly = File.CreateText(@"C:\WUTemp\" + fileNameAssembly).ToString(); the other thing i've tried is to create it InMemory and then try to write to some directory. this produces the same result. the file is created with the dll extension but its missing the components. any thoughts?? thanks Orion
Shouldn't that be,
compilerParamaters.OutputAssembly = @"C:\WUTemp\" + fileNameAssembly
? James Simplicity Rules! -
Shouldn't that be,
compilerParamaters.OutputAssembly = @"C:\WUTemp\" + fileNameAssembly
? James Simplicity Rules!James, Thanks! that works. Yes Simplicity rules yet again. now i feel like a dumb ass,, but i don't care it works ;~)) Orion