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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:33:27+00:00 2026-05-10T19:33:27+00:00

In a visual studio project I have three layers, Data Layer, Business Layer and

  • 0

In a visual studio project I have three layers, Data Layer, Business Layer and Presentation Layer.

In the Data Layer I have a few XSLT’s that transform some objects into an email, all works fine but I have discovered that the XSLTs do not get built/copied when building.

I have currently, created a folder in the deploy location and placed the XSLT’s there but I am concerned about relying on a manual process to update these.

Has anyone encountered a similar issue and if so how did they get around it.

It smacks of changing the MSBuild script to copy the build artifacts to the required location, does anyone have examples of this?

Thaks

  • 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. 2026-05-10T19:33:28+00:00Added an answer on May 10, 2026 at 7:33 pm

    If you are using Visual Studio 2005/2008, the easiest way to do this is by including your XSLT files as project resources.

    1. Open the Properties for your project.
    2. Select the Resources tab. You will probably see a link that says ‘This project does not contain a default resources file. Click here to create one.’ Go ahead and click on that.
    3. Click the Add Resource drop-down near the top and select Add Existing File.
    4. Browse to your XSLT files and select them.

    After you have done this, you can easily access the resources in the following manner:

    // To get the contents of the resource as a string: string xslt = global::MyNamespace.Properties.Resources.MyXsltFile; // To get a Stream containing the resource: Stream xsltStream = global::MyNamespace.Properties.Resources.ResourceManager.GetStream('MyXsltFile'); 

    If you are using Visual Studio 2003, your best bet is to include those XSLT files as embedded resources for the DLL. In Visual Studio, select the file(s) in Solution Explorer, open the Properties pane, and change the Build Type to ‘Embedded Resource’. You can then use the GetManifestResourceStream method to get a Stream containing the XSLT(s). The name to pass will be based on the default namespace of your assembly, the folder containing the file, and the name of the file.

    For example, say your data layer assembly has a default namespace of My.DataLayer. Within your data layer project you have a folder named Templates which contains a file called Transform.xslt. The code to get your XSLT would look like this:

    // There are numerous ways to get a reference to the Assembly ... this way works // when called from a class that is in your data layer.  Have a look also at the // static methods available on the Assembly class. System.Reflection.Assembly assembly = (GetType()).Assembly; System.IO.Stream xsltStream = assembly.GetManifestResourceStream('My.DataLayer.Templates.Transform.xslt'); 

    For more information check out this article on CodeProject.

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

Sidebar

Ask A Question

Stats

  • Questions 213k
  • Answers 213k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Figured it out. Need to save and close the item… May 12, 2026 at 10:31 pm
  • Editorial Team
    Editorial Team added an answer Try using the Google Search API rather than screen-scraping. There's… May 12, 2026 at 10:31 pm
  • Editorial Team
    Editorial Team added an answer Are you sure that it's just not NLogger that doesn't… May 12, 2026 at 10:31 pm

Related Questions

I have a web application that is based on 3 Layer. I prefer to
In our web applications, we seperate our Data Access Layers out into their own
I’m having a little Architecture problem. In my project I have a Business Logic
I have a data layer project which receives a byte array that needs to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.