Basically I have added the System.Numerics reference to my project, and have added it to my using statements as below:
However, I am getting the following error:
The type or namespace name 'Numerics' does not exist in the namespace 'System'
This is hopefully a simple one!
Thanks
Related
Whenever I open a new project and simply build it the output box gives me about 7 of these errors. Same thing over and over just different error code. Please help solve my problem.
I just downloaded and installed MVC 4 on VS 2010 Professional. I started a new project and here's the list of Errors that i got on my first build-
1.The type or namespace 'Infrastructure' does not exist in the namespace 'System.data.Entity'(Are you missing an assembly reference?)
2.Namespace 'schema' does not exist in namespace 'System.componentmodel.dataannotations'..
similar is the case with 'dbcontext','dbset','tablettribute','table','databasegeneratedattribute' .....
Please suggest what references do i need to include for these errors.?
How can i include the entity framework to my project as it says that it cannot be found?
This is the first time i am using ASP.NET MVC 4 with VS 2010.
I googled but didnt find the exact solution for this.
Please help!
regards
you don't have install Entity Framework thats y you got that type of error
you can solve this problem by do this
open Vs 2010
go to tools
select Library Package Manager
Go to Manage NUget Packages or Package Manager Console
if you use Package Manager Console type this command on console
Install-Package Entity-Framework
if you use Manage NUget Packages
Download EF5 and install it
I just created a VB.Net Application with Visual Studio 2010 in other computer and I want to copy it so I can modify the system at home. I'm using VS2008 at home. After I copied it, I did this: Which I found on the internet
Format Version 10.00 ( Changed from 11.00 to 10.00)
# Visual Studio 2008 (Changed from 2010 to 2008)
When I opened my system in my computer, I have error all over my window forms. All of my window forms have this error
'IContainer' is ambiguous in the namespace 'System.ComponentModel'.
'ISupportInitialize' is ambiguous in the namespace 'System.ComponentModel'
Most of the error I see is this. I have searched the internet for the right solution. If anyone could tell me what should I do. I would greatly appreciate it.
'IContainer' is ambiguous in the namespace 'System.ComponentModel'.
'ISupportInitialize' is ambiguous in the namespace 'System.ComponentModel'
'GeneratedCodeAttribute' is ambiguous in the namespace 'System.CodeDom.Compiler'.
'EditorBrowsableAttribute' is ambiguous in the namespace 'System.ComponentModel'.
'GeneratedCodeAttribute' is ambiguous in the namespace 'System.CodeDom.Compiler'.
According to the first link that Google offers this is what you should do:
Remove the project's reference to the 'System' assembly (System.dll),
rebuild the project, then add the reference back to System.dll.
I'm beginning my first explorations into Silverlight RIAs and EF4, but I can't get a project to run right off the templates that ship with VS2010 SP1.
Bear in mind here that what I've done is to install a brand new Windows 7 VM, and then I immediately installed LightSwitch Beta 2. Following that, I added VS2010 Premium, and applied Service Pack 1 to that.
The client portion of the Template app is kicking off three warnings and two errors; the details are posted below. It's looking for a WebContextBase class that it can't find, in code that it generated into Web.g.vb (and Web.g.cs) files. So far this project is entirely generated off the solution template; I haven't added a single line of code to what VS2010 generated.
I've since gotten EF4 to work fine in WinForms projects and Light Switch projects.
What's going on here, and how do I fix it?
------ Build started: Project: EF4Test, Configuration: Debug Any CPU
------ C:\Users\Rob\Documents\Visual Studio
2010\Projects\EF4Test\EF4Test\Generated_Code\EF4Test.Web.g.vb(21)
: warning BC40056: Namespace or type
specified in the Imports
'System.ServiceModel.DomainServices'
doesn't contain any public member or
cannot be found. Make sure the
namespace or the type is defined and
contains at least one public member.
Make sure the imported element name
doesn't use any aliases.
C:\Users\Rob\Documents\Visual Studio
2010\Projects\EF4Test\EF4Test\Generated_Code\EF4Test.Web.g.vb(22)
: warning BC40056: Namespace or type
specified in the Imports
'System.ServiceModel.DomainServices.Client'
doesn't contain any public member or
cannot be found. Make sure the
namespace or the type is defined and
contains at least one public member.
Make sure the imported element name
doesn't use any aliases.
C:\Users\Rob\Documents\Visual Studio
2010\Projects\EF4Test\EF4Test\Generated_Code\EF4Test.Web.g.vb(23)
: warning BC40056: Namespace or type
specified in the Imports
'System.ServiceModel.DomainServices.Client.ApplicationServices'
doesn't contain any public member or
cannot be found. Make sure the
namespace or the type is defined and
contains at least one public member.
Make sure the imported element name
doesn't use any aliases.
C:\Users\Rob\Documents\Visual Studio
2010\Projects\EF4Test\EF4Test\Generated_Code\EF4Test.Web.g.vb(34)
: error BC30002: Type 'WebContextBase'
is not defined.
C:\Users\Rob\Documents\Visual Studio
2010\Projects\EF4Test\EF4Test\Generated_Code\EF4Test.Web.g.vb(65)
: error BC30451: 'WebContextBase' is
not declared. It may be inaccessible
due to its protection level.
Have a look at LightSwitch Beta 2 Readme
There are few know issues with the LightSwitch. From the steps you have described to setup your system I would guess that the problem could be because
"2.1.1 Visual Studio 2010 users or
Visual Studio 2010 SP1 Beta1 users
must install Visual Studio 2010 SP1
before installing Visual Studio
LightSwitch Beta2"
You should try uninstalling LightSwitch Beta2 and then reinstall, and let us know if you get the same error.
Hope this helps.
Include this reference..
System.ServiceModel.DomainServices.Client.ApplicationServices
I'm getting a build error in Visual Studio that's not making any sense:
The type or namespace name 'MyService' does not exist in the namespace 'My.Project' (are you missing an assembly reference?)
The namespace MyService is defined in a Web Reference. In the Object Browser, I can clearly see that namespace and all of the classes defined in it. There are no compile errors for any of the code in the Web Reference.
The code stopped compiling after I changed the framework target from 2.0 to 3.5. Why could the compiler be choking, and how can I go about fixing this? I already tried updating the web reference, but the problem remains. I even tried commenting out the code in the generated "Reference.cs" and copying the code to another code file in the project, and the namespace was still not seen.
My project is referencing the following:
System 2.0.0.0
System.Data 2.0.0.0
System.EnterpriseServices 2.0.0.0
System.Net 3.5.0.0
System.Web.Services 2.0.0.0
System.Xml 2.0.0.0
Update
It isn't just my web service generated code that is having compile problems; for all of the projects converted to .NET 3.5, I cannot reference their namespaces.
I'm still not sure why this is all happening, but I found a workaround; by adding a using Ns = My.Project.MyService to my code, I was able to reference types in the namespace with Ns.MyType.
This is apparently documented as a bug in Visual Studio:
https://connect.microsoft.com/VisualStudio/feedback/details/570557/targeting-net-framework-3-5-actually-targets-3-0-gac
I utilized the workaround documented in the post by copying System.Web.Extensions.dll from C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5 to C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0. Then I restarted Visual Studio.
That alone didn't fix the problem. I had to redo the project conversion from 2.0 to 3.5 after the assembly was copied. After the new conversion, the code compiled as expected. Doing a diff between the project file pre- and post-workaround didn't reveal any substantial differences, so the build errors must have been due to some internal state of Visual Studio.