How to include sharppcap library into Visual Studio? - visual-studio-2010

Sorry for the noob question. I don't really know how to make sharppcap library working in my project. I'm using Visual Studio 2010.

Right click on your Project in Visual Studio-->Select Add reference --> Browse --> find the Sharppcap library and click done.
You should now be able to use the Sharpcap library in your project.

In your application find Reference option, right click on it and select Add Reference. Choose your sharppacp.dll and add it.
At last write using sharppacp ; in your application.

Related

Visual Studio dependencies between projects: automatically open up related solution when browsing through code references? [duplicate]

I have a C# project which contains references to assemblies in DLL format. I have the PDB information for these DLL files, contained in the same folder. When I press F12 on a referenced member, I want to go to the definition of the member. Instead, it gives me the metadata, which of course I don't want.
When VS is debugging, it does go to the source code if I single step into that method. But if I press F12 on that method, it still brings me to the metadata.
There is a similar question here, but it only applies to project references, and the accepted solution has nothing to do with my issue.
"Go To Definition" in Visual Studio only brings up the Metadata
To summarize:
Referenced project is a DLL
I have the PDB information
Single-stepping in debug-mode brings me to the source code
F12 brings me to metadata
I want F12 to bring me to the source code as debug does.
EDIT: Adding as a "Project" is not an option as it creates additional complexity as our solution file references about five other projects which are all under separate source control repositories.
In Visual Studio expand the References section, select the reference to your related project (the one that contains the source code you want to F12 into) right click on it and select "Remove".
Then add the reference back to the project by right clicking on References and selecting Add Reference, under the Projects tab (if your using VS 2012) select (or browse for) the project you want to add a reference to and then click the OK button.
This will rebuild the reference and you will be able to F12 into the referenced projects source code. You will need to do this with all the projects in your solutions that are having this issue.
I don't know why this happens but at least the solution to the problem is rather simple
If you have ReSharper installed, you should bring up ReSharper options, and look for External Sources. There you can specify the relevant options:
It appears that this issue has been solved in Visual Studio 2013. Having the PDB information in the same folder as the DLL is showing me the source code when I use Go To Definition. I do not have the Reflector extension installed.
Is the referenced DLL a project in your solution? I find that when I have the source code for the project, and it's in my solution, Visual Studio is able to link to this code much more easily. (without showing me meta data).
Also, be sure to add the reference by "Project" in the References popup.
This is generally what I do anyways when I have this problem
Hope this helps!
PS. PDB files are usually just for debugging (both locally and remote) and are not used for source code reading in the way you are attempting to use it. ("Go To Definition")
One solution to this issue is to use .NET Reflector, VS or VSPro edition. This program will modify Visual Studio to provide the required functionality.
http://www.reflector.net/
Unfortunately, it costs $135 to $195, which isn't an option for everybody.
Add the reference as a project instead of ..\bin\Debug\referenceFile.dll
That solved my issue
I also used add reference as a project and my problem has been resolved and it's working great. Actually I was stuck at this point from very long time and finally i resolved this issue.
References -> Add References -> Solution -> Projects -> Select reference

Is there a simple way to include a missing reference to an assembly in Visual Studio?

I'm using Visual Studio 2012.
In most solutions I have lots of projects which reference each other.
It's quite time consuming to always add the reference manually.
Is there a simple way (either built-in or via extension) to include a missing reference to an assembly in the own solution similar to the way missing usings are resolved?
Resharper does exactly this. If there's a class that is defined in another project in the solution, it offers you to reference that class and import the namespace. All you do is press "Alt+Enter, Enter" to pop up context menu and select the first option.
As mentioned before, resharper will be a good solution for your request. but if you are looking for a free visual studio extension that does the same you can use 'WoVS Quick Add Reference' extension.
Some info: http://ihadthisideaonce.com/2011/07/29/recommended-wovs-quick-add-reference/
Download link: https://visualstudiogallery.msdn.microsoft.com/dc06b54c-b6c4-4cf5-8203-a09c6979e881/
I hope it supports your questions..
This extension at least offers a way to add references to GAC assemblies
visual studio gallery
But it requires CodeRush and so also isn't a free choice.

How do I add ArcObjects Version to a Visual Basic project?

I am developing a Visual Basic project in Visual Studio 2010 that uses ArcObjects. (I have ArcGIS 10.3 for Desktop.) I am getting the error "'RuntimeManager' is not declared. It may be inaccessible due to its protection level." A previous answer, Esri ArcObjects--Esri.ArcGIS.Version assembly, recommended adding a reference to Esri.ArcGIS.Version by clicking on Project, Add Reference, selecting it under .NET and clicking OK. I have tried to do this, but it's not under .NET. What can I do to make it available?
You should be able to find it if you use the Browse option.
The ESRI.ArcGIS.Version.dll file should be under your DeveloperKit installation folder. For me it is:
C:\Program Files (x86)\ArcGIS\DeveloperKit10.2\DotNet

Converting from console to windows app in visual studio

When changing the project from console to windows app, I still am not able to use the namespace System.Windows.Forms. Do I really need to create a whole new project? If there is a better way, please give a detailed description of how to do this in visual studio step by step, thanks :)
The Console Application project template that you started with does not have the necessary assembly references. Project + Add Reference and select System.Drawing and System.Windows.Forms.
Also be sure to make the necessary changes in the Program class. Main() must have the [STAThread] attribute and you need to add the boilerplate code to enable visual styles and start the message loop. Take a look at a sample Windows Forms project to get that right.
You can use Windows.Forms independent of the the type of project. All you need is a reference to it. In your solution explorer you will find a folder "References" just under your project folder.
Right-click and choose "Add Reference". Scroll through the list and add System.Windows.Forms (and probably System.Drawing).

Watch for addition of a referenced library to a project (Visual Studio 2008 plug-in)

I am hoping someone can help me with this. What I have been looking around for but can't seem to find is if there is someway to add an event, or anything else that will allow a visual studio plug-in to watch for an external reference to be added to a currently open solution / project?
Or even better yet would anyone happen to know of an add-in that automatically adds all controls from a referenced dll into the visual studio toolbox?
Thanks.
Not exactly what you asked, but I've written a Visual Studio 2008 Integration Package, and if I recall correctly I could override the "add reference" method, as well as inherit the "reference node" and thus change its behavior, for example its constructor.
This functionality might be missing from an add-in (which is more limited than an integration package), so you might consider writing a package instead.
I have written a macro that will change a file reference to a project reference if you add the project to the solution (and vice versa), but I don't think that's what you want?

Resources