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 7688257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:52:43+00:00 2026-05-31T19:52:43+00:00

I’m attempting to transform crossdomain.xml for different environments, just like regular web.config files. I’ve

  • 0

I’m attempting to transform crossdomain.xml for different environments, just like regular web.config files. I’ve tried using SlowCheetah add-in for visual studio, but it doesn’t play well with web applications. It kept publishing transform files along with the transformed file, which i didn’t want. Moreover, it did that for web.config transformation as well.

My other thought was to rename the file and all transforms to crossdomain.$(Configuration).config in hopes that VS would pick it up and transform it and then rename it somewhere in the build process to crossdomain.xml. But VS wouldn’t transform it at all. Here is what my transforms look like at the moment.

crossdomain.config

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain- policy.dtd">
<cross-domain-policy>
   <allow-access-from domain="*" secure="false" />
</cross-domain-policy>

crossdomain.stage.config

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
   <allow-access-from domain="*.foo.com" secure="true" xdt:Transform="Replace" />
</cross-domain-policy>

Does anybody have any suggestions?

UPDATE
The more i spend time on this, the more i realize that deployments in .NET are a complete nightmare. Still trying to figure this out. Looks like VS publishing feature does some sort of half-assed deployment. It calls up MSBuild to gather files to deploy and then deploys it manually outside of MSBuild. So, there is no way to get the deployment path to do the transform. I’d have to stub it into MSBuild as a parameter.

  • 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-31T19:52:44+00:00Added an answer on May 31, 2026 at 7:52 pm

    Hate to be answering my own question, but the following link helped get this straightened out:

    https://stackoverflow.com/a/5381408/546709

    <Target Name="TransformOtherConfigs" AfterTargets="CollectWebConfigsToTransform">
    <ItemGroup>
    <WebConfigsToTransform Include="@(FilesForPackagingFromProject)"
                           Condition="'%(FilesForPackagingFromProject.Extension)'=='.config'"
                           Exclude="*.$(Configuration).config;$(ProjectConfigFileName)">
        <TransformFile>%(RelativeDir)%(Filename).$(Configuration).config</TransformFile>
        <TransformOriginalFile>$(TransformWebConfigIntermediateLocation)\original\%(DestinationRelativePath)</TransformOriginalFile>
        <TransformOutputFile>$(TransformWebConfigIntermediateLocation)\transformed\%(DestinationRelativePath)</TransformOutputFile>
        <TransformScope>$([System.IO.Path]::GetFullPath($(_PackageTempDir)\%(DestinationRelativePath)))</TransformScope>
    </WebConfigsToTransform>
       <WebConfigsToTransformOuputs Include="@(WebConfigsToTransform->'%     (TransformOutputFile)')" />
    </ItemGroup>
    </Target>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have thousands of HTML files to process using Groovy/Java and I need to
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the

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.