Consider a question from the error message: How deep is the. NET Framework related to com/com+?

Source: Internet
Author: User

Today for 2 program files, with CSC press a multi-file Assembly, found a problem:

(1) SumNumber.cs, compiled for Sumnumber.netmodule

Csc/target:module/out:bin/debug/sumnumber.netmodule SumNumber.cs


(2) Program.cs, compiled to MyConsole.exe, as program execution file

Csc/target:exe/addmodule:bin/debug/sumnumber.netmodule/out:bin/debug/myconsole.exe Progarm.cs


This implementation is no problem.

Then I removed the sumnumber.netmodule, executed the MyConsole.exe again, and the following error occurred:

Unhandled exception: System.IO.FileNotFoundException: Failed to load file or assembly Sumnumberm
Odule.netmodule "or one of its dependencies. The system could not find the specified file.
FileName: "Sumnumbermodule.netmodule"---> System.IO.FileNotFoundException: System
The specified file could not be found. (Exception from hresult:0x80070002)
In MySolution.Program.Main (string[] args)


There is nothing to see FileNotFoundException, but seeing HRESULT is a bit confusing to me: Is it the source of the exception that is generated by a COM object?

Here's the question: how deep is the. NET Framework related to com/com+.

First make a mark, these days to study ...

======================================================
Information, from MSDN:
HRESULT . NET Exceptions

msee_e_appdomainunloaded

appdomainunloadedexception

cor_e_application

ApplicationException

cor_e_argument or E_invalidarg

ArgumentException

Cor_e_argumentoutofrange

ArgumentOutOfRangeException

cor_e_arithmetic or Error_arithmetic_overflow

ArithmeticException

Cor_e_arraytypemismatch

ArrayTypeMismatchException

Cor_e_badimageformat or Error_bad_format

badimageformatexception

Cor_e_comemulate_error

comemulateexception

Cor_e_contextmarshal

contextmarshalexception

Cor_e_core

coreexception

Nte_fail

cryptographicexception

Cor_e_directorynotfound or Error_path_not_found

directorynotfoundexception

Cor_e_dividebyzero

DivideByZeroException

Cor_e_duplicatewaitobject

duplicatewaitobjectexception

Cor_e_endofstream

endofstreamexception

Cor_e_typeload

entrypointnotfoundexception

cor_e_exception

Exception

Cor_e_executionengine

ExecutionEngineException

cor_e_fieldaccess

fieldaccessexception

Cor_e_filenotfound or Error_file_not_found

FileNotFoundException

Cor_e_format

FormatException

Cor_e_indexoutofrange

IndexOutOfRangeException

Cor_e_invalidcast or E_nointerface

InvalidCastException

Cor_e_invalidcomobject

invalidcomobjectexception

Cor_e_invalidfiltercriteria

invalidfiltercriteriaexception

Cor_e_invalidolevarianttype

invalidolevarianttypeexception

cor_e_invalidoperation

InvalidOperationException

Cor_e_io

IOException

cor_e_memberaccess

accessexception

cor_e_methodaccess

methodaccessexception

Cor_e_missingfield

missingfieldexception

Cor_e_missingmanifestresource

missingmanifestresourceexception

Cor_e_missingmember

missingmemberexception

Cor_e_missingmethod

MissingMethodException

cor_e_multicastnotsupported

multicastnotsupportedexception

Cor_e_notfinitenumber

notfinitenumberexception

E_NotImpl

NotImplementedException

cor_e_notsupported

NotSupportedException

cor_e_nullreference or E_pointer

NullReferenceException

Cor_e_outofmemory or

e_outofmemory

OutOfMemoryException

Cor_e_overflow

OverflowException

Cor_e_pathtoolong or Error_filename_exced_range

PathTooLongException

Cor_e_rank

rankexception

Cor_e_reflectiontypeload

reflectiontypeloadexception

cor_e_remoting

remotingexception

Cor_e_safearraytypemismatch

safearraytypemismatchexception

cor_e_security

SecurityException

cor_e_serialization

SerializationException

Cor_e_stackoverflow or Error_stack_overflow

StackOverflowException

Cor_e_synchronizationlock

synchronizationlockexception

Cor_e_system

SystemException

Cor_e_target

targetexception

cor_e_targetinvocation

targetinvocationexception

Cor_e_targetparamcount

targetparametercountexception

cor_e_threadaborted

ThreadAbortException

cor_e_threadinterrupted

ThreadInterruptedException

cor_e_threadstate

ThreadStateException

Cor_e_threadstop

threadstopexception

Cor_e_typeload

TypeLoadException

cor_e_typeinitialization

TypeInitializationException

cor_e_verification

verificationexception

cor_e_weakreference

weakreferenceexception

cor_e_vtablecallsnotsupported

vtablecallsnotsupportedexception

all other HRESULT

COMException


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.