4

This question has been danced around a bit, forgive me if it is a duplicate but I haven't been able to find an exact answer.

I am trying to create a Parameters.xml for deployment configuration that specifies the destination physical file folder for a web site. This is for an automated build using TeamCity, e.g. commandline using .deploy.cmd.

Can someone explain what I need to do?

Parameters.xml:

<parameter name="physicalPathLocation" description="Physical path where files for this Web service will be deployed." defaultValue="\" tags="PhysicalPath">
    <parameterEntry kind="DestinationVirtualDirectory" scope="Default\ Web\ Site/iag\.application\.services\.exampleservice/" match="" />
</parameter>

And in SetParameters.xml

<setParameter name="physicalPathLocation" value="C:\MyFolder\MySite" />

I suspect my problem is in how I am declaring the scope but am unsure what needs to be done.

2
  • I believe it may be "physicalPath" rather than "physicalPathLocation", but this is not well documented. Commented Sep 13, 2012 at 21:11
  • @WhatWouldBeCool - "physicalPathLocation" is Stu's arbitrarily named parameter. The parameter kind is indeed DestinationVirtualDirectory Commented Sep 25, 2012 at 5:07

1 Answer 1

3

Assuming Default Web Site/iag.application.services.exampleservice is a virtual directory in IIS (DestinationVirtualDirectory is only valid for "applications"), you can probably just get away with removing the / suffix and not encoding it. (I've also removed the match attribute)

<parameter name="physicalPathLocation" 
           description="Physical path where files for this Web service will be deployed." 
           defaultValue="\" 
           tags="PhysicalPath"
           >
    <parameterEntry kind="DestinationVirtualDirectory" 
                    scope="Default Web Site/iag.application.services.exampleservice" />
</parameter>

Keep in mind that you don't have to declare parameters before you set them. You could just as easily declare the full parameter and set it at the same time:

<setParameter name="physicalPathLocation" 
              kind="DestinationVirtualDirectory" 
              scope="Default Web Site/iag.application.services.exampleservice" 
              value="C:\MyFolder\MySite" />
Sign up to request clarification or add additional context in comments.

1 Comment

scope="/" worked for moving the site root exported with appHostConfig.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.