What is AddExternalReferenceForMSCorLib ?

SyntaxEditor .NET Languages Add-on for Windows Forms Forum

Posted 18 years ago by Edward
Version: 4.0.0246
Avatar
Hi,

Could you tell me the difference there is between:
DotNetProjectResolver.AddExternalReferenceForSystemAssembly(string);
DotNetProjectResolver.AddExternalReference(string);
I couldn't find a full explanation of these behaviours in the SyntaxEditor documentation.
Is it about where the component will look for the specified assemblies accordingly to the version of the CLR?

Also I expected AddExternalReferenceForMSCorLib() to add the MSCorLib.dll to the resolver for the code completion but I found that it didn't work as expected: it does not show basic types in the completion like "IntPtr" or so.

Regards,

Edward

Comments (1)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
The one for MSCorLib is a quick way to load the system's MSCorLib library. The AddExternalReferenceForSystemAssembly one lets you load a system assembly located in the GAC without needing to specify a path (so just like "System" is passed as a param). The AddExternalReference is used in all other cases where you pass a path ro explicit reference to an assembly.

For your other question make sure you include a "using System;" at the top of your code or else you are not importing those classes.


Actipro Software Support

The latest build of this product (v25.1.0) was released 22 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.