编译源文件的时候出错处理
2009-11-20 11:21
519 查看
I need an object browser with considerable flexibility. I focused on Denis Bauer: | http://www.denisbauer.com/NETTools/FileDisassembler.aspx .NET Reflector. I downloaded the source code and the dll file and tried to compile. I got 121 errorr all of them related to namespaces not found and references missing. using Reflector.CodeModel; gives me and error: Error 1 The type or namespace name 'CodeModel' does not exist in the namespace 'Reflector' (are you missing an assembly reference?) I could not find the dll for this Namespace so far. There are many others but I feel I can probably handle them myself eventually. Thanks.
答案:
Just as Chris pointed out, Reflector.CodeModel namespace exists in the assembly Reflector, so you should add the reference to the Reflector.exe. You may download it here:
http://www.aisto.com/roeder/dotnet/
Also, after you added the reference to the Reflector.exe, you will still get the compile-time error below:
Error 2 Cryptographic failure while signing assembly 'C:/Users/jetan/Desktop/Reflector.FileDisassemblerSources/obj/Debug/Reflector.FileDisassembler.dll' -- 'Error reading key file '../../../DenisBauer.snk' -- The system cannot find the file specified. ' Reflector.FileDisassembler
Actually, this is the strong name feature added by Denis Bauer in the AssemblyInfo.cs file. You may just remove the following statement in the AssemblyInfo.cs file to eliminate the error:
//DENISB: If you want to recompile, the following line throws an error. Please just remove the reference to my private key
//or create your own private key with the sn.exe tool
[assembly: AssemblyKeyFile("..//..//..//DenisBauer.snk")]
Hope this helps.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
答案:
Just as Chris pointed out, Reflector.CodeModel namespace exists in the assembly Reflector, so you should add the reference to the Reflector.exe. You may download it here:
http://www.aisto.com/roeder/dotnet/
Also, after you added the reference to the Reflector.exe, you will still get the compile-time error below:
Error 2 Cryptographic failure while signing assembly 'C:/Users/jetan/Desktop/Reflector.FileDisassemblerSources/obj/Debug/Reflector.FileDisassembler.dll' -- 'Error reading key file '../../../DenisBauer.snk' -- The system cannot find the file specified. ' Reflector.FileDisassembler
Actually, this is the strong name feature added by Denis Bauer in the AssemblyInfo.cs file. You may just remove the following statement in the AssemblyInfo.cs file to eliminate the error:
//DENISB: If you want to recompile, the following line throws an error. Please just remove the reference to my private key
//or create your own private key with the sn.exe tool
[assembly: AssemblyKeyFile("..//..//..//DenisBauer.snk")]
Hope this helps.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
相关文章推荐
- linux编译带mysql的源文件出错处理办法
- vs2005 编码转换后编译的时候会出错,”error c101008a“,处理方法
- Ubuntu安装android-ndk编译出错的处理
- 函数默认值的设置放在声明的时候,在定义的时候如果设置默认值,编译会出错
- MyEclipse编译后,classes文件夹下为空2. 3.删除现在的项目,提前设置好编译文件输出路径,重新导入源文件,设置eclipse为保存时编译,然后在保存的时候就可以自动编译了
- Oracle创建触发器的时候因为大小写编译出错
- 当pandas.Series存在混合类型index的时候取子集出错的处理
- 关于 Java源文件带有package的普通程序和Applet编译和运行时错误的处理方法
- 多个构造函数时,有默认值的时候编译会出错
- maven依赖本地非repository中的jar包-依赖jar包放在WEB-INF/lib等目录下的情况客户端编译出错的处理
- 使用js拼接的时候,引号处理问题 js 拼接onclikc、onchange 单引号会出错。
- linux下运行《UNIX环境高级编程》的第一个程序时源码编译出错的处理方法
- thinkphp3.2.3编译时new model()出错的处理方法
- Linux下编译《UNIX环境高级编程》的第一个程序时出错的处理方法
- 从其他机子上复制过来的一些代码编译时出错的问题处理
- linux下《UNIX环境高级编程》(apue2)源码编译出错的处理方法
- 添加第三方库时候,64位机器编译出错解决方案
- 对双向链表的处理,单个,但是,有错误,就是在输入越界 时候,没有执行出错处理
- boost 编译时出错处理:Failed to build Boost.Build engine
- 交叉编译pure-ftpd时,配置的时候出错。