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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:04:23+00:00 2026-06-04T07:04:23+00:00

At the moment we have all our Sitecore rendering XSLTs and user controls in

  • 0

At the moment we have all our Sitecore rendering XSLTs and user controls in our web application project. We would like to move them to their own project, but have everything otherwise work the same.

Is that possible?

  • 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-04T07:04:24+00:00Added an answer on June 4, 2026 at 7:04 am

    This is the method I use to do this, please note that it does take modifications to your csproj file to make sure that the files are placed in the appropriate directories on a build. I have based this on SharedSource examples, for instance, the Partial Language Fallback module in the Language Fallback project room in Shared Source uses this technique.

    In your project dir, create a file called deploydirectory.txt and put the path of your final web location.

    In your new project’s csproj file, add this code block just before the </project> (assuming no other custom changes have been made in here)

    <Target Name="AfterBuild">
      <CallTarget Targets="DeployToWeb" Condition="Exists('deploydirectory.txt')" />
    </Target>
    <Target Name="DeployToWeb">
      <ReadLinesFromFile File="deploydirectory.txt">
        <Output PropertyName="DeployPath" TaskParameter="Lines" />
      </ReadLinesFromFile>
      <CreateItem Include="App_Config\**\*.*;bin\*.dll;layouts\**\*.ascx" Exclude="**\.svn\**\*.*">
        <Output ItemName="DeployFiles" TaskParameter="Include" />
      </CreateItem>
      <Copy SourceFiles="@(DeployFiles)" DestinationFiles="@(DeployFiles->'$(DeployPath)\%(RelativeDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
    </Target>
    

    This code block as it currently stands, copies all files in app_config, all dll files in bin, and all ascx files in the layout directory and sub directories into the path in your deploydirectory.txt file. The ** defines that they will be placed into the appropriate sub directories at the target.

    This is currently set to exclude any .svn directories found.

    Finally, this only runs if you have the file deploydirectory.txt in the project directory, otherwise it ignores this directive completely.

    EDIT: if you want, you can also include the list of directories/files to move in a separate file so that you don’t need to modify the csproj file every time you add more files that you need to move across (say you start with usercontrols, and then add xslt renderings later etc)

    <Target Name="AfterBuild">
      <CallTarget Targets="DeployToWeb" Condition="Exists('deploydirectory.txt')" />
    </Target>
    <Target Name="DeployToWeb">
      <ReadLinesFromFile File="deploydirectory.txt">
        <Output PropertyName="DeployPath" TaskParameter="Lines" />
      </ReadLinesFromFile>
      <ReadLinesFromFile File="SourceFilePaths.txt">
        <Output ItemName="SourceFilePaths" TaskParameter="Lines" />
      </ReadLinesFromFile>
      <CreateItem Include="@(SourceFilePaths)" Exclude="**\.svn\**\*.*">
        <Output ItemName="DeployFiles" TaskParameter="Include" />
      </CreateItem>
      <Copy SourceFiles="@(DeployFiles)" DestinationFiles="@(DeployFiles->'$(DeployPath)\%(RelativeDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
    </Target>
    

    Where SourceFilePaths.txt contains the following

    App_Config\**\*.*
    bin\*.dll
    layouts\**\*.ascx
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple little application that performs some analysis of all our corporate
At the moment, I have lot's of Java which does all kind of nifty
I have been investigating a JSF upgrade on our existing web apps that are
We are actually analyzing what we have to do if we migrate our application
I have a large scale project I am working on at the moment using
Hey at the moment we have an arrray selecting all from one table (relationship)
I would like to redevelop a large FAQs page in one of our website.
We have a SQL Server 2005 database, and currently all our users are connecting
I'm working on a project were we have number (5 at the moment) of
I have a problem with my project, let me explain a moment here and

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.