tracym111 / google-glog

Automatically exported from code.google.com/p/google-glog
Other
0 stars 0 forks source link

Some sort of reflection issue when trying to run a test project which uses a dll which uses GLOG. #32

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Running the project tmvpTest in the attached solution file.
2. Will fail on run, and issue a stack trace.
3. Removing any calls to the glog library will make it work.

What is the expected output? What do you see instead?

I expect that the test file would run and report that all tests have passed 
but it cannot load. Removing any calls to glog results in the test running 
and passing.

The test project included with the GLOG solution works fine.

What version of the product are you using? On what operating system?

I am running 0.3.0. The project is run from an unmanaged project 
(tmvpLib.dll). But there is a managed project (the test project, tmvpTest) 
which runs tmvpLib.dll. All in visual studio 8.0.

Please provide any additional information below.

I have only started this project so the code attached is just skeleton code 
. Which should make it easy to diagnose since there is very little code. I 
am trying setup a test library, code library, and a logging library. The 
logging library is giving issue. Here is the stack trace of the error, I 
think it is not useful:

Unable to get type tmvpTest.UnitTest1, tmvpTest. Error: 
System.IO.FileNotFoundException: The specified module could not be found. 
(Exception from HRESULT: 0x8007007E)
   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String 
codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& 
stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.nLoad(AssemblyName fileName, String 
codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& 
stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, 
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean 
forIntrospection)
   at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, 
Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm 
hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at 
Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestExecuter.GetType(Un
itTestElement unitTest, String type)
   at 
Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestExecuter.ResolveMet
hods().

Original issue reported on code.google.com by ajaya...@gmail.com on 26 Jan 2010 at 3:30

Attachments:

GoogleCodeExporter commented 8 years ago
Sorry in one of the projects there is a absolute file reference instead of a 
relative 
one. It is in the additional includes project properties.

Original comment by ajaya...@gmail.com on 26 Jan 2010 at 5:31

GoogleCodeExporter commented 8 years ago
The above comment is for the benefit of anyone who wants to run the solution.

Original comment by ajaya...@gmail.com on 26 Jan 2010 at 6:35