-1

I am very new to C# and visual studio and I am currently playing around with the idea that multiple languages can be mixed in a solution (C# project and VB project in the same solution). I found what seems to be a stupid simple tutorial:

https://dailydotnettips.com/back-to-basic-can-we-use-both-c-and-vb-project-with-in-a-single-visual-studio-solution/

However, it says:

Here is one simple walkthrough on using this..

1.) Run a new instance of Visual Studio
2.) Create a new C# Console Application Project.
3.) Add a new “Visual Basic Project” using “Add New Project” dialog window”
4.) Add the VB Class Library Project as Reference to C# Project.

So I of course was able to accomplish step 1.

On step 2 I created a "C# windows forms application," but I don't see how that is a problem.

On step 3.) I added a VB console application

I am stuck on step 4. When I right click the C# project and select add and select add reference... I don't see "VB Class Library." Am i doing something wrong? Is it actually called something else? I am using Visual Studio 2015... Is it called something else in VS 2015?

XCELLGUY
  • 179
  • 2
  • 12

1 Answers1

1

I added a VB console application

And why would you think that that was a good idea, given that step 4 specifically refers to a VB Class Library Project? If you are told that you need a Class Library project, add a Class Library project. The screenshot even names the project "VBClassLibrary"/

jmcilhinney
  • 50,448
  • 5
  • 26
  • 46
  • Sorry i didn't understand that detail... Ahh... I see it... let me try that... be right back... – XCELLGUY Aug 07 '20 at 15:36
  • 1
    Yes, but the tutorial is very confusing for a newbie. The point 3 says: _Add a new “Visual Basic Project” using “Add New Project” dialog window”_ It doesn't explain the the project should be a Class Library one. – Steve Aug 07 '20 at 15:39
  • Ok... so to clarify... I added a VB class library project... and I called it "myClassLibrary1." Then when i go to "add reference." I see under "projects" then under "solution" there is "myClassLibrary1." Is that the reference I am adding? If yes... then I think I understand. But I had thought I was adding some "generic library" not the actual one I created. – XCELLGUY Aug 07 '20 at 15:44
  • From what little I read, I would agree that the whole thing could be written better but, even if you added the wrong project type in step 3, step 4 tells you what the correct project type is so you should have gone back and corrected it then. It doesn't say anywhere that you should add a VB Console Application project so why assume that? – jmcilhinney Aug 07 '20 at 15:46