Solved

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

Posted on 2006-06-17
2
537 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

775 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