473,761 Members | 6,001 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting content files from class library over to app_data

Hi,

Originally I was planning to do some code reuse (yeah.. that
exists..didn't want to believe it either) with some class library
projects that I now want to use in a asp.net 2.0 web app in VS 2005.
The solution contains both the web app and the class libraries. Inside
the class libraries there are some xml files marked as content files
and configured to be copied to the output directory on build. This
worked perfectly fine for a windows app and a windows service but
fails to copy these xml files over to the web app's "app_data" folder
or at least the web app's root dir.
I've already thought about compiling the files as embedded resource
but that doesn't work with the way my Dao stuff is working, it really
has to be files on the disk.
Right now my workaround is to have the xml files copied over to the
web app's app_data folder.

Does anyone know how to copy content files from a class library to
app_data on build?

Greets
Frank
Jun 27 '08 #1
2 2508
look at the msbuild <Copytask and add it to your project file.

-- bruce (sqlwork.com)
"Frank" wrote:
Hi,

Originally I was planning to do some code reuse (yeah.. that
exists..didn't want to believe it either) with some class library
projects that I now want to use in a asp.net 2.0 web app in VS 2005.
The solution contains both the web app and the class libraries. Inside
the class libraries there are some xml files marked as content files
and configured to be copied to the output directory on build. This
worked perfectly fine for a windows app and a windows service but
fails to copy these xml files over to the web app's "app_data" folder
or at least the web app's root dir.
I've already thought about compiling the files as embedded resource
but that doesn't work with the way my Dao stuff is working, it really
has to be files on the disk.
Right now my workaround is to have the xml files copied over to the
web app's app_data folder.

Does anyone know how to copy content files from a class library to
app_data on build?

Greets
Frank
Jun 27 '08 #2
Woo totally forgot to reply

I didn't get around to look at the copy task but I bet it will be the
thing I was looking for.

Thanks a bunch!
Jul 11 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3268
by: Peter Krikelis | last post by:
Hi, I am trying to automate the Outlook so that I can get all new messages received and look at them. I have added refference "Microsoft Outlook 10.0 Object Library" and written code: private Outlook.Application oApp; private Outlook._NameSpace oNameSpace;
8
10015
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported the following error when attempting to create or open the Web project located at the following URL: 'http://localhost/WebApplication1'. 'HTTP/1.1 500 Internal Server Error'."
2
2116
by: David Hearn | last post by:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. SQLExpress database file auto-creation error: The connection string specifies a local SQL Server Express instance using a...
1
1503
by: Carlitos | last post by:
Hi there, I've been trying to get information about the proper way to do the following, but haven't got it yet in spite of all the research I've done for the past week. I just want to move some files from my web server to a content server. An aspx page uploads a zip file. Then the page invokes a C# class library developed by me. This library unzips the uploaded zip file into a temporary folder in the web server, makes some...
3
2639
by: Martyn Fewtrell | last post by:
Hi there. First of all let me apologise for this is a somewhat general question to which I would be interested in any opinions. As far as I can see when I create a web application the recommended location for the database is the app_data folder. The recommended location for code files and datasets/table adapters appears to be the app_code folder. This set up appears to work reasonably well although it results in the all the code...
5
3431
by: wwwmike | last post by:
I have an asp.net 2.0 application where I move about 200,000 text files daily in and out. When using VS 2005 to debug my application everything works find if only a few files are in the folder. (The folder is locaed within the project file). Yesterday I did a stress test were I placed 200,000 files into this folder. As a result I took me about 15 mintues to start VS 2005 and I was not able to start debugging since the asp.net compiler...
6
2809
by: WT | last post by:
Hello, Using VS2005. I have an assembly library that can be called from a Web site asp.net application or from a winform application. From this library I need to retrieve a path using simply a key like 'libPath'. As far as winform and asp.net share the same common base class for settings, SettingsBase, how to manage this ? For winform the value should be set in app.config and for web site in
4
24368
by: Joey | last post by:
asp.net 2/C#/VS2005 I have a web app where I use a stream writer to create a CSV (text) file. I then use my code to save the file in the site's 'App_Data' folder, in a subfolder called 'Temp'. Finally, I redirect the page to that file in order to serve it out (push the download) to the user. This all worked great in .net v1.1. Now, in my new .net v2 app, everytime the page redirect occurs, the browser displays "The webpage cannot be...
1
1765
by: Blau | last post by:
While trying to learn from some sample projects i'm running into a problem. The setup that I have is One Solution with two projects. (usually a library that is being developed along side an application.) In the examples that I am learning from, they have a "content" folder in the library solution, which stores various things like font files. In the examples, the application project does not have its own folder with the same content,...
0
9531
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9775
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8780
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7332
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5229
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3456
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.