Home Dashboard Directory Help
Search

Visual Studio creates phantom bin folder when XML documentation is selected by I Code Freely


Status: 

Closed
 as Fixed Help for as Fixed


5
0
Sign in
to vote
Type: Bug
ID: 530980
Opened: 2/4/2010 2:01:30 PM
Access Restriction: Public
1
Workaround(s)
view
4
User(s) can reproduce this bug

Description

Visual Studio creates phantom bin folder when output path is modified, XML documentation is selected, and solution is saved in one folder above default folder.

I believe this bug may be related to a previously reported bug that was closed
because it could not be reproduced. It referred to steps performed at the command
line, whereas the steps below demonstrate the bug from the Visual Studio IDE.

The previously reported bug was:

ID: 436403
TITLE: devenv /build on a C# project with "XML documentation" selected
creates phantom folder

Note: Operating System is actually "Windows 7 Enterprise" (not listed as a choice under "Operating System" combo box for this feedback form).








Details
Sign in to post a comment.
Posted by James Rivenbark on 6/7/2011 at 1:39 PM
This is still an issue in VS 2008 is there any plan to fix it in VS 2008?
Posted by Richa Prasad on 11/15/2010 at 9:09 AM
Thank you for following up and confirming the fix.
Posted by I Code Freely on 11/14/2010 at 2:52 PM
Just to confirm, we have upgraded to VS 2010 and no longer experience the problem. Thank you for fixing it.
Posted by I Code Freely on 3/24/2010 at 3:34 PM
If it is fixed in VS 2010 that's good enough.

Thank you.
Posted by Microsoft on 3/24/2010 at 11:58 AM
Thanks for clarifying. I had misfollowed the steps to reproduce the problem - copied the project file into Level2 folder instead of just the solution file. You are right that this issue does occur in VS2008. However, this issue does not occur in VS2010. So we have fixed the problem since VS2008.

Unfortunately, other than writing a script that opens .sln and then deletes the created \Level1\bin folder, there is no easy workaround to have VS delete it automatically.
Posted by I Code Freely on 2/22/2010 at 1:55 PM
I disagree with your statement:
"The build output folder is "..\bin\Debug\" which corresponds to "\Level1\bin\Debug"."

Where is your "PhantomBinFolder.csproj" file located? There should be only one, and it should be in the "PhantomBinFolder" directory. With respect to that location, "..\bin\Debug" refers to "\Level2\bin\Debug", since the path is relative to the project file. Changing the location of the solution file should not change the output path, since the output path is relative to the project file and not the solution.

You might get the behavior you describe if you saved both the project and solution in the Level2 folder. The intent was to only save the solution file into the Level2 folder.

When following my steps, you should end up with:
1. One project file, located under PhantomBinFolder.
2. Two solution files, one (original) located in PhantomBinFolder, and one (from SaveAs) located in Level2.
3. Three bin folders, one (original) located in PhantomBinFolder, one (from SaveAs) located in Level2 and one (Phantom) under Level1. If you build the solution located in Level2, the files should go to the bin folder located in Level2 (not Level1), which is as expected, because the output path is relative to the project file located in PhantomBinFolder.

Thank you for your time. Please let me know if I can be of any further assistance.
Posted by Microsoft on 2/21/2010 at 11:20 AM
Correction to the directory structure in last comment:

\Level1
---\Level2
-------PhantomBinFolder.sln *
-------\PhantomBinFolder
-----------PhantomBinFolder.sln
Posted by Microsoft on 2/21/2010 at 11:18 AM
Thank you for your feedback. I followed your repro steps and got the following directory structure.

\Level1
\Level2
     PhantomBinFolder.sln *
     \PhantomBinFolder
         PhantomBinFolder.sln

As per the repro steps, I opened the solution located in Level2 ("*" next to said solution). The build output folder is "..\bin\Debug\" which corresponds to "\Level1\bin\Debug". Thus, when I open the solution in VS, the bin folder is created in Level1. When I build this solution, the build files are saved in "\Level1\bin\debug". All of this behavior seems expected to me. Could you clarify what I am missing?

Thanks,
Richa
Posted by Darren Stones on 2/10/2010 at 12:54 AM
Hi,

I also have this problem with Visual Studio 2010. It seems to create it one directory level above where I would like it too. The actual directory is empty. This occurs on Windows XP too. My Release and Debug go to different directory trees. Also this occurs even when XML Dcoumentation is not enabled.

Example:
    Build
         bin -> this is the phantom folder (empty).
         Tools
             bin -> This is the real output.
Posted by Microsoft on 2/4/2010 at 7:01 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you
Sign in to post a workaround.
Posted by hgHollo on 11/29/2010 at 4:05 AM
Well, I think I've found a tricky workaround to this problem. The problem occurs in VS2008, if you selected to generate XML documentation and XML's target folder is outside of the project's folder.
The workaround I found is that instead of redirecting the XML document to the same folder as the project's output path, let the doc be generated direclty in the project's folder (this way, those phantom folders won't be created) and create a post-build event command which would move that XML file to the exact output folder, like e.g.:
if exist "$(ProjectDir)$(TargetName).xml" move /Y "$(ProjectDir)$(TargetName).xml" "$(ProjectDir)$(OutDir)"