473,485 Members | 1,479 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Is relative path in Web.Config possible?

Howdy!

I'm following the Microsoft article
http://msdn2.microsoft.com/en-us/library/ms228042.aspx to add Version
info to my precompiled dlls.

Essentially, it states that I modify my Web.Config file by adding a
<CodeDomelement that points to the location of my AssemblyInfo.Cs
file. So far so good.

Everything works fine if I enter the complete path (i.e.
"C:\MyFolder\MyProject\MyFiles\AssemblyInfo.Cs "). Unfortunately, that
won't work - multiple developers work on the same project so an
absolute path is a no-go. I need to use a relative path. Which you
think would be no big deal.

But, as soon as I put in something along the lines of
"..\MyFiles\AssemblyInfo.Cs" the project fails to build - it can't find
the file.

This doesn't seem like it should be difficult - am I missing something
really obvious here? Any suggestions are mucho appreciated!

-- Jim Hart

Oct 20 '06 #1
3 12213
Maybe you can use tilde (~) as the web application root path, e.g.
"~/MyFiles/AssemblyInfo.Cs"

Not sure if this works here, but might be worth a try.

JamesPaulH...@gmail.com wrote:
Howdy!

I'm following the Microsoft article
http://msdn2.microsoft.com/en-us/library/ms228042.aspx to add Version
info to my precompiled dlls.

Essentially, it states that I modify my Web.Config file by adding a
<CodeDomelement that points to the location of my AssemblyInfo.Cs
file. So far so good.

Everything works fine if I enter the complete path (i.e.
"C:\MyFolder\MyProject\MyFiles\AssemblyInfo.Cs "). Unfortunately, that
won't work - multiple developers work on the same project so an
absolute path is a no-go. I need to use a relative path. Which you
think would be no big deal.

But, as soon as I put in something along the lines of
"..\MyFiles\AssemblyInfo.Cs" the project fails to build - it can't find
the file.

This doesn't seem like it should be difficult - am I missing something
really obvious here? Any suggestions are mucho appreciated!

-- Jim Hart
Oct 20 '06 #2
not easily. when the site is compiled, its copied to a temp dir. as the
assembly file is not copied, the relative path will not work. if the
assembly file is in the site, it gets compiled twice.

-- bruce (sqlwork.com)

<Ja***********@gmail.comwrote in message
news:11*********************@h48g2000cwc.googlegro ups.com...
Howdy!

I'm following the Microsoft article
http://msdn2.microsoft.com/en-us/library/ms228042.aspx to add Version
info to my precompiled dlls.

Essentially, it states that I modify my Web.Config file by adding a
<CodeDomelement that points to the location of my AssemblyInfo.Cs
file. So far so good.

Everything works fine if I enter the complete path (i.e.
"C:\MyFolder\MyProject\MyFiles\AssemblyInfo.Cs "). Unfortunately, that
won't work - multiple developers work on the same project so an
absolute path is a no-go. I need to use a relative path. Which you
think would be no big deal.

But, as soon as I put in something along the lines of
"..\MyFiles\AssemblyInfo.Cs" the project fails to build - it can't find
the file.

This doesn't seem like it should be difficult - am I missing something
really obvious here? Any suggestions are mucho appreciated!

-- Jim Hart

Oct 20 '06 #3
often when I encounter such a sticky situation, I reload my computer.
have you given that a try?
Oct 21 '06 #4

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

Similar topics

7
2767
by: Doug | last post by:
If I were to write an include with a relative path like include("../conf/config.php"); What is the use? As far as I understand it, the path is relative to the first script that is called by...
1
5344
by: Prateek | last post by:
Hi, I am using appSettings in Web.Config to store my connection string. However, I am not able to provide a relative path to the Access database. How can I do that? TIA Prateek
2
6415
by: Harshdeep Mehta | last post by:
Hi all gurus, Myself Harshdeep Mehta, you can call me Harsh. I struck up in a situation where I need to define relative path in Web.Config. I.e. suppose I have a "Export" named folder, besides...
8
1947
by: dw | last post by:
Hello, all. I have a site that I'm testing on my LOCALHOST and also on a remote server, depending on whether I'm at work or at home. I don't want the OLEDBDATAAdapter to be pointing to the remote...
6
11735
by: openleren | last post by:
Hi all, how can I use a relative path in my web.config file for an Access db?: Instead of using <configuration> <appSettings> <add key="conAccess" value="microsoft.jet.oledb.4.0;data...
5
3293
by: spike grobstein | last post by:
So, I've got this project I'm working on where the app defines various classes that are subclassed by module packages that act like plugins... I'd like the packages to define a file path for...
1
3477
by: =?Utf-8?B?Uk1C?= | last post by:
I am using the Configuration Application Block, and I want to keep my config files in a folder off of the app root called config. I have modified the app.config to point to the folder with a...
6
2484
by: Royan | last post by:
Ok the problem is quite hard to explain, but i'll try to keep it as simple as i can. Imagine I have the following structure of my files and folders: /root/global.inc |__/files/foo.php...
2
4279
by: BD | last post by:
Hi there. Using 8.2 on Windows. I have a situation where I have a db backup, which I want to deploy to a group of developer workstations. The target directory for the database files will be...
0
6960
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
7116
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,...
1
6825
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
7275
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...
0
5418
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,...
0
4551
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...
0
3058
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...
1
595
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
247
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...

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.