您知道是否有一些指南如何运行从源样本启动项目创建的项目?我想从github克隆存储库并配置解决方案可能是可行的,可能对研究它是如何工作非常有用。
感谢,
卢卡 这是kvm list命令的输出 ------ ------- ------- ------------ -------- -----
1.0.0-beta1 CLR amd64 C:\Users\luca\.kre\packages 1.0.0-beta1 CLR x86 C:\Users\luca\.kre\packages 1.0.0-beta1 CoreCLR amd64 C:\Users\luca\.kre\packages 1.0.0-beta1 CoreCLR x86 C:\Users\luca\.kre\packages 1.0.0-beta2-10724 CLR x86 C:\Users\luca\.kre\packages 1.0.0-beta2-10724 CoreCLR x86 C:\Users\luca\.kre\packages 1.0.0-beta2-10726 CLR x86 C:\Users\luca\.kre\packages 1.0.0-rc1-10781 CLR x86 C:\Users\luca\.kre\packages 1.0.0-rc1-10781 CoreCLR x86 C:\Users\luca\.kre\packages 1.0.0-rc1-10798 CLR x86 C:\Users\luca\.kre\packages 1.0.0-rc1-10798 CoreCLR x86 C:\Users\luca\.kre\packages * 1.0.0-rc1-10804 CLR x86
C:\ Users \ luca.kre \ packages default
我克隆并添加了这些存储库:
配置,DataCommon,数据保护,依赖注入,诊断,实体框架,文件系统,托管,HttpAbstraction,身份,KRuntime,日志记录,Mvc,剃刀,路由,脚手架,安全,静态文件,WebSockets抽象。
在我看来,这些是从本地来源运行它所需的存储库。
其他错误:
6>D:\Studio\vs2015\FromSource\KRuntimeSrc\Microsoft.Framework.Runtime.Roslyn\RoslynCompiler.cs(10,25): ASP.NET 5.0 error CS0234: The type or namespace name 'PortableExecutable' does not exist in the namespace 'System.Reflection' (are you missing an assembly reference?)
6>D:\Studio\vs2015\FromSource\KRuntimeSrc\Microsoft.Framework.Runtime.Roslyn\AssemblyNeutral\EmbeddedReferencesHelper.cs(5,25): ASP.NET 5.0 error CS0234: The type or namespace name 'Metadata' does not exist in the namespace 'System.Reflection' (are you missing an assembly reference?)
6>D:\Studio\vs2015\FromSource\KRuntimeSrc\Microsoft.Framework.Runtime.Roslyn\AssemblyNeutral\EmbeddedReferencesHelper.cs(6,25): ASP.NET 5.0 error CS0234: The type or namespace name 'PortableExecutable' does not exist in the namespace 'System.Reflection' (are you missing an assembly reference?)
6>D:\Studio\vs2015\FromSource\KRuntimeSrc\Microsoft.Framework.Runtime.Roslyn\AssemblyNeutral\TypeCompilationContext.cs(57,47): ASP.NET 5.0 error CS0012: The type 'ImmutableArray<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Collections.Immutable, Version=1.1.33.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
6>D:\Studio\vs2015\FromSource\KRuntimeSrc\Microsoft.Framework.Runtime.Roslyn\AssemblyNeutral\TypeCompilationContext.cs(57,36): ASP.NET 5.0 error CS1579: foreach statement cannot operate on variables of type 'System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.INamedTypeSymbol>' because 'System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.INamedTypeSymbol>' does not contain a public definition for 'GetEnumerator'
6>D:\Studio\vs2015\FromSource\KRuntimeSrc\Microsoft.Framework.Runtime.Roslyn\AssemblyNeutral\TypeCompilationContext.cs(62,38): ASP.NET 5.0 error CS0012: The type 'ImmutableArray<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Collections.Immutable, Version=1.1.33.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
答案 0 :(得分:2)
答案 1 :(得分:2)
如果要包含其中一个依赖项的源,您可以:
kpm restore
然后在解决方案的global.json中引用源代码。添加"sources"
属性,如下所示:
global.json
{
"sources": [ "src", "test", "/path/to/your/project/src" ]
}
您可能还需要针对要使用源的项目调整project.json
中的依赖项:
"Microsoft.AspNet.Mvc": "6.0.0-beta1"
尝试将其更改为
"Microsoft.AspNet.Mvc": ""
要尝试的另一件事是在项目文件夹中使用kpm restore
。 K Package Manager应该去获取project.json文件中列出的任何依赖项,但在实践中,我发现它并不总能找到我正在寻找的特定版本。