473,765 Members | 2,058 Online
Bytes | Software Development & Data Engineering Community
+ 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
<CodeDomeleme nt 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\My Project\MyFiles \AssemblyInfo.C s"). 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\Ass emblyInfo.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 12232
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...@g mail.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
<CodeDomeleme nt 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\My Project\MyFiles \AssemblyInfo.C s"). 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\Ass emblyInfo.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******** *************@h 48g2000cwc.goog legroups.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
<CodeDomeleme nt 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\My Project\MyFiles \AssemblyInfo.C s"). 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\Ass emblyInfo.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
2779
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 php. In other words, if the current working directory is /www/ and you were
1
5361
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
6434
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 Web.Config in same location or somewhere in reference to web.config. Then how to define that. I know one easy solution but need better than that. the easy solution is
8
1966
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 Access db, but to the local one. The OLEDBDATAAdapter wizard puts the entire path of the db (\\myserver\.... or c:\myprojects\....). The db resides within the site's folders; is there anyway to use relative paths for it (something like...
6
11773
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 source=c:/Inetpub/MyApp/data/database.mdb" /> ...
5
3321
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 supporting files (graphics, etc) that are stored inside the package. The problem is that the superclass's definition (stored elsewhere) has all of the code for actually opening the files, so when I use the os.path.dirname(os.path.abspath(__file__))...
1
3487
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 relative path (see example below) <storageProvider xsi:type="XmlFileStorageProviderData" name="XML File Storage Provider" path="..\config\exceptionHandlingConfiguration.config" /> I can edit my configuration with the entlib config tool with no...
6
2497
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 |__/utils |__/logs/logger.inc When I run foo.php I get the following error:
2
4302
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 consistent, but the location that the backup file is on may vary. I have gone through the entire backup and restore process, and it
0
9399
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
10163
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9957
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9835
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...
1
7379
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
5276
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...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.