Home Dashboard Directory Help

Adding a file to a Solution Folder opens the file - even with DTE.SuppressUI = true by rdrenker


 as By Design Help for as By Design

Sign in
to vote
Type: Bug
ID: 140181
Opened: 6/19/2006 9:55:37 AM
Access Restriction: Public
User(s) can reproduce this bug


Adding any file to a Solution Folder causes the IDE to open the file.

I have a number of files that I am adding to a Solution Folder.

I'm using the "Project.ProjectItems.AddFromFile(<filename>)" call to add these files, where the "Project" is a Solution Folder. This is causing the file to be automatically opened within the IDE (the same behaviour exhibits if I added the file manually through the IDE)

One of the files I'm adding to the solution folder is a ZIP file, and having the DTE open the file after the add is consuming a lot of time.

Setting the DTE.SuppressUI = true doesn't solve the problem.

This behaviour only seems to manifest when adding to a solution folder - adding to a regular "Project" doesn't cause the file to open within the IDE.

Sign in to post a comment.
Posted by Cédric Guillemette on 10/6/2010 at 8:41 AM
The .vsmdi extension is also opening.
Posted by Cédric Guillemette on 10/6/2010 at 8:23 AM
I get also a problem adding files of type .sdf, a COMException occurs.
Posted by Cédric Guillemette on 10/6/2010 at 8:17 AM
The problem occurs also for vsixmanifest files. It even triggers a message box saying "VSIX Manifest Editor The VSIX manifest file you are attempting to load is invalid".

But if I double click on it in solution explorer it loads properly.

What am I doing wrong?
Posted by Cédric Guillemette on 10/6/2010 at 7:38 AM
This problem is still occurring in VS2010. A .txt file is not opened but a .docx and .msi are opend for example. Why some extensions are opened?

This is anoying because when an .msi file is opened the user as to cancel the setup for execution to continue.

Is there any workarounds? SuppressUI is not fixing the problem.

Posted by Microsoft on 9/14/2006 at 4:19 PM
Thanks for your bug report!

We have reviewed your bug and have determined that the behavior that you described is by design. We are now archiving this issue. Thanks for using Visual Studio!

-VS DTP Code Essentials QA
Posted by Microsoft on 7/14/2006 at 9:55 AM
Thank you very much for providing your feedback. We will not be able to address this in the next release of Visual Studio, but we will consider making this behavior consistent in the future.

-Grigori Somin
Sign in to post a workaround.