Visual Studio 2010 Publish Profile Target Location with Relative Paths

1k Views Asked by At

How do I include relative paths in the publish profile of a web application in Visual Studio 2010?

For instance, my web app resides in a the folder structure: C:\Foo\MyWebApp\MyWebAppUI. I would like the output to be published to C:\Foo\MyWebApp.

1

There are 1 best solutions below

0
On

While it's not very clearly stated you can in fact use relative paths for the target location path (at least for File System publish). You'll have to play with it a little to get the right relative reference to the target. For example,

C:\My\Project\Is\Located\Here

A relative location of ".\Release" will create:

C:\My\Project\Is\Located\Here\Release

That said... I do not think that you really should be publishing your project on top of your project source code. Especially if you're precompiling because of the reference changes made in the .aspx files.