473,394 Members | 1,751 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to add non dll dependencies in a ASP.Net project ?

Here is my scenario :

I have a library libA.dll, this library is built by a project
(projectA), which may be used by several "solutions"
=> 1 dll assembly
=> this library uses a xslt transform => there is a "A.xslt" file
that must be put somewhere inside the project that includes the library, and
a DTD, and a base xml file, and... all these files should be updated at the
same time as the dll

I know how I can tell Visual Studio that my main project depends on
projectA, I know that the library will be AUTOMATICALLY updated when I
change something and copied at the right place.

How can I tell Visual Studio.Net (2003) that I want A.xslt to be
AUTOMATICALLY updated in my main project when I change it in projectA ?
Nov 19 '05 #1
6 1233
One approach would be to add a build event to the class library
project (Project -> Properties -> Common Properties -> Build Events.
The build event can copy the file to the $(SolutionDir) destination.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Fri, 17 Jun 2005 11:22:00 +0200, "Michel de Becdelièvre"
<m_*****@msn.com> wrote:
Here is my scenario :

I have a library libA.dll, this library is built by a project
(projectA), which may be used by several "solutions"
=> 1 dll assembly
=> this library uses a xslt transform => there is a "A.xslt" file
that must be put somewhere inside the project that includes the library, and
a DTD, and a base xml file, and... all these files should be updated at the
same time as the dll

I know how I can tell Visual Studio that my main project depends on
projectA, I know that the library will be AUTOMATICALLY updated when I
change something and copied at the right place.

How can I tell Visual Studio.Net (2003) that I want A.xslt to be
AUTOMATICALLY updated in my main project when I change it in projectA ?


Nov 19 '05 #2
"Scott Allen" <sc***@nospam.odetocode.com> a écrit dans le message de news:
ih********************************@4ax.com...
One approach would be to add a build event to the class library
project (Project -> Properties -> Common Properties -> Build Events.
The build event can copy the file to the $(SolutionDir) destination.

--
Scott


I'll try that, but it's a "push" approach that does not take modification
times into account. I'd rather "pull" and use timestamps.

Strange there is no more answers : this should be a faily commn scenario if
you are writing Controls that need a Javascript library or a css style
sheet.
Nov 19 '05 #3
The other option is to make the files embedded resources in the
assembly - that way the 'family always travels together' so to speak.
I think this is what you'll want if the XLST is being delivered at
runtime.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Fri, 17 Jun 2005 17:50:25 +0200, "Michel de Becdelièvre"
<m_*****@msn.com> wrote:
"Scott Allen" <sc***@nospam.odetocode.com> a écrit dans le message de news:
ih********************************@4ax.com...
One approach would be to add a build event to the class library
project (Project -> Properties -> Common Properties -> Build Events.
The build event can copy the file to the $(SolutionDir) destination.

--
Scott


I'll try that, but it's a "push" approach that does not take modification
times into account. I'd rather "pull" and use timestamps.

Strange there is no more answers : this should be a faily commn scenario if
you are writing Controls that need a Javascript library or a css style
sheet.


Nov 19 '05 #4

"Scott Allen" <sc***@nospam.odetocode.com> a écrit dans le message de news:
rh********************************@4ax.com...
The other option is to make the files embedded resources in the
assembly - that way the 'family always travels together' so to speak.
I think this is what you'll want if the XLST is being delivered at
runtime.

--


Great idea. I'll see if I can manage to implement this.

Do you know of a way to do this for JavaScript or css support files ? These
are not pulled out by C# code but by IIS directly.
Nov 19 '05 #5
Well - for embedded script it will work best if you use
RegisterClientScriptBlock, like Phil here:
http://haacked.com/archive/2005/04/29/2879.aspx

Of course, you could change the IIS script mappings to route requests
for .js files through the ASP.NET runtime, and implement an
IHttpHandler to dig a script file it doesn't find on disk out of an
assembly...

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Fri, 17 Jun 2005 18:25:26 +0200, "Michel de Becdelièvre"
<m_*****@msn.com> wrote:

"Scott Allen" <sc***@nospam.odetocode.com> a écrit dans le message de news:
rh********************************@4ax.com...
The other option is to make the files embedded resources in the
assembly - that way the 'family always travels together' so to speak.
I think this is what you'll want if the XLST is being delivered at
runtime.

--


Great idea. I'll see if I can manage to implement this.

Do you know of a way to do this for JavaScript or css support files ? These
are not pulled out by C# code but by IIS directly.


Nov 19 '05 #6

"Scott Allen" <sc***@nospam.odetocode.com> a écrit dans le message de news:
th********************************@4ax.com...
Well - for embedded script it will work best if you use
RegisterClientScriptBlock, like Phil here:
http://haacked.com/archive/2005/04/29/2879.aspx

Of course, you could change the IIS script mappings to route requests
for .js files through the ASP.NET runtime, and implement an
IHttpHandler to dig a script file it doesn't find on disk out of an
assembly...


RegisterClientScriptBlock is *real bad news* for big scripts or scripts that
are reused at several places in the web site. Kills off all caching.
Nov 19 '05 #7

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

Similar topics

0
by: Mark Sisson | last post by:
Hi gurus. I've got a deployment project that included the project output from two other project in my solution. They have almost identical file dependencies. In fact, they both have references...
7
by: Brian Sabolik | last post by:
I'm not sure if I've broken any Object Oriented rules or not, but ... I have projects in 2 different solutions that need to use each other's methods. Therefore I may have an "update" method in...
3
by: Bruce Wilhelm | last post by:
I have a VS2003 solution with 4 projects in it. I am trying to set up the dependencies in the dialog box, but after I close the dialog the dependencies do not change. Is there something that I am...
1
by: Troy Murphy | last post by:
How do I add componants to the installation package so they will be installed with the installer? I have some COM DLL's that have dependencies (late bound) and I wish to include those...
1
by: mp | last post by:
Hi, I have problem with project dependencies. I have made new setup application and everything works perfectly on my comp with VS 2003. On another computer with VS 2002 it does not work....
3
by: Eric W | last post by:
MS VC++ 7.1 - I have a project with static libs A, B and C where A depends on B anc C, also B depends on C. If I set this up in the project dependency dialog for A the Build environment puts B...
2
by: JT Lovell | last post by:
I have a solution with 5 projects and I need them to build in a particular order. I understand that setting the project dependencies will allow this, but when I go to the Project Dependencies...
6
by: =?Utf-8?B?WW9naSBXYXRjaGVy?= | last post by:
Hello, I am using Visual Studio-2003. I created a project to build my library. Since I am using third party libraries as well, I have specified those additional library dependencies in project...
6
by: =?Utf-8?B?YXByMDUyNA==?= | last post by:
I am wondering if there is a devenv switch that will ignore build dependencies that are set in .xxproj files. At the command line I am attempting to build individual projects that I do not want...
0
by: jadeite100 | last post by:
Hi All: I am new to displaytag and Maven. I download the displaytag-examples from the url "http://sourceforge.net/projects/displaytag/files/" it is part of the "displaytag-1.2-src.zip" I am using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.