Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6754825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:19:38+00:00 2026-05-26T13:19:38+00:00

In my Parameters.xml file, I have a couple of parameters that use the Web

  • 0

In my Parameters.xml file, I have a couple of parameters that use the Web Deploy “variable” syntax to refer to other parameters, like this one that refers to the IIS Web Application Name parameter:

<parameter name="MyParam"
           defaultValue="{IIS Web Application Name}/Web.config"
           tags="Hidden"/>

My problem is that VS automatically imports this parameter into my SetParameters.xml file when I build the deployment package in spite of it being tagged as hidden. When it is passed to msdeploy via setParamFile, Web Deploy literally interprets the value of the parameter as

{IIS Web Application Name}/Web.config

rather than substituting the IIS application name.

If I remove the parameter from the auto-generated SetParameters.xml file, the variable works as expected. Is there any way to prevent VS from including that parameter in the first place, either by name or by tag?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T13:19:39+00:00Added an answer on May 26, 2026 at 1:19 pm

    This was actually far easier than I thought, given the answer to my earlier question.

    I just needed to add a Hidden tag in the target that follows AddIisAndContentDeclareParametersItems. This apparently sets the tag in the source manifest prior to the package being built. It ends up looking something like this:

    <Target Name="DeclareCustomParameters" 
            AfterTargets="AddIisAndContentDeclareParametersItems">
      <ItemGroup>
        <MsDeployDeclareParameters Include="Foo">
          <!-- <snip> -->
          <!-- the following elements are the important ones: -->
          <Tags>Hidden</Tags>  
          <ExcludeFromSetParameter>True</ExcludeFromSetParameter>
        </MsDeployDeclareParameters>
      </ItemGroup>
    </Target>
    

    That was it!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a xml file on a server that look for example like this
Let's say I have an XML file that looks like this: <a id=x> <b>
In my ASP.NET MVC project I have added a parameters.xml file that looks like:
I have an xml file that looks like this: <result> <trip duration=03:30> <takeoff date=2010-06-19
I have a function that takes 2 parameters : 1 = XML file, 2
I have XML that looks like this: <Parameter Name=parameter name Value=parameter value /> which
I have to parse an XML document that looks like this: <?xml version=1.0 encoding=UTF-8
I have an XML file and the data is passed through parameters, like so:
I have this xml file <?xml version=1.0 encoding=utf-8 ?> <parameters> <parameters registerLink=linkValue TextBox.name=nameValue />
I have dowloaded an xml file that contains some update parameters and then I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.