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

  • Home
  • SEARCH
  • 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 8582669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:21:00+00:00 2026-06-11T21:21:00+00:00

I have a silverlight 5 project in VS 2010 and would like to have

  • 0

I have a silverlight 5 project in VS 2010 and would like to have its config file changed based on my configuration, pretty much like one would change database connection strings for a web app.

My ServiceReferences.ClientConfig looks like this:

<configuration>
<system.serviceModel>
    <bindings>
        <basicHttpBinding>
            <binding name="BasicHttpBinding_IWcfPortal" closeTimeout="00:10:00"
                openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
                maxBufferSize="25000000" maxReceivedMessageSize="25000000" />
        </basicHttpBinding>
    </bindings>
    <client>
        <endpoint name="WcfCslaService" address="http://localhost:22/Services/WcfSlPortal.svc"
            binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IWcfPortal"
            contract="WcfPortal.IWcfPortal" />
    </client>
</system.serviceModel>

My ServiceReferences.MyConfig.ClientConfig file (auto added with slow cheetah via right click, add transform) looks like this:

<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<system.serviceModel>
    <client>
        <endpoint name="WcfCslaService" address="http://192.168.0.0:22/Services/WcfSlPortal.svc"
                  binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IWcfPortal" contract="WcfPortal.IWcfPortal"
                  xdt:Transform="Replace" />
    </client>
</system.serviceModel>

My problem is that instead of replacing the whole node (like it is doing in my web.config in this same solution) the transform doesn’t happen. I have tried clean/rebuild, manually deleting .xap file, building one project at a time. If I look in my silverlight project\bin folder and unzip my xap file it ends up containing all the ClientConfig files, and the main config file left untouched. I also have an error in my xap file underlining the “xdt:Transform” that says “The ‘http://schemas.microsoft.com/XML-Document-Transform:Transform&#8217; attribute is not declared.”

If I right click on ServiceReferences.MyConfig.ClientConfig, Preview Transform it shows me exactly what it should (same service with updated IP address). The other crazy thing is that this was working previously and I have no idea what I did to break it (broke right before I went to commit to the repo). I have uninstalled and reinstalled slow cheetah, restarted etc.

Anyone know how to fix this transform to work?

  • 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-06-11T21:21:01+00:00Added an answer on June 11, 2026 at 9:21 pm

    Thanks to Kit for the help. I finally got a little time to look into this and deploy to a few different servers using different configurations and came up with the following solution:

    1. Make sure Web project properties build output path is \bin\ and configuration specific folders is set to No in the Silverlight Applications section of project properties
    2. Make sure Silverlight project properties build output path is \bin\ (this was my first problem)
    3. Either use Slow Cheetah (easy) or modify the csproj xml of the silverlight project (kind of a pain but not bad once done once – here is the link to allow you to have configuration specific transforms for your ServiceReferences.ClientConfig file). With slow cheetah you can view your transform by right clicking on the configuration specific transforms. Both mine and Kit’s transform work.
    4. Add xml (taken from the above link) into the silverlight project (csproj) file. It is similar to Kit’s but not sure why his wouldn’t compile and this one would (This was my second problem) – xml below
    5. Rebuild project, then publish. The .xap will have your transformed ServiceReferences.ClientConfig file in it.
    6. Add the MyProject.Publish.Xml to your repository if you would like to share your deployment configurations with your whole team
     <UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.Tasks.dll" />
     <Target Name="BeforeBuild" Condition="Exists('ServiceReferences.$(Configuration).ClientConfig')">
         <Move SourceFiles="ServiceReferences.ClientConfig" DestinationFiles="ServiceReferences.Build.ClientConfig" />
        <TransformXml Source="ServiceReferences.Build.ClientConfig" Destination="ServiceReferences.ClientConfig" Transform="ServiceReferences.$(Configuration).ClientConfig" />
     </Target>
     <Target Name="AfterBuild" Condition="Exists('ServiceReferences.Build.ClientConfig')">
         <Delete Files="ServiceReferences.ClientConfig" />
        <Move SourceFiles="ServiceReferences.Build.ClientConfig" DestinationFiles="ServiceReferences.ClientConfig" />
     </Target>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Silverlight ModelViewViewModel project that I would like to expose a property
I have multiple silverlight project that I would like to use the same styles,
I have a Silverlight project which takes some encrypted string thru its Service Reference:
I have a Silverlight 3 project. When one of the pages is loaded, a
Greetings! I am currently working on a Silverlight project and I would like to
I am developing silverlight web part for sharepoint 2010. In my project I have
I have a Silverlight project calling a WCF service. The service method GetData has
I have a Silverlight project that uses MVVM with Prism. I followed http://www.telerik.com/help/silverlight/patterns-and-practices-eventtocommand-prism.html I
I have a Silverlight project where functionality is segregated across multiple Silverlight libraries due
I have created a web application with a Silverlight project embedded in it, using

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.