Specifying precompilation target directory on the command line

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeff Dege

    Specifying precompilation target directory on the command line

    I have a VS2005 Web Site that's giving me some trouble.

    Our process model requires that all shipped applications be compiled on a
    dedicated compile box, straight from version control, without human
    intervention.

    The guts of it is a batch file that checks out the source from version
    control, then does a call to a build batch file, that is responsible for
    doing the compile.

    For websites, what we want to do is to create a precompiled version of
    the website in a directory structure parallel to that created by the
    check-out.

    The problem: the web site accesses a COM dll, and when I run the
    aspnet_compiler , I get errors:

    aspnet_compiler -p Project -v / Project-published
    "CS0246: The type or namespace name ... could not be found".

    OTOH, if I run msbuild, I do not get that error:

    msbuild project\project .sln

    Which would be fine, except that when I run msbuild, it places the
    precompiled version into folder that is specified in Property Pages of
    the project, and it restricts that to an absolute path.

    What I would prefer is a way to tell the aspnet_compiler to use a
    different target directory, by specifying an argument on the msbuild
    command line.

    But I've not been able to figure how to do that out.

    --
    A lot of people have asked me how the Mad Scientists' Club first got
    organized. And I usually ask them, "What do you mean, organized?" Things
    like our club don't really get organized. They just sort of happen.
    - Bertrand R. Brinley, "The Big Kerplop!"
  • bruce barker

    #2
    Re: Specifying precompilation target directory on the command line

    your solution and project files are msbuild scripts. these can be
    modified to specify filepaths from the command line, or include files.

    if you are not up to editing the build files, then in vs create a
    "build" target, and specify the file structure and compile options you
    want. then from msbuild, you can specify the target build.

    -- bruce (sqlwork.com)

    Jeff Dege wrote:
    I have a VS2005 Web Site that's giving me some trouble.
    >
    Our process model requires that all shipped applications be compiled on a
    dedicated compile box, straight from version control, without human
    intervention.
    >
    The guts of it is a batch file that checks out the source from version
    control, then does a call to a build batch file, that is responsible for
    doing the compile.
    >
    For websites, what we want to do is to create a precompiled version of
    the website in a directory structure parallel to that created by the
    check-out.
    >
    The problem: the web site accesses a COM dll, and when I run the
    aspnet_compiler , I get errors:
    >
    aspnet_compiler -p Project -v / Project-published
    "CS0246: The type or namespace name ... could not be found".
    >
    OTOH, if I run msbuild, I do not get that error:
    >
    msbuild project\project .sln
    >
    Which would be fine, except that when I run msbuild, it places the
    precompiled version into folder that is specified in Property Pages of
    the project, and it restricts that to an absolute path.
    >
    What I would prefer is a way to tell the aspnet_compiler to use a
    different target directory, by specifying an argument on the msbuild
    command line.
    >
    But I've not been able to figure how to do that out.
    >

    Comment

    • Jeff Dege

      #3
      Re: Specifying precompilation target directory on the command line

      On Wed, 09 Jul 2008 18:58:09 -0700, bruce barker wrote:
      your solution and project files are msbuild scripts. these can be
      modified to specify filepaths from the command line, or include files.
      The solution files I've looked at didn't look like msbuild scripts. And
      I'm building a website, not a web application, so I don't have a project
      file.

      Still, I have been able, by editing the solution file, to specify a
      target directory for aspnet_compiler that used a relative path. I'd
      still prefer to set that value on the command line. Your post suggests
      that's possible. Can you tell me how?

      --
      These are the times that try men's souls. The summer soldier and the
      sunshine patriot will, in this crisis, shrink from the service of their
      country; but he that stands it now, deserves the love and thanks of
      man and woman. Tyranny, like hell, is not easily conquered; yet we
      have this consolation with us, that the harder the conflict, the more
      glorious the triumph. What we obtain too cheap, we esteem too lightly:
      it is dearness only that gives everything its value. Heaven knows how
      to put a proper price upon its goods; and it would be strange indeed,
      if so celestial an article as FREEDOM should not be highly rated.
      --Thomas Paine

      Comment

      Working...