Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Repost: ICodeCompiler

Repost: ICodeCompiler

Scheduled Pinned Locked Moved C#
csharpcomdebugginghelptutorial
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Orion Buttigieg
    wrote on last edited by
    #1

    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

    O 1 Reply Last reply
    0
    • O Orion Buttigieg

      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

      O Offline
      O Offline
      Orion Buttigieg
      wrote on last edited by
      #2

      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

      J 1 Reply Last reply
      0
      • O Orion Buttigieg

        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

        J Offline
        J Offline
        James T Johnson
        wrote on last edited by
        #3

        Shouldn't that be, compilerParamaters.OutputAssembly = @"C:\WUTemp\" + fileNameAssembly? James Simplicity Rules!

        O 1 Reply Last reply
        0
        • J James T Johnson

          Shouldn't that be, compilerParamaters.OutputAssembly = @"C:\WUTemp\" + fileNameAssembly? James Simplicity Rules!

          O Offline
          O Offline
          Orion Buttigieg
          wrote on last edited by
          #4

          James, Thanks! that works. Yes Simplicity rules yet again. now i feel like a dumb ass,, but i don't care it works ;~)) Orion

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups