起步只有3个文件:CoreRun.exe, coreclr.dll, mscorlib.dll, HelloWorld.exe

运行命令:CoreRun HelloWorld.exe

出错:

Assert failure(PID 9672 [0x000025c8], Thread: 16280 [0x3f98]): 0

!  + 0x0 (0x00000000`00000000)
File: e:\dev\github\dotnet\coreclr\src\utilcode\ccomprc.cpp, Line: 814 Image
:
E:\Dev\GitHub\DotNet\CoreClrHelloWorld\runtime_windows\CoreRun.exe
**** MessageBox invoked, title 'CoreRun.exe - Assert Failure (PID 9672, Thread 1
6280/3f98) ' ****
0 ! + 0x0 (0x00000000`00000000) e:\dev\github\dotnet\coreclr\src\utilcode\ccomprc.cpp, Line: 814

启动Visual Studio进行调试,发现是因为少了mscorrc.debug.dll这个文件。

this	0x000007fdccd146b0 {coreclr.dll!CCompRC CCompRC::m_DefaultResourceDll} {m_Primary={m_LangId=0x000007fdccd146b0 L"en-US" ...} ...}	CCompRC *
m_Primary {m_LangId=0x000007fdccd146b0 L"en-US" m_hInst=0x0000000000000000 m_fMissing=1 } CCulturedHInstance
m_pHash 0x0000000000000000 CCulturedHInstance *
m_nHashSize 0 int
m_csMap 0x000000a31a9cb933 void *
m_pResourceFile 0x000007fdcc9cd200 L"mscorrc.debug.dll" const wchar_t *
m_fpGetThreadUICultureId 0x000007fdcbde5ac8 {coreclr.dll!GetThreadUICultureId(wchar_t[85] *)} int (wchar_t[85] *) *
m_fpGetThreadUICultureNames 0x000007fdcbde5d68 {coreclr.dll!GetThreadUICultureNames(StringArrayList *)} HRESULT (StringArrayList *) *

将mscorrc.debug.dll复制过来,继续运行,出现下面的错误:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or ass
embly 'System.Console, Version=999.999.999.0, Culture=neutral, PublicKeyToken=b0
3f5f7f11d50a3a' or one of its dependencies. The system cannot find the file spec
ified.
at Program.Main(String[] args)

需要System.Console程序集,将之从corefx编译出来的程序集中复制过来。

继续运行,又出错,这次是需要System.Runtime.dll,从corefx的packages文件夹(nuget packages)中复制过来(注:lib\net45子文件夹)

接下来又需要System.IO.dll,也是从corefx的packages文件夹中复制。

再接下来还需要从corefx的packages文件夹中复制3个程序集:System.Threading.dll, System.IO.FileSystem.Primitives.dll, System.Diagnostics.Debug.dll。

这时,当前文件夹一共有11个文件:

coreclr.dll
CoreRun.exe
HelloWorld.exe
mscorlib.dll
mscorrc.debug.dll
System.Console.dll
System.Diagnostics.Debug.dll
System.IO.dll
System.IO.FileSystem.Primitives.dll
System.Runtime.dll
System.Threading.dll

