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
  1. Home
  2. General Programming
  3. C#
  4. Build exe dynamically

Build exe dynamically

Scheduled Pinned Locked Moved C#
helptutorialquestionlearning
7 Posts 6 Posters 1 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.
  • K Offline
    K Offline
    kasraa00098000
    wrote on last edited by
    #1

    :( hi, I have a big problem in building deffrent mode of my application, imagine that we have a project contans of 3 part, for example a,b,c.In part a some codes of b and c must not be compiled in compile time, for this i used #define preproc and now, i need to compile full project by defining a, b or c there is a command which is csc.exe /define:[a|b|c] but this command only compiles one file and make exe. Now is there any way to compile a project with defining ? of course not changing source codes!my project considers 1000 source files :doh:

    OriginalGriffO D P 3 Replies Last reply
    0
    • K kasraa00098000

      :( hi, I have a big problem in building deffrent mode of my application, imagine that we have a project contans of 3 part, for example a,b,c.In part a some codes of b and c must not be compiled in compile time, for this i used #define preproc and now, i need to compile full project by defining a, b or c there is a command which is csc.exe /define:[a|b|c] but this command only compiles one file and make exe. Now is there any way to compile a project with defining ? of course not changing source codes!my project considers 1000 source files :doh:

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      Don't post the same question in the forums and QA - it duplicates work and annoys people.

      Did you know: That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      1 Reply Last reply
      0
      • K kasraa00098000

        :( hi, I have a big problem in building deffrent mode of my application, imagine that we have a project contans of 3 part, for example a,b,c.In part a some codes of b and c must not be compiled in compile time, for this i used #define preproc and now, i need to compile full project by defining a, b or c there is a command which is csc.exe /define:[a|b|c] but this command only compiles one file and make exe. Now is there any way to compile a project with defining ? of course not changing source codes!my project considers 1000 source files :doh:

        D Offline
        D Offline
        datenkabel
        wrote on last edited by
        #3

        You should take a closer look on MSBuild!

        O 1 Reply Last reply
        0
        • D datenkabel

          You should take a closer look on MSBuild!

          O Offline
          O Offline
          ostad_mrn
          wrote on last edited by
          #4

          thank you, msbuild has no config for define purpose,has it? please type an example

          W 1 Reply Last reply
          0
          • O ostad_mrn

            thank you, msbuild has no config for define purpose,has it? please type an example

            W Offline
            W Offline
            WillemM
            wrote on last edited by
            #5

            You can execute the following command to use your specific #define variable. For example:

            msbuild /t:Rebuild /p:Configuration=Release /p:DefineConstants=YourDefineStatement YourSolution.sln

            This will rebuild the specified solution. It will result in a release build with the YourDefineStatement specified as preprocessor define statement.

            WM. My blog

            1 Reply Last reply
            0
            • K kasraa00098000

              :( hi, I have a big problem in building deffrent mode of my application, imagine that we have a project contans of 3 part, for example a,b,c.In part a some codes of b and c must not be compiled in compile time, for this i used #define preproc and now, i need to compile full project by defining a, b or c there is a command which is csc.exe /define:[a|b|c] but this command only compiles one file and make exe. Now is there any way to compile a project with defining ? of course not changing source codes!my project considers 1000 source files :doh:

              P Offline
              P Offline
              PIEBALDconsult
              wrote on last edited by
              #6

              kasraa00098000 wrote:

              but this command only compiles one file and make exe

              No, you can compile multiple files or produce a DLL. CSC is called by Visual Studio, so it can compile and produce anything VS can.

              K 1 Reply Last reply
              0
              • P PIEBALDconsult

                kasraa00098000 wrote:

                but this command only compiles one file and make exe

                No, you can compile multiple files or produce a DLL. CSC is called by Visual Studio, so it can compile and produce anything VS can.

                K Offline
                K Offline
                kasraa00098000
                wrote on last edited by
                #7

                really? how can I compile a csproj file with csc? what about a group of cs file?

                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