5

So my question is relatively simple.

In my Parameters.xml file I have the following line:

<parameter name="SEND_TO_FRIEND_BCC" description="Email address of developer" defaultValue="" tags="">
   <parameterEntry kind="XmlFile" scope"\\web.config$" match="/configuration/appsettings/add[@key='SEND_TO_FRIEND_BCC']/@value" />
</parameter>

When publish this is creating a file that ends up like this:

<setParameter value="" name="SEND_TO_FRIEND_BCC" />

When going live, this should replace the current web.config value for SEND_TO_FRIEND_BCC to an empty string. Instead, when I try an publish I get the following:

Error: The 'SEND_TO_FRIEND_BCC" argument cannot be null or empty.
Error count: 1.

   at InRelease.MSDeploy.Program.Main(String[] args)

2 Answers 2

12

Have to tell MSDeploy that it is okay for the value to be empty ...

<parameter name="SEND_TO_FRIEND_BCC" description="Email address of developer" defaultValue="" tags="">
   <parameterValidation kind="AllowEmpty" />
   <parameterEntry kind="XmlFile" scope"\\web.config$" match="/configuration/appsettings/add[@key='SEND_TO_FRIEND_BCC']/@value" />
</parameter>
Sign up to request clarification or add additional context in comments.

1 Comment

How can I directly add this in SetParameters.xml file?
0

So, by pure chance I tried entering a single empty space and it worked. If there is a better way I am still eager to learn more...

Comments

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.