473,503 Members | 1,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

this is killing me, still a GetTypes() error

i have two classes that throw when GetTypes() is executed. The
following are their signatures.

public sealed class ProductService : IAF.TransactionComponent,
IProductService

public sealed class CategoryService :
IAF.Configuration.ConfigurableComponent, ICategoryService

This assembly references the assembly where the interfaces are defined.

public interface ICategoryService
public interface IProductService : IProductServiceBase
public interface IProductServiceBase

This is the exception text

..\IVS.WMS.Product.Server.dll =Could not load type
'IVS.WMS.IProductServiceBase' from assembly 'IVS.WMS.Product.Common,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Could not load type 'IVS.WMS.ICategoryService' from assembly
'IVS.WMS.Product.Common, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null'.
System.Reflection.ReflectionTypeLoadException: Unable to load one or
more of the requested types. Retrieve the LoaderExc
eptions property for more information.

This is the code that caused it.

Assembly a = Assembly.LoadFrom("IVS.WMS.Product.Server.dll");
Type []t = a.GetTypes(); //this line

I have been stuck on this for at least 2 weeks. I will be happy to mail
anything to anyone if they so desire to help in that way.

dan
Dec 5 '07 #1
5 6797
On Dec 5, 4:08 pm, Dan Holmes <dhol...@ivsi.comwrote:

<snip>
I have been stuck on this for at least 2 weeks. I will be happy to mail
anything to anyone if they so desire to help in that way.
If you can mail me a short but complete program that demonstrates the
program, I'll have a look.

Jon
Dec 5 '07 #2
Dan Holmes wrote:
i have two classes that throw when GetTypes() is executed. The
following are their signatures.

public sealed class ProductService : IAF.TransactionComponent,
IProductService

public sealed class CategoryService :
IAF.Configuration.ConfigurableComponent, ICategoryService

This assembly references the assembly where the interfaces are defined.

public interface ICategoryService
public interface IProductService : IProductServiceBase
public interface IProductServiceBase

This is the exception text

.\IVS.WMS.Product.Server.dll =Could not load type
'IVS.WMS.IProductServiceBase' from assembly 'IVS.WMS.Product.Common,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Could not load type 'IVS.WMS.ICategoryService' from assembly
'IVS.WMS.Product.Common, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null'.
System.Reflection.ReflectionTypeLoadException: Unable to load one or
more of the requested types. Retrieve the LoaderExc
eptions property for more information.

This is the code that caused it.

Assembly a = Assembly.LoadFrom("IVS.WMS.Product.Server.dll");
Type []t = a.GetTypes(); //this line

I have been stuck on this for at least 2 weeks. I will be happy to mail
anything to anyone if they so desire to help in that way.

dan
I just learned it is machine specific. I copied the dlls to a different
PC and this doesn't happen. I still don't understand.
Dec 5 '07 #3
Jon Skeet [C# MVP] wrote:
On Dec 5, 4:08 pm, Dan Holmes <dhol...@ivsi.comwrote:

<snip>
>I have been stuck on this for at least 2 weeks. I will be happy to mail
anything to anyone if they so desire to help in that way.

If you can mail me a short but complete program that demonstrates the
program, I'll have a look.

Jon
Thanks but i finally figured it.

When i rebooted all of VS was freaking out. The IDE was saying all my
plugins couldn't be found including the VS IDE plugin.

The next run of my app produced this:

[c:\sandbox\iaf.net\serverinstall]ApplicationServer.exe

Unhandled Exception: System.Runtime.InteropServices.COMException
(0x80040153): Invalid value for registry (Exception from HRESULT:
0x80040153 (REGDB_E_INVALIDVALUE)) at
System.Runtime.InteropServices.RuntimeEnvironment. GetDeveloperPath()
at System.AppDomain.SetupFusionStore(AppDomainSetup info)
at System.AppDomain.SetupDomain(Boolean allowRedirects, String path,
String configFile)

A quick trip to google produced:

http://www.devnewsgroups.net/group/m...opic42934.aspx

and a related link here:
http://msdn2.microsoft.com/en-us/library/tyshaw37.aspx

That explains why one pc worked and my main dev pc didn't.

dan
Dec 5 '07 #4
Dan Holmes <dh*****@ivsi.comwrote:

<snip>
Thanks but i finally figured it.
Excellent - always nice to hear about a happy ending :)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
Dec 5 '07 #5
I had the same problem, and found out that a different version of the
dependecy DLLs were in the GAC. Removing these from the GAC solved the
problem. Is this the case for you?

Boaz Ben-Porat
Milestone Systems A/S
Denmark

"Dan Holmes" <dh*****@ivsi.comskrev i en meddelelse
news:uY**************@TK2MSFTNGP02.phx.gbl...
>i have two classes that throw when GetTypes() is executed. The following
are their signatures.

public sealed class ProductService : IAF.TransactionComponent,
IProductService

public sealed class CategoryService :
IAF.Configuration.ConfigurableComponent, ICategoryService

This assembly references the assembly where the interfaces are defined.

public interface ICategoryService
public interface IProductService : IProductServiceBase
public interface IProductServiceBase

This is the exception text

.\IVS.WMS.Product.Server.dll =Could not load type
'IVS.WMS.IProductServiceBase' from assembly 'IVS.WMS.Product.Common,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Could not load type 'IVS.WMS.ICategoryService' from assembly
'IVS.WMS.Product.Common, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null'.
System.Reflection.ReflectionTypeLoadException: Unable to load one or more
of the requested types. Retrieve the LoaderExc
eptions property for more information.

This is the code that caused it.

Assembly a = Assembly.LoadFrom("IVS.WMS.Product.Server.dll");
Type []t = a.GetTypes(); //this line

I have been stuck on this for at least 2 weeks. I will be happy to mail
anything to anyone if they so desire to help in that way.

dan

Dec 5 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
19130
by: H. S. | last post by:
I am getting this error if I try to compile the file demarcated below. What I am missing here? I am using g++ (GCC) 3.3.5 (Debian 1:3.3.5-8). {tp2}> g++ -ansi -g -Wall tp2.cc -o tp2 tp2.cc: In...
2
2119
by: John Sims | last post by:
Hello All, Anybody out there know what this error is...I'm getting it while trying to create a partial replica from a full replica made from the design master. "The Partial Replica Wizard has...
4
1244
by: dave | last post by:
IE keeps popping up an error "expected string identifier" for the following snippet when a page is loading: The debugger goes to the line with ,'querystring': bar, but it doesn't highlight it. ...
2
1071
by: pradev | last post by:
Hello, All of a sudden I got this error in Visual Studio 2005 when I try building my website. I haven't come across this kind of error before. Error 1 could not find library...
5
16887
by: Tony Girgenti | last post by:
Hello. I developed and tested a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1. It uses a web form. Development testing works fine on my...
9
9666
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform has the child link to the main form identity key. subform1 - Master Field: SK Child Field: TrainingMasterSK The second subform has a...
13
4712
by: problem. | last post by:
#include <stdio.h> #include <stdlib.h> int main(void) { int a, b; float result = 0.0f; char symbol = '\0'; int loop = 0;
2
1315
by: Peted | last post by:
Using vs2008 c# i have this code snipet note: SUBMITTED_DT = DateTime? type if ((DateTime.Now - billingEvent.SUBMITTED_DT).Days 180) { throw new...
10
4849
by: simon2x1 | last post by:
I do not understand these error and also i can i fix it. This is the error- error:warning: session_start():cannot send session cache limiter - header already sent (output started at...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7084
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7458
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.