Solved

VC++ Win32 project in .NET solution compiles as an .EXE file rather than .DLL

Posted on 2006-06-17
2
532 Views
Last Modified: 2008-01-09
Hi,

I have a .NET solution consisting of a VB.NET Add-In project, a VC++.NET Win32 project which I'm using to store an image for my Add-In in a resource file and the Setup project for this solution.

I opened the VC++.NET's project properties window and changed its "Configuration Type" from "Application (exe)" (which was the default value when I added this projecvt to my solution) to "Dynamic Library (dll)" which is the format I need for my Add-In.

However, to my surprise, every time I compile this project I get an .EXE file instead of a .DLL file!!! I've changed the above property to a lot of different options out of curiosity and it always created the expected output format except for... DLL!!!

I tried to test this behaviour in a few test projects, and it looked like I was playing the lottery... One tested project worked and the output was DLL while a few others stuck with .EXE even if the selected "Configuration Type" was "Dynamic Library (dll)"  rather than "Application (exe)"!!!

Then, when I compile my solution (the add-in, resource file project and the setup project) at a certain point I'm getting the error message "Microsoft (R) Visual Studio registry capture utility has encountered a problem and needs to close".
If I close this message box by pressing its OK button, the setup carries on as nothing happened and compiles all three projects successfully!!!

Could anyone help?

Thanks!!!
0
Comment
Question by:sterlingdev
2 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 500 total points
ID: 16925962
Maybe it is more simple to create new Win32 Dll project than to convert existing exe project?
Generally, such conversion is possible. It is necessary to compare all linker and compler options in Dll and exe projects, and make required changes. But I beleive that creating new Dll us mich better.
0
 

Author Comment

by:sterlingdev
ID: 16943397
I've recreated the VC++ project directly as a DLL and it worked!
Thanks!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Problem to Popup 2 53
.net VBA word safemode 1 24
C# Error - Add Failed 12 52
Loop through Multiple Processes Async 2 17
IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now