a reference failure

<Placed this post in C# by mistake first>
Starting using CppCodeProvider versus
VBCodeProvider I got a compiler error that the path could not be found.

I dutifully attached the file CppCodeProvider.dll to the project treeview--same error. It says that it cannot find it.

Error 1 fatal error C1107: could not find assembly 'CppCodeProvider.dll': please specify the assembly search path using /AI or by setting the LIBPATH environment variable c:\VCPlus_projects\AymanCompile\AymanCompile\AymComp.cpp

The directive I use is:

#using <CppCodeProvider.dll>

<VStudio 8-install-location>\Common7\IDE\PublicAssemblies

where this file is located has been put into Tools-->Options-->VC++ Directories window and saved.

Something is wrong with what I am doing: it is not the first time similar happens. I do not quite remember how I got around this problem before because of the hectic pace. I want to solve this thing once and for all.

Please explain the basics.

Thanks.





Answer this question

a reference failure

  • PRIDE

    That error has been resolved, thanks. I compiled past that point right after I read his post.

    Sorry and thank you.


  • Alexander Dsugan

    Either Ayman gave a solution to your problem and you haven't bothered reading his post, or you haven't adequately explained your problem.

    I am assuming that the question is how to remedy the C1107 compilation error.  The /AI switch is the answer.

    Here's what I've done to reproduce the error and what I did to remedy it.

    1. Create a new CLR project (a Console project in particular)

    2. Above the line:
    int main(array<System::String ^> ^args)
    Add:
    #using
    <CppCodeProvider.dll>

    3. Compiled to get the error:
    1>.\helpalex.cpp(6) : fatal error C1107: could not find assembly 'CppCodeProvider.dll': please specify the assembly search path using /AI or by setting the LIBPATH environment variable

    4. Went to Project->Properties->C/C++->General->Resolve #using References (the IDE's interface for the /AI switch), and added the following:
    $(DevEnvDir)PublicAssemblies
    (The DevEnvDir macro evaluates to \Program Files\Microsoft Visual Studio 8\Common7\IDE\).

    5. Recompiled to see that the error went away.

    Try following steps 1-5 on your machine.  If you are still getting the error, then do as Ayman did and do a dir /s to see if that dll resides in your Visual Studio installation (and if it doesn't, we can take it from there.)

    Brian


     

  • deacon

    A simple dir /s on the file on my machine showed it at the microsoft visual studio 8\common7\IDE\publicassembleis folder.

    Look at the help of the /AI switch.

    Also, as mentioned in previous thread posts. The .net develpment forums is the best place for such questions (http://forums.microsoft.com/MSDN/default.aspx ForumGroupID=12&SiteID=1).

    Thanks,
      Ayman Shoukry
      VC++ Team


  • Ranga Krishnan

    Your answer shows that you did not bother reading my post at all which is not that unusual in this forum as I've observed.

    I've read help on your switch many times akready. It contains no useful information to help me rosolve my problem.

  • a reference failure