I have an annoying issue that I would like to have fixed. Within my web deployment project file (.wdproj), I have a modified SourceWebPhysicalPath that looks like this...
However, each time I open Visual Studio and open my solution, the .wdproj is modified automatically and the SourceWebPhysical path is set back to its default value like this...
So I have to modify that line each time I open Visual Studio. How can I stop this automatic change from happening? Where is it getting that default value from?
What are you trying to accomplish by changing the SourceWebPhysicalPath?
I don't know why VS is changing the value each time, but there might be an alternative way of achieving what you want to do without changing the SourceWebPhysicalPath if you explain what you are trying to do.
I have to change the SourceWebPhysicalPath to "$(OutDir)_PublishedWebsites\MyProjectName", otherwise when I build on the Team Foundation Server, it cannot find the path. If there's another way for me to do this, that would be nice. I have no idea why Visual
Studio changes that value every time I open my solution. Any suggestions?
I have used a different way of accessing the output path of each build by using $(OutputPath). Each configuration I have has the OutputPath in the XML:
My problem is, I have to change the <SourceWebPhysicalPath>
The default value of <SourceWebPhysicalPath>..\..\ProjectName</SourceWebPhysicalPath>
just does not work. And no matter what I change that value to, when I close and re-open my solution, it sets it back to that default value.
Does anyone know how to prevent it from being changed? Where is it pulling that default value from? If I can change that default value from wherever it is pulling it from, that may work.
EDIT:
I just found out even if I do not modify that line when I close and re-open my solution, the web deployment project file is still being automatically checked out for editing. Does anyone else have this
problem? It does not seem like normal behavior for that to be happening.
When I only had that top line (without the Condition), that path was not able to be found on my local machine. So it changed it back to the default line. But with the 2 Conditional lines, it works fine.
Thanks for the help,
ChadMC2
Member
2 Points
5 Posts
Having to edit SourceWebPhysicalPath each time opened
Apr 09, 2008 01:16 PM|LINK
Hello,
I have an annoying issue that I would like to have fixed. Within my web deployment project file (.wdproj), I have a modified SourceWebPhysicalPath that looks like this...<
SourceWebPhysicalPath>$(OutDir)_PublishedWebsites\MyProjectName</SourceWebPhysicalPath>However, each time I open Visual Studio and open my solution, the .wdproj is modified automatically and the SourceWebPhysical path is set back to its default value like this...
<
SourceWebPhysicalPath>..\..\MyProjectName</SourceWebPhysicalPath>So I have to modify that line each time I open Visual Studio. How can I stop this automatic change from happening? Where is it getting that default value from?
Thanks,
Chad
tomliversidg...
Member
90 Points
40 Posts
Re: Having to edit SourceWebPhysicalPath each time opened
Apr 15, 2008 03:38 PM|LINK
Hi,
What are you trying to accomplish by changing the SourceWebPhysicalPath?
I don't know why VS is changing the value each time, but there might be an alternative way of achieving what you want to do without changing the SourceWebPhysicalPath if you explain what you are trying to do.
bw
ChadMC2
Member
2 Points
5 Posts
Re: Having to edit SourceWebPhysicalPath each time opened
Apr 21, 2008 02:50 PM|LINK
I have to change the SourceWebPhysicalPath to "$(OutDir)_PublishedWebsites\MyProjectName", otherwise when I build on the Team Foundation Server, it cannot find the path. If there's another way for me to do this, that would be nice. I have no idea why Visual Studio changes that value every time I open my solution. Any suggestions?
tomliversidg...
Member
90 Points
40 Posts
Re: Having to edit SourceWebPhysicalPath each time opened
Apr 22, 2008 12:00 PM|LINK
I have used a different way of accessing the output path of each build by using $(OutputPath). Each configuration I have has the OutputPath in the XML:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Development|AnyCPU' ">
<OutputPath>.\Development</OutputPath>
<EnableUpdateable>false</EnableUpdateable>
<UseMerge>true</UseMerge>
<SingleAssemblyName>Submissions_Development</SingleAssemblyName>
<UseWebConfigReplacement>true</UseWebConfigReplacement>
</PropertyGroup>
I can then use this for various functions i.e.:
<Target Name="AfterBuild">
<Delete Files="$(OutputPath)\live.config">
</Delete>
<Delete Files="$(OutputPath)\development.config">
</Delete>
</Target>
etc....
Not sure if ti will help, but could be worth a go.
ChadMC2
Member
2 Points
5 Posts
Re: Having to edit SourceWebPhysicalPath each time opened
Apr 22, 2008 02:33 PM|LINK
My problem is, I have to change the <SourceWebPhysicalPath>
The default value of <SourceWebPhysicalPath>..\..\ProjectName</SourceWebPhysicalPath> just does not work. And no matter what I change that value to, when I close and re-open my solution, it sets it back to that default value.
Does anyone know how to prevent it from being changed? Where is it pulling that default value from? If I can change that default value from wherever it is pulling it from, that may work.
EDIT:
I just found out even if I do not modify that line when I close and re-open my solution, the web deployment project file is still being automatically checked out for editing. Does anyone else have this problem? It does not seem like normal behavior for that to be happening.
ChadMC2
Member
2 Points
5 Posts
Re: Having to edit SourceWebPhysicalPath each time opened
Apr 23, 2008 07:08 PM|LINK
I've found a solution. I thought I've tried this before, but maybe not.
I put these 2 lines in, which made it so Visual Studio did not modify the file automatically...
<SourceWebPhysicalPath Condition="'$(OutDir)' != '$(OutputPath)'">$(OutDir)_PublishedWebsites\MyProjectName</SourceWebPhysicalPath><
SourceWebPhysicalPath Condition="'$(OutDir)' == '$(OutputPath)'">..\..\MyProjectName</SourceWebPhysicalPath>When I only had that top line (without the Condition), that path was not able to be found on my local machine. So it changed it back to the default line. But with the 2 Conditional lines, it works fine. Thanks for the help,
Chad