0

I have two applications

  • Parent application.
  • Child application.

WORKING STRUCTURE

  • The code of child application is compiled from the parent application.

  • I have added a DLL named MyDLL.dll in the parent application(There is a feature in parent application to upload DLL and compile code of child application from there). The child application also consumes that DLL.

  • Now I need to create a DLL of child application. Since MyDLL.dll is in parent application I cannot build the project of child application individually(since child application also consumes that MyDLL.dll).

When I build the child application, its showing the error : Could not Find namespace MyDll. Are you missing an assembly reference?

CODE

1. Parent Application

using MyDll;
namesapace MyNamespace
{
   class ParentApplication
   {

   }
}

2. Child Application

using MyDll;
namesapace ChildNamespace
{
   class ChildApplication
   {

   }
}

How do I generate a DLL of child application without building project of child application?

2
  • "How do I generate a DLL of child application without building the child application" no...just, no Commented Jan 16, 2015 at 5:27
  • Sorry. Its building project of child application instead of building the child application. @David Pilkington Commented Jan 16, 2015 at 5:30

1 Answer 1

3

You need to build the child application because until the code is compiled into a dll then well, its just code on a screen. Since, C# is compiled into Microsoft Intermediate Language MISL which is then compiled against the common language run time (CLR) and then that is made to native code like machine code. Where you can read more about here. So in short, you have to build the child application, no other way around it.

It also seems like you aren't using the right location for the MyDll.dll, where exactly is it located?

Sign up to request clarification or add additional context in comments.

3 Comments

Yes. I know. In normal time it should be compiled to get dll. I can't add MyDll.dll to the Child application because its already added in Parent application. @James Loyd
The Child application is working perfectly when the child's solution with classes exist in Parent application directory. Now I need to convert child application to DLL and add it to the Parent application directory instead of placing solution with classes. @James Loyd
Yes you are right. Dll cannot be generated without building the project. I found the solution. The parent application has a feature to build DLL for the child and the issue is solved. Thank you for your answer and precious time :) @James Loyd

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.