locked
Different strings based on publish profile RRS feed

  • Question

  • User-1416459073 posted

    Under Visual Studio 2010 you can publish your asp.net web application to another server.  Is it possible to publish different versions of a string based on where you are publishing your project.

    So for example.  When I run the project locally on my system, I have a folder structure of c:\myapp\saved_files.  But when I publish to our dev server, that folder structure changes to w:\some_folder\some_app\saved_files.

    Currently in my project I constantly have to comment/un-comment a string that contains the appropriate folder information of the system I'm working on.  I'm wondering if there is a way to automate this.

    I'm thinking something like :

    #ifndef publish_profile_dev
    string folder = "w:\some_folder\some_app\saved_files";

    #ifndef publish_profile_local
    string folder = "c:\myapp\saved_files";

    Wednesday, November 6, 2013 2:06 PM

Answers

All replies