"Storage" does not exist in the namespace "Microsoft.Xna.Framework" - c#

I don't understand why it appears given error : The type or namespace name "Storage" does not exist in the namespace "Microsoft.Xna.Framework" (assembly reference may be missing).
I try to download Microsoft XNA Framework Redistributable 4.0.
How to fix it?

You haven't given any information to your problem such as code you have written or references added so I'm sorry if this doesn't help. But, if you're using Visual Studio 2019 here is a video to help you add the entire framework to your program.
EDIT: If you already have the framework downloaded. What you need to do is right click your project on the right. then Add>Reference.. then search for Microsoft.Xna.Framework.Storage.

Related

ASP.net core namespaces out of sync

I decided to change the name of a folder within "Models->ABC->A" to "Models->ABC->B" Manually.
the problem is, now in the view imports i'm getting old suggestions A but not B. i don't understand where the A is coming from? i cleaned the solution, rebuilt the solution. checked in directory but A doesn't exists there still it shows A in suggestion. it seems when i build the project Visual Studio (2019 Community) is using the same old data and namespaces are out of sync. any idea how to fix it?
The namespace given in the Class is having the old namespace that is Models->ABC->A. Change it to Models->ABC->B.

ASP.Net / C# - missing an assembly reference

Hi, I am a newbie in C# and visual studio. As Figure1 shown, I am trying to use the classes from other project in similar solution.
For example: I try to write "Using LibraryMS.Framework" at UserDto.cs from "LibraryMS.MasterSetup".
And I get the following error message:
"the type or namespace name 'framework' does not exist in the namespace 'LibraryMS' (are you missing an assembly reference?)"
Does anyone know how can I solve this?
Also, do you have any good ASP.net website development online tutorial?
Visual studio version: 2010
.Net Framework 4.0
Thank you.
Its asking you if you missed an assembly reference. So check the references in your class library for LibraryMS.Framework. If you can't find the reference then you can always add it by hitting "Add Reference" then under Reference Manager, click Project and select the class library which you would like to add.
Along these two days, finally I have find out what is going on. The root case is because I am using ASP.NET Empty Web Application instead of using ASP.NET Server Control. Thank you guys. :) now I feel that Programming is a fun thing. Many thx!

Visual studio does not exist in the namespace, but reference is added

I am building a custom code coverage app using the Microsoft.VisualStudio.Coverage.Analysis class.
I have added the reference to the dll to my solution already and when I start typing the using statement at the top of my class Visual Studio is predicting the correct names, e.g. after typing "Microsoft." "VisualStudio" will be displayed in the suggestion box, the same thing happens with the next two levels, Coverage and Analysis.
But the second I try to build the project I get the following error:
the type or namespace name 'visual studio' does not exist in the namespace 'microsoft'
I've no idea why this is happening so any suggestions would be great
I should have checked the warnings in visual studio, they had the real error details, the project had to be built against .net 4.5 and not 4.0.
Once this was changed the project built correctly.

Namespace 'SharePoint' does not exist in the namespace 'Microsoft'

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

migration problem VS2005 -> VS2010 - missing assembly reference error

I recently migrated a solution from VS2005 to VS2010.
The solution is composed by about 20 project. One of them is in VB.net, the others are C#.
In VS2005 everything was fine, that is I was able to reference the VB.net project into the C Sharp projects. Now I cannot anymore.
The strange thing is that when I open in the editor a C# class referencing the VB.net dll, I get a compile error that sounds more or less like this:
"he type or namespace name 'VB.netProject' does not exist in the namespace 'Solution Namespace' (are you missing an assembly reference?)"
... and no, the assembly reference is there indeed!
However, when I close the files in the editor and try to compile again, the operation succeeds and the executable that I get works perfectly like it did in VS2005.
Is there a way I can manage to see the VB.net component in the editor? I am sure I am missing something, but I don't know what! :-)
Many thanks in advance for your help,
John
Unfortunately the visual studio sets (after the migration) the target framework to .NET Framework 4 Client Profile. If this target framework is set, some namespace could not be found (=> because the client profile doesn't contain this classes). Please verify, if your project has set this target framework. You will find this setting under the project properties.
Kind regards, patrick

Categories