CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002
    Posts
    2

    Angry Compile error, cant access file

    Hi all,

    Anyone can help me?

    I trying to use an old dll from a vc6 project with a new c# project making a 2 projects solutions.
    Everything compile and works ok, but there is one problem with the compiler.

    (the c# project needs the dll and everythig is set correctly to use it; i think)

    I have 2 outputs directory for each project.
    1- the standard \debug directory.
    2- a ..\bin\debug

    In the project option for the Dll i puted this line:
    "copy Debug\utilDllD.dll ..\bin\debug"

    If the file utilDll.dll is not in the ..\bin\debug directory there is no problem. But if its there the compiler complain about "a file cant be access, its used by another process".

    I have to shut down Visual studio .net delete the Dll, and restart VS.net.

    I didnt have this king of problem with the old VS6.

    Can anyone help me.

    Thanks.

  2. #2
    Join Date
    Jun 2002
    Location
    USA
    Posts
    3
    Unless you need your dll to be in Debug directory, you can try to direct the linker to output your dll into ..\bin\debug directory right away without copying it afterwards. Then make your executable project depend on the dll, so the IDE will build the dll first, if there are any changes, and then the exe.

    To change output directory for the dll project, go to project properties, Configuration Properties->General and change Output Directory to ..\bin\debug. Also, go to solution properties, Project Dependencies and make your executable depend on your dll project. And remove "Copy Debug ..bin\debug" directive.

    Hope that helps.

  3. #3
    Join Date
    Jun 2002
    Posts
    2
    No, it doesnt work.
    The created dll caonnot be overwriten, or deleted.
    I have to close the solution, delete it and rebuild the dll.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured