I have some problems with the references. But first let me clear the
circumstances. I use Win7, VS 2010, .NET Framework 3.5.
I have a project previously worked on by a colleague.
Now I have the project for some further changes and the programm does not find the Microsoft.DirectX.AudioVideoPlayback reference.
I have tried adding to manually but I do not find it in the given path.
Does anyone have another solution, which provides me the right way?
That seems to be a reference to the Microsoft DirectX SDK. You would have to download and install that first via Microsoft's website, then the DLL-files can be found in %SystemRoot%\Microsoft.NET\DirectX for Managed Code\1.0.2902.0.
Related
First of all, I don't know much about Roslyn. I went through a few tutorials hot to generate code and how to parse a string containing code.
So far, everything is clear to me.
Here is my question:
I'm using dotnet core 1.0.1 on Linux.
I created a new project with some interfaces defining some properties.
What I want to do is to create a program in which I can load the project, run trough the interfaces (*.cs files) and generate some code.
My problem is, I don't know how to load/open a c# project with Roslyn.
The tutorials I found are using a windows environment. These samples doesn't work on my environment because there are some dependencies to MSBuild or Visual Studio. I read and tried some things about the AdhocWorkspace, but I didn't manage to open an existing solution this way.
Can anyone give me a hint how to start?
Is it possible to open/load a project (*.csproj) and run through all *.cs-files?
Thanks in advance.
Currently, there is no good way to open .Net projects using Roslyn on .Net Core.
See this issue on the Roslyn repo, where the recommended solution is to use code from the Omnisharp project.
I have a .NET solution consisting of several projects - most of these are just simple c# libraries. One of them is an MVC web application.
All the references of every project is missing references. Here is an example:
I have de-selected all projects for build except this one (shown above) simple c# library project which has no dependencies on any other in the solution.
I've checked things like the .proj file in Notepad but can't see anything unusal.
If I remove one of the references such as System.XML and then re-add it, it gets re-added but still with the missing warning icon! So the Dll's are in the .NET frameowrk directory as you'd expect.
I'm really quite stumped with this.
It's .NET framework 4.5, Windows 7, x64.
Thanks in advance for any thoughts / help!
Kind Regards
Richard
Several points to check to know why they seem to be missing:
Paths
Assemblies: Are they built for the same .NET version of your
project (Portable, not portable, windows phone, etc...)
For the query you asked, you can refer the below link
How to add references and nugets in visual studio project template?
For the references, according to the image, it may refer to the GAC and not the local bin folder of the solution.
Remember, the best way is always to maintain the references in the Bin/Reference folder and then refer from it. Add them to the solution so that you may not loose them when you compress and move them to another system.
The following link will help you how to add the references
https://msdn.microsoft.com/en-us/library/7314433t(v=vs.90).aspx
Following below steps resolved the issue.
Ensure the .dll exists in the properties path
Still,if issue exist,then click on properties that fix the problem
I'm trying to add the Libspotify SDK to a test solution. However, I got the following error:
Now, I tried following the first answer of this question. However, all I got was:
The package of the library is structured in the following way:
Additionaly, my project is targeted to .NET Framework 4.0
And the configuration is done as follows:
What can I do to add this library?
EDIT:
Also, I found this link where someone explains that it need to be copied manually into the project output directory. I tried putting the .dll there, but I guess I have to modify something else to make it work. Any ideas?
The libspotify.dll you are trying to access is a Win32 C library, not a C# (.NET) assembly. As such, you can only use it through interop.
You don't have to do this yourself (judging by your question I'm assuming you have no previous experience with the techniques involved), you can use a ready-made solution like libspotify.NET.
I started using Thrift about a week ago. I got the latest source from SVN and built the C# library (Thrift.dll). I used the library to prototype a TCP client/server with the data types that my team will be using. This worked with no problem, I just followed the example code in the SVN repo.
Yesterday, I wanted to run the same test but over HTTP instead. I searched around online some and found out that from the time I got the code last week until yesterday patch "THRIFT-322" https://issues.apache.org/jira/browse/THRIFT-322
Was applied to the trunk. So I updated my thrift source from SVN and saw the new THttpHandler class. I rebuilt the Thrift.dll so I can use the THttpHandler class but now whenever I reference the new dll Visual Studio 2010 gives me an error at compile time: "The type or namespace "Thrift" could not be found (are you missing a using directive or an assembly reference?)". When I replace the reference with the old Thrift.dll that I have I do not get this error.
I can't figure out what I'm doing wrong, I just recompiled the Thrift.dll from the SVN source and I can no longer link to the Thrift.dll. When I first add the reference it seems like it's going to work fine. Visual Studio gives me the correct intellisense, etc. Once I try to build it's like there is no longer a reference to the Thrift.dll. Any ideas?
I also submitted this to the Thrift Users Mailing List, I just thought maybe this was more general and someone here may be able to help.
Thanks,
-Sean
Since you mentioned using VS 2010... I have seen this error/behavior sometimes when I am compiling a .NET 4.0 project and my target framework for the project is set to ".NET Framework 4.0 Client Profile" instead of ".NET Framework 4.0". So you might want to check that and see if it helps.
I had a similar problem I had to switch from '.NET Framework 4.0 Client Profile' to '.NET Framework 4.0' and it worked because a referenced dll is compiled using the '.NET Framework 4.0'
One Suggestion I have is to check for a file with 'refresh' in the extension E.g. Thrift.dll.refresh or something similar. This file is usually added on adding a refernce. Try removing this file, replace the dll and try builtign and running again.
I've installed a complete SharePoint Server (MOSS) 2007 on my dev box + the latest Visual Studio (SP1) + the latest full Windows SDK. According to the Windows Workflow Foundation page http://msdn.microsoft.com/en-us/netframework/dd980558.aspx, that is all I should need to do to be able program against the .NET Workflow APIs.
And yet, all of the projects I build from the standard Workflow templates refer to the assembly System.Workflow and VS complains that that assembly isn't available. I've searched around on my hard drive, and I can't find a file for that assembly anywhere obvious on my disk.
I do find some files that look like they might be that assembly, but they're buried down in wacky places below particular applications like they are runtime support for that app. They don't seem to be what I'm supposed to point VS at.
Can anyone tell me how to fix this problem? Do I need to install something else that I have yet to come across? Are these assemblies already on my system and I just need to know how to point VS at them? I'm stumped.
BTW: I was going to try uninstalling and reinstalling VS, but the installer fails with some very cryptic error message when I try to uninstall.
TIA for any help, and Happy Holidays to all!!!
I did a Repair using the .NET 3.5 SP1 SDK distributable, and I believe that this solved the problem. I thought at first that it didn't (as I say in prior comments) because I was looking for the files to show up in the v3.5 assembly directory. The missing files actually go in the v3.0 assembly directory. I later brought up one of the sample projects in VC and noticed that the symbols were now resolving, and sure enough, the missing .dll files were now present.
So I guess that the .NET SDK installer that ships with VS somehow didn't install these .dll files. It took doing a Repair on the SDK to fix the problem.
I'm a happy camper now!
In addition to change the target framework to 4.0, you also need to:
Add a reference to System.Workflow.Runtime
Add a reference to System.Workflow.ComponentModel
There's no assembly named System.Workflow in .NET 3.x: the WF assemblies (in 3.x) are:
System.Workflow.Runtime
System.Workflow.ComponentModel
System.Workflow.Activities
System.WorkflowServices (3.5)
You should be able to find all these assemblies in the GAC, and reference them via the Add Reference dialog, .NET tab.
It's possible System.Workflow is a (badly named) SharePoint-specific DLL, in which case, sorry, the above won't help... try the SharePoint install directory or SharePoint SDK install directory. Are the project templates you're using SharePoint templates, or the ones from File > New Project > Visual C# > Workflow?
I have a same problem, and solved it. The reason is your project's target .net framework not include this assembly (it's maybe .net 3.5 client profile or 4.0 client profile). The solution is very simple: set the target framework of your project to .NET Framework 3.5 or 4.0.
It work for me.
Please find it in C:/Windows/Assembly/GAC_MSIL
All the DLLs are Present there..
Also If U donot Find it then do the Following
Right Click Project->Application->Target Framework-> .Net Framework 4.0
It should show Up then.