miwaypro Posted October 14, 2005 Posted October 14, 2005 Can somebody tell me How to incorporate a C# Project into a VB.NET Solution?? Quote programing programer program
VagabondSW Posted October 14, 2005 Posted October 14, 2005 From within Visual Studio, right-click the Solution at the top of the Solution Explorer and select Add Existing Project from the pop-up menu. Browse to the C# Project and add it to the Solution. It will appear in the Solution Explorer. Of course, if you're adding a new project, you will create a new C# project instead of adding an existing one. Now, right-click the References object in your VB Project and select Add Reference from the pop-up menu. Select the Projects tab on in the Add Reference dialog and click the Select button after you have chosen the Project you wish to add. Click OK once your C# Project appears in the Selected Components list. Make a note of the 'namespace' of the C# project you are adding. At the top of the code window in your VB Project, you should now be able to type "Imports " and have the namespace of the C# Project appear in intellisense. You should now be able to consume the C# Project in your VB Solution. Download Temporary Sample Solution - This download will not be available at this location forever. Quote "Never ascribe to malice that which can adequately be explained by incompetence." -- Napolean Bonaparte
miwaypro Posted October 15, 2005 Author Posted October 15, 2005 (edited) From within Visual Studio, right-click the Solution at the top of the Solution Explorer and select Add Existing Project from the pop-up menu. Browse to the C# Project and add it to the Solution. It will appear in the Solution Explorer. Of course, if you're adding a new project, you will create a new C# project instead of adding an existing one. Now, right-click the References object in your VB Project and select Add Reference from the pop-up menu. Select the Projects tab on in the Add Reference dialog and click the Select button after you have chosen the Project you wish to add. Click OK once your C# Project appears in the Selected Components list. Make a note of the 'namespace' of the C# project you are adding. At the top of the code window in your VB Project, you should now be able to type "Imports " and have the namespace of the C# Project appear in intellisense. You should now be able to consume the C# Project in your VB Solution. Download Temporary Sample Solution - This download will not be available at this location forever. Before i built my C# solution, should i need to change my output to dll instead of window application? Then just add in the dll file, can i do so?? Edited October 15, 2005 by miwaypro Quote programing programer program
VagabondSW Posted October 17, 2005 Posted October 17, 2005 I don't know for sure. I'm going to say "no". You should not have to change the output for your C# class. Quote "Never ascribe to malice that which can adequately be explained by incompetence." -- Napolean Bonaparte
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.