I need to add the following namespaces
• Microsoft.Dynamics.Common
• Microsoft.Dynamics.Common.Types
• Microsoft.Dynamics.GP.BusinessLogic
• Microsoft.Dynamics.Common
• Microsoft.Dynamics.GP
to my project in Visual Studio,
Kindly suggest how I can do so.
First you need to add references to the libraries to your project. Right click the project name and select "Add Reference" or if the project shows a references folder right click that and choose to add. If the library doesn't show in the list then browse to where ever it is located and select it.
Then at the top of the file add a using command. For example:
using Microsoft.Dynamics.Common;
Please feel free to post additional questions.
Either Download and install the SDK on your machine, It will include the dlls needed to integrate with dynamics or copy the dlls from where ever you have them. (make sure you get the correct version for GP). From there you should create a folder in your project to hold the files in one place and copy them there. Once you have the library files you add references to the files by going to the browse sections of the reference manager and then browsing to the where you copied the files. (Quick note. make sure that you set copy local to true so that it will include the files locally when running and not look for them in the GAC). Once referenced you should be able to access the namespaces and include them with using keyword as needed.
If in case you are not getting the required dlls even after installing SDK, then add required Nugets online in visual studio(and later). After that you can start using the keyword "using" in your VS project.
Related
I am trying to make an ASP.NET 5 site use visual studio 2015 preview, and i want to add dll at local file system to the ASP.NET 5 project. But i can't find this option, Is it no longer possible to add local dll? If yes, why?
You cannot add direct reference anymore, you would have to create your own nuget package containing it.
See: http://forums.asp.net/t/2002302.aspx?Adding+a+non+nuget+reference+to+a+vNext+project
As for the why, it is really easier to manage dependencies with nuget, download your sources anywhere, and with a single command (kpm restore) all nuget packages necessary will be downloaded.
If you have project code than you can add Foo.csproj to Bar.xproj as reference but not directly, see instructions below. It can be done without uploading packages in Beta8 but it is not simple as it should be. If you only have Foo.dll there is one hint here: Bin syntax (wrapping a dll)
Go too Foo.csproj folder, type: dnv wrap Foo.csproj.
You should now have some files generated, for me it was Foo/wrap/Foo/project.json. Go to your solution in Visual Studio, Add -> Existing project -> project.json.
Now you have some more files, including Foo.xproj which is available in Visual Studio solution, but it does not build.
Open cmd in Foo dir and execute dnv restore.
After 4) completes with no error and Foo.xproj can be built you can now go to Bar.xproj and add Foo.xproj as reference.
Open cmd in Bar directory and execute dnv restore.
You can now build Bar.xproj
I really hope that this will be easier in final version.
I am trying to use a class library which I found on a different question here.
I am quite new to C#, Visual Studio, and OOP in general, so please excuse me if this is not the right question.
I followed the link and downloaded the zip. The help file does not seem to contain any directions on how to get Visual Studio to utilize the library. I figure that I have to tell it to use the library somehow, but I really don't know what to do. Or maybe I need to copy the .dll to a specific folder. I also assume I need using ... in the top of the .cs files that use it.
How can I use this library in a Visual Studio C# project?
You should add a reference.
In the project you are working on, you can add a reference to the dll (or a library) by doing navigating to:
(Project)->References->Add Reference
[You will find Properties, References and [class]files below your project]
According to your question, you should add "UltraID3Lib.dll" to your project references and use it through adding a using on top of your project files like this:
using HundredMilesSoftware.UltraID3Lib;
After you have successfully added the resource you should build the project and it will copy all the necessary files to your output directory (bin/Release or bin/Debug).
Step 1:
Open Debug Folder (you can find it In your project Folder => Bin => Debug). Copy .dll >files there.
Step2:
In Solution Explorer Right Click on References => Add References
Go to Project Tab.
Under the Project Tab you can find Added References (References added In Debug Folder). >Simply select needed references & hit OK. You're done
Happy Coding....! :D
I went to this site:
https://www.didp.canon-europa.com/developer/didp/didp_main.nsf?opendatabase&login
I have a login and i have downloaded the version 2.1 of the sdk/edsdk
On my hard disk i have some directories one is with a class: EDSDK.cs i have added it to my project no problems.
Then i went to the directory: EDSDK>Dll
I tried to add there all the dll's and each one of them can't be added.
For some reason on all of them i'm getting the erorr:
Could not be added please make sure the file is accessible and that is valid assembly or COM.
I tried to go through this instruction by someone else who did it and managed to make it work here:
http://dickchiang.blogspot.co.il/2008/01/programming-with-canon-digital-camera.html
This comment:
Dick Chiang said...
Assuming you have EDSDK 2.1 (the same version I'm using), you would do something like: 1. Create a new project under VS2005; 2. Copy/include a copy of the EDSDK.cs class file that came with the EDSDK (I appears under the SAMPLE\CSharp\COMMON on my installation) into your project; 3. Copy all the DLL's found under the EDSDK\DLL folder onto your project output folder (not sure if there's a simpler way to do this by specifying the path where to look for the DLL's); 4. write your program to access the SDK via the EDSDK.cs class file that I mentioned in item 2.
I'm using visual studio c# 2012 pro windows 8 64bit
I can't email to the site where i have downloaded the sdk/edsdk since they are not supporting this things. I tried to email them before and they are not supporting.
What else can i do ?
Those are native dlls, so you don't add them through the Add References dialog. You simply copy them into your project directory and add them to source control via windows explorer. Then in VS you right-click your project and choose "Add Existing Item" and add them that way. Finally once they're added, you need to go into their properties in VS and change the Build Action to Content, and Copy to .. to "Copy if Newer".
The dll's functions are called via P/Invoke from C#, and the EDSDK.cs class provides a wrapper around all those calls if you look at it. The above steps make sure that the EDSDK dlls are copied to your build path when you compile your app, so that the compiled EDSDK.cs code can find them for the p/invoke calls.
Read up on p/invoke to get a better understanding.
I've downloaded a framework with samples in .csproj project format.
How can I open them in MonoDevelop?
I'm interested in using some classes in that framework.
It has a folder structure like: Accord.Statistics.Models and a main folder Accord with a subfolder Statistics with a subfolder Models with a file ModelFoo.cs
I want to use that file (that begin with
namespace Accord.Statistics.Models
) in a MonoDevelop Solution under Ubuntu.
If I copy the folder or single files inside my new Solution I get the error
Are you missing a using directive or an assembly reference?
How can I do?
Create a new empty solution, copy your projects and their sources into the solution folder, then right click on the solution in the solution explorer
("View" → "Pads" → "Solution") and choose "Add" → "Add Existing Project".
Rather than opening the VS project file, you may be better off making a MonoDevelop project file and adding the code files and references necessary (typically Accord.dll, Accord.Statistics.dll, or something along those lines) to your new project. That is, of course, if MonoDevelop doesn't have an import function.
Generally, the "missing using or reference" error comes when you use a symbol defined outside of the current project. If you're actually using something from another assembly, you need to add it as a reference to the project, so the metadata is imported and used to link. If it's from the same project, you may need to import the namespace with a using Accord.Statistics.Models statement.
First of all, I would use a separate solution file for MonoDevelop because MD sometimes puts slightly different settings in there. The same applies to .csproj files, so if you want your project compilable with both VS and MD, watch out that you don't commit any project file changes that don't work in VS.
Regarding your problem: Remove the references using MD and re-add them. MD adds references in a way that they're compatible with both VS/MD (my experience).
during development of our application we use a branching structure and while we are developing another team is using earlier builds of our software to create content with it.
To facilitate easy swapping between builds and teams I was hoping to use empty Hintpaths in the content projects' csproj files so that they can use our GAC installed assemblies to build against and in the meantime add a reference path to the projects for our use during development and test cycles where we don't want any assemblies installed in the GAC.
However, it seems reference paths are not stored in the csproj file and thus don't get sourcecontrolled. Since there will be extensive branching it would be less than ideal to have to set all reference paths again when a developer pulls another branch from sourcecontrol.
I've been searching for a bit now and can't seem to find ways to do this. Anybody know of a way to force the reference path in and out of sourcecontrol?
We're talking Visual Studio 2008 and TFS 2008 here.
Cheers,
Anton.
Ok, I seem to be a little clearer in the head after a good night's sleep, took the logical step, namely investigate where exactly the information was stored and how. It turned out the information was stored in the .user file for the project in the project's folder and as it turens out this file contains mbsuild xml.
I then did what I wanted as follows:
Create the Reference path as I required it to facilitate both scenarios without any work.
Browse to the Project's .user file
Copy the PropertyGroup containing the ReferencePath
Paste the PropertyGroup in all the necessary Projects' .csproj xml.
Reload and build.
Done.
The references are stored in the *.csproj file. The nodes are ItemGroup/Reference...
Thomas
This is pretty simple--we do this in our shop.
First, in the Workspace (using Windows Explorer, browse to the Solution folder), create a folder. We name it "Referenced Assemblies". In here, drop all your DLLs.
Now, in the Solution, add a new folder to match the one created in Windows Explorer. Into that folder, add all the DLLs you just dropped in.
Finally, in each project, set up your references to use the DLLs that were added to the solution.
Now your project references DLLs that are part of the solution, so that when the build runs, it will grab the DLL from Source Control to generate the build.
Also, I'd recommend not using the GAC at all if you can avoid it. In my experience, reference behavior is strange. It seems references go first to the GAC, then to the DLL in the local folder, meaning that if the DLL is updated, the one in the GAC is used instead of the DLL in the local folder (which is likely the updated one).