Re: Own assembly fails to load when vs2008 is not installed on target machine
- From: "Joe Withawk" <no@xxxxx>
- Date: Mon, 31 Dec 2007 09:56:24 +0100
I made an extremely small test now. A windows forms project .net 2.0 which tries to load a c++ class library. It works on systems with vs2008, but it does not work on systems without it. Source and binaries at www.greenleaf.dk/error.zip .
I must be missing some important point when it comes to using class libraries.
The loader is just a form with a button which does this
Assembly a=Assembly.LoadFrom("DummyLibrary.dll");
MessageBox.Show(a.FullName);
The classlib is just a new project/other laguages/c++/classlibrary with this code in the single h file
// DummyLibrary.h
#pragma once
using namespace System;
namespace DummyLibrary {
public ref class Class1
{
// TODO: Add your methods for this class here.
public:
int Add(int a, int b)
{
return a+b;
}
};
}
As I said previoucly. This loads fine n my development machine, but not else. If I install vs2008 on the other system then the same binaries suddenly work. It seems that vs installs something which makes this work. Has it to do with security or something like that? Note that it is not a problem with absolute vs relative paths. I tried both.
The two micro projects are in this zip www.greenleaf.dk/error.zip It is not one solution, but two seperate projects to make it even more dead simple.
.
- Follow-Ups:
- Re: Own assembly fails to load when vs2008 is not installed on target machine
- From: Alberto Poblacion
- Re: Own assembly fails to load when vs2008 is not installed on target machine
- References:
- Prev by Date: Re: Hosting 2 WCF Service in one windows service
- Next by Date: Re: Static methods in ServiceContract(WCF)
- Previous by thread: Own assembly fails to load when vs2008 is not installed on target machine
- Next by thread: Re: Own assembly fails to load when vs2008 is not installed on target machine
- Index(es):