0

When I try to add ICU extension to my Visual Studio 2013 Project, icu.net.dll successfully added, the other DLL's (icudt40.dll, icuin40.dll, icuuc40.dll) failed to add with the following error: "A reference could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component".

What's wrong with these DLL's \ my VS Project and how to add these DLL's?

P.S. Same behaviour with the VS 2010.

Alderven
  • 7,569
  • 5
  • 26
  • 38

1 Answers1

1

This is by design, they are neither COM servers nor .NET assemblies. They are simple DLLs, you'd have to use [DllExport] to call the functions they expose. Which the icu.net wrapper already does, no additional help is needed. You simply need to copy them to the build output directory, nothing else.

Make that automatic by adding them to your project with Project + Add Existing Item. Set their Copy to Output Directory property to "Copy if newer". A post-build event that uses xcopy.exe is an alternative.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536