Visual Studio and .NET Framework Home
Cannot develop ATL project in a solution of which the first project is MFC
Bruno van Dooren
1/7/2009 11:12:12 PM
User(s) can reproduce this bug
If you create a new MFC project in a new solution, you cannot develop ATL EXE projects in that same solution.
You can add the new ATL project, but if you try to add a 'ATL Simple Object' to the project, you get the message 'ATL Simple object can only be added to MFC EXE or MFC Regular DLL with full ATL support' if you use VS2008SP1
With VS2010CTP, you nothing special happens, but the dialog for
creating the ATL simple object never appeared and subsequently although I can access the 'Add' menu item from the Class View pane, the "Class" sub-menu is now in an
active state and nothing happens
If I try to close the IDE I get:
"Microsoft Visual Studio cannot shut down because a modal dialog is
active. Close the active dialog and try again.
".. but there isn't any visible dialog I can do anything with :)
(Thank you David Lowndes for reproducing this)
Visual Studio 2010 CTP
Windows Server 2003
Operating System Language
Steps to Reproduce
1) Create a new MFC dialog project + solution.
2) Add an ATL Server project, with project type set to EXE (this is important)
3) Try to add an ATL Simple Object to the ATL project.
Either an error message pops up (VS2008 SP1) or VS is in an invalid state and cannot exit (VS2010 CTP)
The 'Add new object' wizard should appear
TAP Code (if applicable)
You can indicate your satisfaction with how Microsoft handled this issue by completing this quick
3 question survey
to post a comment.
Please enter a comment.
on 10/28/2009 at 10:55 AM
Oh, I forgot to mention that my ATL project is DLL (although I used an option to merge proxy/stub), so the info in the workaround is not accurate.
on 10/28/2009 at 10:53 AM
I tried it on VS 2008 v.9.0.30729.1 SP and got the same problem. I have a solution with quite a few projects (some of which are MFC), so added an ATL project to this solution and when I tried to add a simple ATL class, I got the error. Tried it a few times with no success. Then I closed the solution and opened the ATL project directly (which loaded the solution) and the operation succeeded. Go figure.
on 1/20/2009 at 8:20 PM
This functionality was still broken in the CTP, we have fixed it since and you should see the correct behavior when we ship the next build externally.
Thanks for reporting the issue,
Visual C++ Team
on 1/8/2009 at 10:26 PM
Thanks for your feedback. We are escalating this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.
Visual Studio Product Team
to post a workaround.
Please enter a workaround.
Bruno van Dooren
on 1/7/2009 at 11:13 PM
The only way to make it work is to edit the sln file with notepad, swap the order of the projects in the beginning of the solution text, so that the ATL project comes first, delete the ncb and suo files, and open the solution again.
The problem does not exist with ATL DLL projects, or if the ATL project is created first, and then the MFC app is added.
© 2014 Microsoft