Is relative path in Web.Config possible?

J

JamesPaulHart

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
<CodeDom> element 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
 
C

Chris Fulstow

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.
 
B

bruce barker \(sqlwork.com\)

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)
 
J

JP.Gantlin

often when I encounter such a sticky situation, I reload my computer.
have you given that a try?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top