Why I cannot see "Add Reference" - vb.net

I am new to visual studio, I am trying to add "Inventor" reference, I added it from Solution expolrere - Dependancies - Rightclick - Add project reference. However, it may not inserted correctly because I can see it doen't get intelegency in code when I try to accesss the Inventor API.
Second thing,Does the Add project reference and Add reference is different thing?
Moreover, why I cannot see "Add reference" instead of "Dependancies"?
I am using Visual studio 2019.

Related

How can I add a module to a project in VS 2017 enterprise?

I'm taking a VB course that uses the 6th edition of Gaddis (2012). It says that to add a module to the project I must do the following;
However, this option is missing in my install of VS 2017 Enterprise. Is my install messed up, or has this functionality changed since Gaddis 6th came out, or am I missing an installed piece? If my installation is incomplete, which feature should I install?
The selection of Project Item templates changes in every release of Visual Studio to help advertise whatever new features came out in that edition. Use the search box in the top right corner to search for "module".
You need to have the VB project selected in Solution Explorer for the Add New Project Item dialog to suggest VB items. If you're seeing C++ items then you're in a C++ project or you're in the "New File" or "Add New Solution Item" (not Project Item) dialogs:
File > New File
New Solution Item
New Project Item (Visual Basic)

How to add Linq to SQL class

I can't find Linq to SQL class when I tried in my VS2017.
From within a C# application, on the Project menu, click Add New Item, then there is not 'Linq to SQL'.
On Visual C# Items, it only shows
Classes
Class for U-SQL
Forms Blank Content Page Xaml
... and the last item is
WCF Workflow Service.
There is any Setting error on me?
Would you tell me any hint?
First step - Missing LINQ to SQL Classes (DBML designer) in Visual Studio 2017 RC
Second step - Go to project properties -> Under Application tab select Target Framework to .NET 4.0 or higher and save.
It resolved my issue, hope it resolves yours too.

Reason for toolbox items being greyed out [duplicate]

I'm trying to add a chart to my Visual Studio form but the button is greyed out. I'm using .NET Framework 3.5 and C#. Following instructions online I've downloaded and installed the dll files from this link: http://www.microsoft.com/en-us/download/details.aspx?id=14422
I also added them as references and added the following line at the top of my form file:
using System.Windows.Forms.DataVisualization.Charting;
but the button is still greyed out.
What have I missed?
To make the chart control available, you need:
To be using .Net framework 4.0 or higher, OR for .Net framework 3.5 install this: http://www.microsoft.com/en-us/download/details.aspx?id=14422
On the toolbox context menu -> Choose Items... have the Chart control selected. (Sort by name in the Choose Toolbox Items dialog and scroll to Chart. There are two: one for Windows forms, one for Web forms. You need only select what's relevant.)
The chart control appears in the "Data" section of the Toolbox.
You do NOT need to any any "using" clause to the form source file, or any reference in the project references. (The reference is added automatically for you when you add the control.)
I too had this issue and could not resolve it for hours.
As posted here:
Visual Studio 2010 toolbox controls disabled or inactive
In order to solve it for me I just right-clicked one of the items in the toolbox, and chose "Reset Toolbox"
This resets the entire toolbox, so as mentioned in the answer above, all custom tools are lost and need to be re-imported.
Had the same problem.
What I did was to make sure that I was using the same Framework with the chart framework version.
During project creation, by default using .net 3.5. But since the chart is written for Framework 4.0, it will not work with 3.5.
You need to change the solution or project Framework to 4.0 or above by doing this:
On the menu bar of Visual Studio, click <your project name>/Properties.
Change target framework to 4.0 or above.
Save the properties setting.
Rebuild your solution.
After this, you may use that chart component.

Adding DLL reference to VB.NET project

Just to start off, this question does seem very similar to another post Add the DLL (lame_enc.dll) reference to my project, but I haven't been able to successfully apply that answer. I am pretty new to VB.NET so it is very possible I'm simply missing something obvious.
I am trying to link a DLL to a VB.NET 2010 project to allow my VB app to play *.ogg files. I followed some other advice here on the forums and downloaded FMOD's FMOD Ex Programmers API. I am trying to now reference that functionality. These appear to be the files I need to somehow reference.
C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Windows\api\fmodex64.dll.
C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Windows\api\libfmodex64_vc.lib.
I haven't discovered how to add a *.lib reference (or the equivalent), but selecting the DLL as a reference gives the following error.
A reference to 'C:\Program Files (x86)\FMOD SoundSystem\FMOD
Programmers API Windows\api\fmodex64.dll' could not be added. Please
make sure that the file is accessible, and that it is a valid assembly
or COM component.
I'm not sure what I could be missing. Any ideas? Thanks!
In Solution Explorer, double-click the My Project node for the project.
In the Project Designer, click the References tab.
Click the Add button to open the Add Reference dialog box.
In the Add Reference dialog box, select the tab indicating the type of component you want to reference.
Select the components you want to reference, then click OK.
Another approach I was trying is working for me. I found a site with a working example of a LibZPlay VB.NET sample ( http://planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=7789&lngWId=10 ). It runs under VS 2008 and I was able to adapt my project to use LibZPlay (open source library http://libzplay.sourceforge.net/WELCOME.html ) under VS 2008.
That is sufficient for me for now. Thanks for your advice. It was likely some configuration issue or misunderstanding on my end.
Using VB.net 2015 I (could not add or even find a System32 dll) as a reference using Solution Explorer, Tab References. Going to the MAIN Menu, Projects/Add References...
Used Browse and All the System32 dll were visible. Then I was able to load the needed dll.

How does the Visual studio populate the references tab?

How does the Visual studio populate the references tab?
By using something like currentDomain.GetAssemblies() or what?
Visual Studio will search for all assemblies in the "reference paths".
Reference paths can be defined per-project using a project property; but they can also be set in the registry.
Take a look at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders.
Which references "tab" are you referring to? The Add Reference dialog has a tab for .NET , COM, and Projects (plus the Browse and Recent tabs, which you probably aren't interested in.
The most obvious one is Projects, which simply shows you the projects in your solution that aren't already added as a reference to the current project.
For COM, it looks at all of the COM components which have registered TypeLibs from HKEY_CLASSES_ROOT\TypeLib.
The .NET tab uses the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders registry key for the list of folder paths. It also looks at %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies or %ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies (again, depending on the version). If you have VS2008 installed, you can also add additional paths per project in the "Reference Paths" tab of the project properties.