locked
vs can not add a entity framework RRS feed

  • Question

  • Hi,

    My system: windows 7 64bit

    Visual Studio 2010 is installed completely, no errors. SP1 is also installed, no errors.

    The establishment of any project can be compiled and  released normally, but as long as add the entity framework in the project will cause problems as following:

    this is error log:

    Could not resolve mscorlib for target framework '.NETFramework,Version=v3.5'.  This can happen if the target framework is not installed or if the framework moniker is incorrectly formatted.

    System.InvalidOperationException was unhandled
      HResult=-2146233079
      Message=Could not resolve mscorlib for target framework '.NETFramework,Version=v3.5'.  This can happen if the target framework is not installed or if the framework moniker is incorrectly formatted.
      Source=Microsoft.VisualStudio.Shell.Design
      StackTrace:
           at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUniverse..ctor(IDesignTimeAssemblyLoader assemblyLoader, IVsFrameworkMultiTargeting globalAssemblyResolution, String targetMoniker, IVsSmartOpenScope dispenser)
           at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUniverse.GetUniverse(IDesignTimeAssemblyLoader assemblyLoader, IVsFrameworkMultiTargeting globalAssemblyResolution, String targetMoniker, IVsSmartOpenScope dispenser)
           at Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkProvider..ctor(IVsFrameworkMultiTargeting targetInfo, IDesignTimeAssemblyLoader assemblyLoader, String targetMoniker, TypeDescriptionProvider parentProvider, IVsSmartOpenScope openScope)
           at Microsoft.Data.Entity.Design.VisualStudio.EdmUtils.GetEntityFrameworkVersion(Project project, IServiceProvider serviceProvider)
           at Microsoft.Data.Entity.Design.VisualStudio.Model.VSArtifact.get_SchemaVersion()
           at Microsoft.Data.Entity.Design.Model.Entity.ConceptualEntitySet.GetterAccessDefaultableValue..ctor(EFElement parent)
           at Microsoft.Data.Entity.Design.Model.Entity.ConceptualEntitySet.<get_Children>d__6.MoveNext()
           at Microsoft.Data.Entity.Design.Model.EFContainer.Dispose(Boolean disposing)
           at Microsoft.Data.Entity.Design.Model.EFNormalizableItem.Dispose(Boolean disposing)
           at Microsoft.Data.Entity.Design.Model.EFObject.Dispose()
           at Microsoft.Data.Entity.Design.Model.EFContainer.Dispose(Boolean disposing)
           at Microsoft.Data.Entity.Design.Model.EFNormalizableItem.Dispose(Boolean disposing)
           at Microsoft.Data.Entity.Design.Model.EFObject.Dispose()
           at Microsoft.Data.Entity.Design.Model.EFContainer.Dispose(Boolean disposing)
           at Microsoft.Data.Entity.Design.Model.EFNormalizableItem.Dispose(Boolean disposing)
           at Microsoft.Data.Entity.Design.Model.EFObject.Dispose()
           at Microsoft.Data.Entity.Design.Model.EntityDesignArtifact.Dispose(Boolean disposing)
           at Microsoft.Data.Entity.Design.VisualStudio.Model.VSArtifact.Dispose(Boolean disposing)
           at Microsoft.Data.Entity.Design.Model.EFObject.Dispose()
           at Microsoft.Data.Entity.Design.Model.ModelManager.Dispose(Boolean disposing)
           at Microsoft.Data.Entity.Design.VisualStudio.VisualStudioEdmxValidator.Finalize()
      InnerException: 

    I try to find a solution from http://blog.rthand.com/?tag=/microframework, but it does not solve my problem.

    Thanks.


    Reactive Programming | Event Driven Architecture | CQRS With Domain Driven Design | Covariance and Contravariance in DOTNET



    • Edited by Karen.Wang Thursday, May 17, 2012 5:09 AM
    Thursday, May 17, 2012 5:06 AM

Answers

  • hi, this problem solution is create a new windows user account.

    my username is : karen'wang , if i create a new account name is : karen.wang, vs haven't problem.

    but i change username karen'wang to karen.wang, i still have this problem. because C:\Users\karen'wang don't be changed.


    Reactive Programming | Event Driven Architecture | CQRS With Domain Driven Design | Covariance and Contravariance in DOTNET

    • Marked as answer by Karen.Wang Wednesday, May 23, 2012 8:56 AM
    Wednesday, May 23, 2012 8:56 AM

All replies

  • The problem is that you are trying to use an item that has a dependency on the v3.5 framework.  By default this is not installed with VS2010.  You should install the v3.5 framework and then try again.  You can get to the framework via VS but here is the link: http://msdn.microsoft.com/en-US/hh487282.aspx

    Michael Taylor - 5/17/2012
    http://msmvps.com/blogs/p3net

    Thursday, May 17, 2012 2:00 PM
    Moderator
  • hi, this problem solution is create a new windows user account.

    my username is : karen'wang , if i create a new account name is : karen.wang, vs haven't problem.

    but i change username karen'wang to karen.wang, i still have this problem. because C:\Users\karen'wang don't be changed.


    Reactive Programming | Event Driven Architecture | CQRS With Domain Driven Design | Covariance and Contravariance in DOTNET

    • Marked as answer by Karen.Wang Wednesday, May 23, 2012 8:56 AM
    Wednesday, May 23, 2012 8:56 AM