Code Monkey home page Code Monkey logo

Comments (12)

ENikS avatar ENikS commented on June 2, 2024

You have to translate it into English. Unfortunately my Mandarin is not very good :)

from container.

ENikS avatar ENikS commented on June 2, 2024

I could guess by looking at these paths you've lost source files?
They are all here: https://github.com/unitycontainer/unity/tree/v5.x

from container.

ghd258 avatar ghd258 commented on June 2, 2024

Version 5, the compiler can pass, but run error

from container.

ghd258 avatar ghd258 commented on June 2, 2024

Debugger could not find the source file "C:\projects\unity\Container\src\UnityContainer.cs"".

from container.

ENikS avatar ENikS commented on June 2, 2024

Did you get it from the link I posted? https://github.com/unitycontainer/unity/tree/v5.x

from container.

ghd258 avatar ghd258 commented on June 2, 2024

I'm downloading Unity.Container.5.0.0 Unity.Mvc.5.0.0 Unity.Interception.5.0.1 Unity.Abstractions.2.0.1 Unity.5.0.0 from NuGet

from container.

ENikS avatar ENikS commented on June 2, 2024

NuGet package does not have source files. It has only dll and pdb. If you want source you need to get it from repository I've posted.

from container.

ghd258 avatar ghd258 commented on June 2, 2024

This is the error that runs with the DLL file

from container.

ghd258 avatar ghd258 commented on June 2, 2024

发生了 Unity.Exceptions.ResolutionFailedException
HResult=0x80131500
Message=Resolution of the dependency failed, type = 'System.Web.Http.Metadata.ModelMetadataProvider', name = '(none)'.
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The current type, System.Web.Http.Metadata.ModelMetadataProvider, is an abstract class and cannot be constructed. Are you missing a type mapping?

At the time of the exception, the container was:
Resolving System.Web.Http.Metadata.ModelMetadataProvider,(none)

Source=<无法计算异常源>
StackTrace:
在 Unity.UnityContainer.BuildUp(Type typeToBuild, Object existing, String name, ResolverOverride[] resolverOverrides) 在 C:\projects\unity\Container\src\UnityContainer.cs 中: 第 215 行
在 Unity.UnityContainer.Resolve(Type type, String name, ResolverOverride[] resolverOverrides) 在 C:\projects\unity\Container\src\UnityContainer.cs 中: 第 163 行
在 Unity.UnityContainerExtensions.Resolve(IUnityContainer container, Type t, ResolverOverride[] overrides) 在 C:\projects\unity\Abstractions\src\Utility\UnityContainerExtensions.cs 中: 第 494 行
在 Unity.AspNet.WebApi.UnityDependencyResolver.GetService(Type serviceType)

内部异常 1:
InvalidOperationException: The current type, System.Web.Http.Metadata.ModelMetadataProvider, is an abstract class and cannot be constructed. Are you missing a type mapping?

from container.

ghd258 avatar ghd258 commented on June 2, 2024

This error occurs when debugging mode

from container.

ghd258 avatar ghd258 commented on June 2, 2024

Here's the error GlobalConfiguration.Configure (WebApiConfig.Register);

from container.

ENikS avatar ENikS commented on June 2, 2024

If you could create little GitHub repo with small test project where you get this error I could download it and run in debugger. I can't really help you by looking at the error. Not enough information.

from container.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.