How can I have a single code base and multiple products? I am using WIXgen, ASP. C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 17feb79
    New Member
    • Oct 2009
    • 2

    #1

    How can I have a single code base and multiple products? I am using WIXgen, ASP. C#

    How can I have a single code base (Product.sln) and multiple products (PROD1-Website A & PROD2-Website B)? I am using WIXgen tool for MSI Packaging. And my IDE is ASP.net 2008, C#.

    My pages will have some specific changes for each product. That I can achieve using conditional compilation (#if, #elif, #else, and #endif)

    E.g.
    Product.sln -> Default.aspx.cs
    Code:
    #if (PROD1)
      Response.Write("This is PROD1 – Website A");
    #else
      Response.Write("This is PROD2 – Website B");
    #endif
    So to be precise what I need is, I need to have two build definitions and that will run over same solution, and it must create different DLLs (say for e.g. PROD1.DLL & PROD2.DLL) for each product and build the MSI. So when i try to create MSI for the first product my DLL should come out with that specific code and vice versa

    How can I do this ? Help and any suggestions are highly appreciated…

    Thanks & Regards
    Sree
    Last edited by Frinavale; Oct 25 '10, 07:10 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Are you having problems with producing two different DLLs?
    • Right click on the project and select Properties
    • Go to the application tab and edit the Assembly information so that it corresponds with the appropriate build
    • Go to the Compile tab and specify the name of the DLL that is the result of the build.

    Or are you having problems with defining the pre-compile variables?
    • Right click on the project and select Properties
    • Go to the Compile tab and click Advanced Compile Options
    • Under the Compilation Constraints section, define your variables

    Comment

    • 17feb79
      New Member
      • Oct 2009
      • 2

      #3
      Thanks Frinavale....

      instead i am going and changing the assembly name Manually, is there any way that i can change it dynamically ?

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        I'm sure there is...

        I have one code base for two versions of a website also...but I usually do this manually when I build everything.

        -Frinny

        Comment

        Working...