继续运行,出现新的错误:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or ass
embly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
' or one of its dependencies. The system cannot find the file specified.
at System.ConsolePal.WindowsConsoleStream..ctor(IntPtr handle, FileAccess acc
ess)
at System.ConsolePal.GetStandardFile(IntPtr handle, FileAccess access)
at System.ConsolePal.OpenStandardOutput()
at System.Console.OpenStandardOutput()
at System.Console.<>c__DisplayClass3.<get_Out>b__4()
at System.Console.EnsureInitialized[T](T& field, Func`1 initializer)
at System.Console.get_Out()
at System.Console.WriteLine(String value)
at Program.DrawWindows()
at Program.Main(String[] args)

System程序集就是mscorlib.dll,明明有这个文件,却说找不到。

后来换成corefx中packages\Microsoft.DotNet.CoreCLR.1.0.3-prerelease\lib\aspnetcore50中的mscrolib.dll,就不错这个错误了。

但是运行CoreRun HelloWorld.exe却无任何输出,换成CoreRun -v HelloWorld.exe出现下面的错误:

HOSTLOG: Finding GetCLRRuntimeHost(...)
HOSTLOG: Calling GetCLRRuntimeHost(...)
HOSTLOG: Setting ICLRRuntimeHost2 startup flags
HOSTLOG: Starting ICLRRuntimeHost2
HOSTLOG: Failed to start CoreCLR. ERRORCODE: 0x80004005/E_FAIL
HOSTLOG: Execution failed

一步一步就到这里,暂时没找到解决方法。

Windows上一步一步CoreRun的更多相关文章

  1. 【新手出发】从搭虚拟机开始,一步一步在CentOS上跑起来.Net Core程序

    文章背景 微软6月26号发布core 1.0版本后,园子里关于这方面的文章就更加火爆了,不管是从文章数量还是大家互动的热情来看,绝对是最热门的技术NO.1.我从去年底开始接触.net core到现在也 ...

  2. 一步一步安装UEFI分区方式的windows 10 企业版

    发现很多坛友不会安装UEFI分区的windows 10 从启动设置,到分区,到最后的引导与激活都是很大的问题. 在我看来这是最不容易出错的安装方式适合于刚刚上手的菜鸟,自己按照图片一步一步的就可以安装 ...

  3. 一步一步教你将开源项目上传到jcenter

    最近闲着看了一下jcenter的使用,也想将自己使用频率比较高的东西抽成类库,然后通过compile来使用,提高开发效率,本来以为挺简单的,但是网上介绍的比较模糊,很多博客也比较老了,不适用,花了我一 ...

  4. 一步一步学Silverlight 2系列(19):如何在Silverlight中与HTML DOM交互(上)

    概述 Silverlight 2 Beta 1版本发布了,无论从Runtime还是Tools都给我们带来了很多的惊喜,如支持框架语言Visual Basic, Visual C#, IronRuby, ...

  5. 《⑨也懂系列:MinGW-w64安装教程》著名C/C++编译器GCC的Windows版本(MinGW-w64在安装的时候可以选择版本,有图,一步一步)

    发布日期 2016年10月31日 分类 教程 标签 编程.软件 前言<⑨也懂系列:MinGW-w64安装教程>这篇文章由 rsreland (http://rsreland.net)于 2 ...

  6. 在Linux上安装Oracle RAC 12 c(12.1) 虚拟机,一步一步向导

    Oracle RAC 12 c(12.1)在Linux上安装虚拟机,一步一步向导 今天我们将看到如何安装 12 c版本1 RAC(真正的应用程序集群)数据库2 Linux 64位的虚拟机 使用VMWa ...

  7. 一步一步写算法(之prim算法 上)

    原文:一步一步写算法(之prim算法 上) [ 声明:版权所有,欢迎转载,请勿用于商业用途.  联系信箱:feixiaoxing @163.com] 前面我们讨论了图的创建.添加.删除和保存等问题.今 ...

  8. 一步一步在Windows中使用MyCat负载均衡 下篇

    之前在 一步一步在Windows中使用MyCat负载均衡 上篇 中已经讲了如何配置出MyCat.下面讲其相关的使用. 五.配置MyCat-eye 对于MyCat监控官网还提供一个MyCat-eye w ...

  9. 一步一步在Windows中使用MyCat负载均衡

    一步一步在Windows中使用MyCat负载均衡 http://www.cnblogs.com/zhangs1986/p/6408981.html   mycat+sqlServer简单demo配置 ...

随机推荐

  1. C语言的time.h解释python的time

    clock_t clock(void),对比python的clock() 返回程序执行的时间,clock_t的实际类型是long #include<Windows.h> Sleep(); ...

  2. Reactjs 入门基础(三)

    State 和 Props以下实例演示了如何在应用中组合使用 state 和 props .我们可以在父组件中设置 state, 并通过在子组件上使用 props 将其传递到子组件上.在 render ...

  3. PHP面向对象的标准

    (1)所有数据都应该隐藏在所在的类的内部. (2)类的使用者必须依赖类的共有接口,但类不能依赖它的使用者. (3)尽量减少类的协议中的消息. (4)实现所有类都理解的最基本公有接口[例如,拷贝操作(深 ...

  4. noip2006 2^k进制数

    设r是个2k进制数,并满足以下条件: (1)r至少是个2位的2k进制数. (2)作为2k进制数,除最后一位外,r的每一位严格小于它右边相邻的那一位. (3)将r转换为2进制数q后,则q的总位数不超过w ...

  5. IntelliJ IDEA13.1.3+Scala2.11.1环境搭建

    fesh个人实践,欢迎经验交流!本文Blog地址:http://www.cnblogs.com/fesh/p/3805611.html Intellij IDEA的使用性非常好,是一个非常优秀的IDE ...

  6. VMware下 Ubuntu 看不到共享文件夹之解决办法

    VMware下 Ubuntu 看不到共享文件夹之解决办法 初学Linux,在VMWare 上装了Ubuntu10.04,主机端和虚拟机相互间的访问是必不可少的,途径有许多,其中vmware tool提 ...

  7. 《Cracking the Coding Interview 》之 二叉树的创建 与 遍历(非递归+递归version)

    #include <iostream> #include <cstdio> #include <vector> #include <stack> #de ...

  8. java文件乱码

    要让一个 Java 源文件打开时编码格式为 UTF-8,需要做2件事情:1)设置Java 源文件的默认编码格式为UTF-8:2)设置workspace的编码格式为UTF-8. 相应设置如下: 设置 J ...

  9. Swift3.0基础语法学习<四>

    协议和扩展: // // ViewController4.swift // SwiftBasicDemo // // Created by 思 彭 on 16/11/16. // Copyright ...

  10. C#控件根据窗体改变大小

    using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using Sy ...