Is relative path in Web.Config possible?

  • Thread starter Thread starter JamesPaulHart
  • Start date Start date
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
 
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.
 
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)
 
often when I encounter such a sticky situation, I reload my computer.
have you given that a try?
 
Back
Top