|
Fort Mega wrote: but the app doesn't see the C# assemblies at all
Mega, the only information you gave us is that the assemblies are written in (the source code is in) different languages and since that cannot possibly be relevant to the problem how can we have any ideas beyond wild guesses? Maybe the dog ate it.
|
|
|
|
|
OMG THE DOG! I guess I'll need to follow him around for a few days and see if it comes out the other end!
The difference in sourcecode language is the only difference between the assemblies. The application code in London is the same as the code I am testing on in the states thus my initial question was essentially 'is it even possible for the difference in language to play into this problem'. I didn't think that it would but I've been offered differing opinions, I'll be posting some code shortly
|
|
|
|
|
Are you fer cereal?!! Nah really?
Can they really not support C#
|
|
|
|
|
Hi,
is it the C# assemblies are not showing in the list (how do you generate the list?)
or is it they do show but fail to load? (What is the exception then?)
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
They don't show in the list at all:
I retrieve all the files from the dll repository using System.IO.Directory.GetFiles
Then I feed that into a function that loads the contents of each assembly into an arraylist:
Dim esa As System.Reflection.Assembly = System.Reflection.Assembly.LoadFrom(path)
Dim types As New System.Collections.ArrayList
For Each ESAtype As Type In esa.GetTypes
types.Add(ESAtype.FullName.Substring(ESAtype.FullName.LastIndexOf(".") + 1))
Next
Return DirectCast(types.ToArray(GetType(String)), String())
The arraylist is then used to populate table rows and the process is repeated for each dll
|
|
|
|
|
Hi,
1.
are you sure the C# assemblies show up in the result of GetFiles() ?
2.
I think we will need to see more code.
the code you have shown so far seems to collect Types from one file.
there must be a loop over the files, code to fill the ComboBox (or whatever shows the list),
and the actual loading code.
3.
Is everything protected with try-catch constructs?
Are you showing Exceptions with ToString() to mske sure you obtain all available info?
4.
If you don't have it already, I would suggest you add logging code that traces the
relevant program flow and shows some intermediate results (such as GetFiles result).
I typically have a log function that takes one string argument, and shows it on the
Console (=output pane in Visual Studio) AND appends it to a log file (so you can
retrieve and study the file from the other side of the ocean...).
I add such code while developping, and I leave it in (but have a simple means to
enable/disable it, through an app setting or something similar).
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
First off, thanks for the in depth suggestions. One thing I forgot to mention is that I can't debug directly on London's codebase and I can't reproduce the behaviour at home, even though it's the same code. In response:
1. At home yes. In London I don't know.
2. True: But why would this work any differently in London than in the States? Remember, it is ALL the same code, just a different environment. Regardless, it's something like this:
availableFilePaths = System.IO.Directory.GetFiles(repos)
For Each filePath As String In availableFilePaths
file = filePath.Substring(filePath.LastIndexOf("\") + 1)
classNames = GetClassNames(filePath)
For i As Int32 = 0 To classNames.Length - 1
tableRow = Table.NewRow()
tableRow.Item(0) = file.Remove(file.LastIndexOf("."), 4)
tableRow.Item(1) = classNames(i)
Table.Rows.Add(tableRow)
Next
Next
The actual loading code is irrelevant, the dlls can't be loaded if they can't be selected from the list
3. No try catches in this...bad idea jeans on my part, and unfortunately I can't add them right now
4. I do that too but unfortunately not in this instance and I can't update it right now either. I'm going to follow that advice more often though
This code has been tested, deployed and error free for some time...the introduction of the C# sourcecode is definitely the culprit somehow
|
|
|
|
|
OK, here are some more ideas:
1.
is this the first non-domestic instance? Several software packages have different
deliverables for domestic vs. international users (Windows? .NET? ADO.NET? ...).
I don't know any details though.
2.
Every installation is slightly different; international users would typically have
different regional settings (date/time formatting, currency, number formatting,
language, ...). Not sure how that would affect the matter at hand though, unless you
use special characters in filenames.
3.
if DataColumn[1].Unique is true, the Adds for duplicated classes would fail.
Does the DataTable get loaded from a database file, if so was it initialized in the same
way as yours?
Maybe you can have this tested by having the duplicated VB assemblies removed...
4.
If you catch and ignore exceptions at some higher level, then whatever goes suddenly wrong
would terminate the table filling
5.
I would try and check the facts first:
- are the files really there?
- are they accessible? (same owner, same access rights,...)
- are there any exceptions?
6.
You might consider creating from scratch a small app that just targets the problem area,
checks/logs everything, logs a number of SystemInformation/Environment stuff, and
catches+logs all exceptions at all times...
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
1. Yes it is and I have a feeling that there may be some idiosyncrasy in the framework that is affecting this but I have no factual basis for that. I have to do some digging into it
2. True but there are no special characters, etc.
3. Good suggestion. I don't think this is the problem but I'm going to investigate further
4. Right, except that all the VB dlls get added...even if they come in AFTER the C# one(s)
5. Yes, Yes, and what do you mean by exceptions?
6. I think I'm going to try this...tomorrow
I think I have enough to go with for the time being, you have been incredibly helpful and I really appreciate it. Thanks again. When I get this figured out (or don't) I'll post back
|
|
|
|
|
you're welcome.
and good luck!
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Fort Mega wrote: all the VB dlls get added...even if they come in AFTER the C# one(s)
IIRC GetFiles() does not reorder the files, it gives them as they come from Windows;
and that order depends on the file system (FAT32, NTFS, ...). NTFS would keep them
alphabetically, FAT/FAT32 does not.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Ohhh...good to know, thanks man!
|
|
|
|
|
Just a quick thought. The C# assemblies are CLS compliant aren't they?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Well, I added [assembly:CLSCompliant(true)] and the project compiled without errors. I have to admit I'm not really knowledgeable in the area. Should that take care of it or are there other steps I ought to take?
|
|
|
|
|
hi
i am new at this group, i am student of information technology , i am working on a project online virtual drive , i need ur help and support to do , i hope this group will help me
thanks
zubair khan
|
|
|
|
|
If you have specific problems and questions, then we'll help if we can. If all you want is for us to do the work for you, then you're on your own.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
You might want to start with a specific question. So far, all you've done is said that you "hope this group will help me". Certainly, but you have to ask an answerable question first.
|
|
|
|
|
ok i know i have written to guys before, but i have an issue that i cant deal with..
my visual studio.net program is kinda messed up, its like all the text in the program (excluding the menus and sub-menus) have all decreased in size. when i wanna open a project i cant even read the text ion the box it opens and i the background that used to be white is now grayish, the same color as the rest of the programs interface...
any help in fixing this program will be much appreciated (i even have a screenshot that i can send you in case you dnt understand my problem..
pls help me!!!!!
steven
|
|
|
|
|
In Tools > Options expand the Environment section and select Fonts and Colors. There are multiple items that you can affect, so the best thing to do would be to select the Text Editor in the Show Settings For combo and click the Use Defaults button.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
dude tried wot you said and i am sorry but it hasnt changed.... dnt know wots goin on with it but even when a box opens to choose projects from, even that one is all small and unreadable... its readable but nt clearly..
cud de be anything else wrong with it or do i have to uninstall it... it worked when i installed it but it started looking like this last week....
any help wud be apreciated.
|
|
|
|
|
Pardon? I really didn't understand your post - I don't speak txt. Could you explain more clearly?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Stop with the damn TXT Speak. It makes your posts hard to read. You've got a full 101+ key keyboard in front of you, use it.
There is a command line switch you can use to reset Visual Studio to default settings. Click Start/Run, then in the box that shows up, type devenv /reset or devenv /resetide , I can't remember which. You'll kiss all your customizations goodbye, but it might work for you.
|
|
|
|
|
sorry for the speaking in the text, sometimes i forget to write like a normal person would... i tries both the command lines you gave me and both of them tells me that its an invalid command line: unknown switch :reset.
i know that i didnt customize the programs interface, and i have an idea that it might be something with one of the files thats wrong, but hey, wot do i know, if i knew then i wouldnt have asked you guys...
so it didnt work as planned... any other ideas dave???
oh and thank you for the help so far..
steven
|
|
|
|
|
The command is devenv /resetsettings . As a hint, if you ever want to know what command line switches a Microsoft application supports, type the name of the executable followed by /? . So to find out what devenv supports you would do devenv /? .
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Does any one know how to check what the compression of an image is. Don't need to compress if it already is.
Mark Thibodeaux
|
|
|
|