compiler error BC30652

Z

Zuel

Hi Folks!
I am developing with VB ASP .net and C#. I received an error
while compiling, BC30652. This error says that a reference to an
assembly missing.

The Details are this.
1 VB ASP.net web application - this is the component where the error
exists.
2 VB class project containing our credit card transactions.
3 C# class project with our datastore utility (static) access methods
, IE SQL Database.

in the ASP event for a webform button click, I create the VB credit
card classes and fill appropriate data from the web form. I then pass
these classes to a static C# datastore class method. This saves the
data to the database prior to the actual transaction in the VB
classes. Finaly I update the database with the responses from the
credit card transaction.

example: (in pseudo code)

VB Class assembly *******************
public class (VB) CreditCardTransaction
public variables {Transaction information etc...}

public function commit() as CreditCardResponse ' commits the
credit transaction to provider
...
end function
End class

public class (VB same assembly as above) CreditCardResponse
public variables {Response information filled in by commit}
end class

C# Class assembly ********************
public class DataStore{
// more util functions for generic database stuff
}

public class (C#) CreditCardDatabaseUtil : DataStore{
public static CreditCardResponse saveToDataBase(
CreditCardTransaction trans){
...
}
public static updateToDataBase( CreditCardResponse resp){
}
}

ASP Project codeBehind: ***************
public sub On_Click()
dim trans as new CreditCardTransaction()
trans.{Set transaction information etc..}

saveCCToDataBase.saveToDataBase(trans) '{Error blue line
under trans}

dim response as CreditCardResponse = trans.commit()

updateToDataBase(response) '{Error blue line under response}

end sub
}

The error BC30652 only applies to the paramaters of the method calls
for the datastore class, save and update ToDataBase.

I find this extremely weird. I have references to my VB and C#
classes in the ASP Project references. But the error insists I am
missing a reference to an assembly. What's more weird is trans is
created above the error with no warning at all. And if I remove the
datastore calls the ASP project compiles fine.

My Workaround was to change the datastore parameters of the save and
update methods from the transaction and response classes to Object
classes. In both those methods I check for the appropriate class by
if object.GetType == typeof(appropriateclass);

but I am so confused as to why this happened. Anyone with any ideas?
How to prevent this in the future? Should I rely more on interfaces
to interact with an ASP project?

Thanks!

Erik
 
A

Andy Mortimer [MS]

Do you have project references or file references? Have you tried changing
them?

Andy Mortimer [MS]
Please do not send email directly to this alias. This alias is for
newsgroup purposes only

This posting is provided "AS IS" with no warranties, and confers no rights.
OR if you wish to include a script sample in your post please add "Use of
included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm"
 
Z

Zuel

It's strange. I found another person with the same problem as me.
And he discovered more than I.

As you know the strangeness is the fact that you can create an object
of a type, reference it and such. but once you pass it off to the
datastore. Boom..

Turns out the exact scenario is, passing a VB class to a C# class of
different assemblies. Now the curious thing is in how you specify the
references. A DLL reference works, a project reference does not(as in
my case)

I was not happy with this so I ended up converting all the VB code to
C# and all is well. :)

Thanks for your response!

Erik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top