Today I tried to include some videos for cutscenes but I failed on even getting the variables recognized.
If I try to access Microsoft.Xna.Framework.Media.Video or Microsoft.Xna.Framework.Media.VideoPlayer it is just missing.
.Media exists but Video/VideoPlayer is just not there
I also can't use "using Microsoft.Xna.Framework.Media;".
If I copy the exact same project to the example project on the Microsoft website it recognizes "Video" and "VideoPlayer" but of course everything else will not work cause of the wrong namespace, missing content and all that stuff.
I already reinstalled the complete SDK with XNA and .NET Frameworks but it still doesn't work.
If I create a new project and copy it there it doesn't work too, did I miss something?
Do I need something else except using Microsoft.Xna.Framework.Media.Video?
I compared the full projects but couldn't find any difference at all.
You are missing a reference to Microsoft.Xna.Framework.Video.dll.
That is where those two classes are located.
Sorry for late answer but this could be helpful..
You can try to install nuget package directxtk_desktop_2015 this will fix issue.
here is reference link.
It looks like your project is missing a reference to the assembly: Microsoft.Xna.Framework.dll.
UPDATE:
Kendall Frey is right, although Microsoft says in the documentation that the Video and VideoPlayer classes are in Microsoft.Xna.Framework.dll, this information is incorrect and these classes are really in Microsoft.Xna.Framework.Video.dll
Related
I'm trying to add some JSON parsing to the C# code in VS2015 but I can't find:
System.Web.Helpers
as the MS documentation suggests. I've looked at other people's questions of a similar nature (almost all on earlier versions) and the answers all say to add it in the Assemblies / Framework dialog.
The problem is it doesn't appear in that dialog, nor do many of the other things I see people talking about.
I would really appreciate any help on fixing this.
Here is the list I have access to:
Edit: Added the Extensions window as well
This question is a bit old but here's a simple solution - Microsoft seemed to just move this library to a Nuget package called "microsoft-web-helpers". Installing that package seems to be equivalent to having the assembly.
Old question but might still help someone.
You must install MVC 3 in order to have the System.Web.Helpers Extension on VS2015.
link to download: https://www.microsoft.com/en-us/download/details.aspx?id=1491
You cannot find it because of the simple fact that's not part of the Framework assemblies (what you are looking at).
It's part of the Extensions assemblies, and, as posted here, you will find it under "Extensions" in the left-hand side of the dialog.
I was wanting to work with JSON as well in an ASP.Net project using VS2015.
I ended up here trying to find answers. Right about the time I finished reading the other answers on this post I noticed my project already had a reference to Newtonsoft.Json. Never heard of it before so I looked it up; I'm glad I did.
It was literally a one liner to Serialize a List<String> to JSON.
You can pass in an Object so you should be able to serialize most any Object within reason.
Ultimately I didn't need to install MVC3 or reference System.Web.Helpers
Hope this helps!
NewtonSoft Serializing and Deserializing JSON
I stumbled upon the same issue and fixed it by adding NuGet Package ->
Microsoft.AspNet.WebPages
I've seen the above question asked many times on many sites, but I haven't seen an answer that fixed the problem.
The scenario is this...
I am on .NET Framework 4.0, building a C# web application in VisualStudio 2012 Express with the Razor view engine.
I'm trying to use Microsoft.VisualBasic.FileIO.TextFieldParser in my code. From what I've read it is appropriate to do so by adding a project reference to Microsoft.VisualBasic, which I've done, and coding #using Microsoft.VisualBasic; in my view. However when I code...
Microsoft.VisualBasic.FileIO.TextFieldParser parser = new Microsoft.VisualBasic.FileIO.TextFieldParser(new StringReader(xxxxxxxx));
...in the view and rebuild the solution it returns errors: The type or namespace name 'FileIO' does not exist in the namespace 'Microsoft.VisualBasic' (are you missing an assembly reference?)
I know the reference is in the correct project because when I add and remove it I see it come and go from the references folder. I know the code I'm trying to reference exists because I can see it in Object Browser. I've even tried adding the reference using Object Browser instead of through the menus and although it gets added, the results are the same.
The solution it's in is a bit complicated so I tried just creating a test stand alone C# project and I get the same results. I also tried creating a test stand alone Visual Basic project, and sure enough, it works there as advertised. I'm by no means an expert on Visual Studio so I'm guessing that it's just something I'm missing in the configuration, but I'm at a loss to figure it out.
I've spent days on this, so any help anyone could offer would be greatly appreciated.
Right-click on your project and select Add Reference...
In the Reference Manager, expand Assemblies and select Framework. Then check the box for Microsoft.VisualBasic and click OK.
Credit goes to:
https://stackoverflow.com/a/17146200/2530360
I just had the same problem and your question title was more verbose so I figured it should have the answer inside.
I'm trying to get the sample code for RAPI2 to compile: http://rapi2.codeplex.com/documentation but, amongst other errors, it can't seem to find 'RemoteDeviceConnectEventArgs' any ideas why this is? I've included the DLL it comes with and have included System.Devices (but I don't have a System.Devices.Interop anywhere and not sure if it's something hte library should provide or if I should include another assembly for that namespace).
I had the same issue. I solved it by downloading the latest version of RAPI2 here : http://rapi2.codeplex.com/downloads/get/347232
It seems the version I downloaded previously was not up-to-date for an unknow reason.
After I build a few of my references, which are present in the project and accessible through intellisense before the build is performed.
Unfortunately none of my projects are set to target Client Profile, as answered in this thread.
The type or namespace name could not be found
This seems to be the most common cause, does anyone know what else other than this can cause the same issue?
Edit:
The Types that aren't found are all from the referenced DLLs. I have the correct using directives for these and they are present in the resource folder, however they become underlined red after a build (I did try cleaning to).
My initial thought was the framework (the project is on v3.5), but I checked all my resources working or otherwise all where on v2 bar a few (working ones) on v4 which I removed temporarily to make sure we're causing issues.
Unable to access the project from my current location but will post any requested specifics as soon as I can.
edit:
Resolved the issue by deleting all of the custom class libraries... found and rebuilt each of their projects then added the new DLLs back into the project. Stored libraries weren't very organised, so I probably have some confliction between old/new versions.
Have you read the warning in the error list? You might need to install nuget package used by the referenced projects
for me the error warning was
All projects referencing "project file" must install nuget package Microsoft.Bcl.Build.
Are the projects being built correctly ?
Sometimes, you need to manually generate them (right click on them, generate), before being able to run a full build.
I dont exactly know why, but this might be the way to go for you.
~A few simple things to try before getting into more complicated water...
Try clicking:
Build->Clean Solution
Build->Build Solution
If this doesn't work, check your using statements are all there and correct, check your references all still exist.
I had a similar issue today, and I thought I would mention it here in case it helps someone else out. In my case, I have a VB.net Class Library which is referenced by a C# class library. The solution would build fine, but in the IDE, as soon as I started editing a file in the C# project, I would get errors about not finding a reference to the VB.Net library. It turns out that the VB.Net class library had a reference to System.web (lowercase w). I'm not sure how that came about -- but the solution was to delete that reference and replace it with a reference to System.Web (uppercase W).
Make sure all the projects in your solution have the same "Target framework" value
So I am starting to learn C#, like literally just started learning, and coming from a Java background, it doesn't look too bad. However, I have a question. I am following THIS tutorial on using the client-object model. And just starting from the top, I added the references, but using Microsoft.SharePoint.Client; keeps giving me the error that "the namespace 'SharePoint' does not exist in the namespace 'Microsoft', but I clearly see it on the right side panel. So looking at the instructions, the only difference I can think of is that fact that I am using Visual Studio Express and thus do not have the option to choose which framework to use when creating a new project. Other than that, I don't know what the problem might be. Does anyone have any ideas on what else I could be missing or how to correct this problem?
Make sure that the target framework is 3.5 and not 4 i.e for SP2010
Did you add the references to the Microsoft.SharePoint.Client assembly and Microsoft.SharePoint.Client.Runtime assembly as noted near the beginning of that tutorial?
Add required references to the solution.
Make sure that the target framework is 4 for SP2013(3.5 for SP2010).
Did you do this part of the tutorial you mentioned above?
To build the application, you must add references to two assemblies,
Microsoft.SharePoint.Client.dll and
Microsoft.SharePoint.Client.Runtime.dll. Installing SharePoint
Foundation installs these assemblies on the server. The two assemblies
are located in the following directory:
%ProgramFiles%\Common Files\Microsoft Shared\web server
extensions\14\ISAPI
Take a look at the references in your project and make sure you have the reference to the assembly. If it is not there try adding it, right click -->add reference and find "Microsoft.SharePoint.Client"
Thanks to those who mentioned the 4.0 framework.
Mine defaulted to .NET Framework 4 Client Profile (and I have no idea what that means), and the Namespaces looked good in Intellisense, but the build would say they weren't found! Crazy.
for anyone developing for SP2019, you need to target .net 4.5