Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

调试器未能找到源文件“C:\projects\unity\Container\src\UnityContainer.cs”。 #30

Closed
ghd258 opened this issue Oct 23, 2017 · 12 comments
Labels
release Release branch

Comments

@ghd258
Copy link

ghd258 commented Oct 23, 2017

为“C:\projects\unity\Container\src\UnityContainer.cs”查找源。Checksum: SHA1 {5b c9 f1 f7 38 bf d3 da 3b 87 0 72 d2 5d 68 25 36 4d cf b5}
文件“C:\projects\unity\Container\src\UnityContainer.cs”不存在。
正在脚本文档中查找“C:\projects\unity\Container\src\UnityContainer.cs”...
正在“编辑并继续”目录“D:\enc_temp_folder\”中查看...
在“编辑并继续”目录中找不到具有匹配校验和的文件。
正在项目中查找“C:\projects\unity\Container\src\UnityContainer.cs”。
在项目中未找到该文件。
活动解决方案的调试源文件设置指明调试器不会要求用户查找文件: C:\projects\unity\Container\src\UnityContainer.cs。
调试器未能找到源文件“C:\projects\unity\Container\src\UnityContainer.cs”。

@ENikS
Copy link
Contributor

ENikS commented Oct 23, 2017

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

@ENikS
Copy link
Contributor

ENikS commented Oct 23, 2017

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

@ghd258
Copy link
Author

ghd258 commented Oct 23, 2017

Version 5, the compiler can pass, but run error

@ghd258
Copy link
Author

ghd258 commented Oct 23, 2017

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

@ENikS
Copy link
Contributor

ENikS commented Oct 23, 2017

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

@ghd258
Copy link
Author

ghd258 commented Oct 23, 2017

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

@ENikS
Copy link
Contributor

ENikS commented Oct 23, 2017

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.

@ghd258
Copy link
Author

ghd258 commented Oct 23, 2017

This is the error that runs with the DLL file

@ghd258
Copy link
Author

ghd258 commented Oct 23, 2017

发生了 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?

@ghd258
Copy link
Author

ghd258 commented Oct 23, 2017

This error occurs when debugging mode

@ghd258
Copy link
Author

ghd258 commented Oct 23, 2017

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

@ENikS
Copy link
Contributor

ENikS commented Oct 23, 2017

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.

@ENikS ENikS closed this as completed Oct 24, 2017
ENikS added a commit that referenced this issue Aug 27, 2020
Fixed #29
Fixed #30
@github-actions github-actions bot added the release Release branch label Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release Release branch
Projects
None yet
Development

No branches or pull requests

2 participants