PC Review


Reply
Thread Tools Rate Thread

Can't load 'namespace.type'. File or executable not found?

 
 
Andy B
Guest
Posts: n/a
 
      13th Dec 2007
I have 2 web applications: ParentApp and ChildApp. The ChildApp root folder
is setup like this: ParentApp/ChildApp. I set the output folder of the
ChildApp under the build section in VS2005 properties for the project to the
ParentApp/bin folder. Everything builds ok, but when I run a page in the
ChildApp, I get something like: Can't load 'namespace.type'. The file
ChildApp could not be found. Is there any way to fix something like this?



 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      13th Dec 2007
asp.net applications only look in /bin and the windows folder for dlls.
change the build to output to the correct bin

if the parent needs a reference to the child, then add a ref, which will
copy the child bin to the parent bin.

-- bruce (sqlwork.com)


"Andy B" wrote:

> I have 2 web applications: ParentApp and ChildApp. The ChildApp root folder
> is setup like this: ParentApp/ChildApp. I set the output folder of the
> ChildApp under the build section in VS2005 properties for the project to the
> ParentApp/bin folder. Everything builds ok, but when I run a page in the
> ChildApp, I get something like: Can't load 'namespace.type'. The file
> ChildApp could not be found. Is there any way to fix something like this?
>
>
>
>

 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      13th Dec 2007
Looks expected to me. The destination for the compiled code for ChildApp is
the parent bin folder... So when you run the ChildApp, it can't find its own
code as this is located somewhere else than in its own bin folder...

Though you could change the web.config file to change the default bin
folders or just let the ChildApp code goes in the ChildApp bin folder, your
best bet could be to explain what you are trying to do in case someone would
have a better way to achieve your goal (or are you trying to create a class
library ??)

--
Patrice

"Andy B" <(E-Mail Removed)> a écrit dans le message de news:
%(E-Mail Removed)...
>I have 2 web applications: ParentApp and ChildApp. The ChildApp root folder
>is setup like this: ParentApp/ChildApp. I set the output folder of the
>ChildApp under the build section in VS2005 properties for the project to
>the ParentApp/bin folder. Everything builds ok, but when I run a page in
>the ChildApp, I get something like: Can't load 'namespace.type'. The file
>ChildApp could not be found. Is there any way to fix something like this?
>
>
>



 
Reply With Quote
 
Andy B
Guest
Posts: n/a
 
      13th Dec 2007
I am trying to put all of the dll/code files in the "whole" application in
the parent bin folder because it would reduce the size of the application by
not having bin folders for each application. The other thing is, if I have
ChildApp.dll in ChildApp/bin, but ParentApp needs to make a reference to it,
the whole application now has 2 copies of ChildApp.dll in it (this is what I
am trying to avoid for the most part). Any ideas how to do this? I would
rather not use the GAC since I have no access to it on the live server.
"Patrice" <http://www.chez.com/scribe/> wrote in message
news:(E-Mail Removed)...
> Looks expected to me. The destination for the compiled code for ChildApp
> is the parent bin folder... So when you run the ChildApp, it can't find
> its own code as this is located somewhere else than in its own bin
> folder...
>
> Though you could change the web.config file to change the default bin
> folders or just let the ChildApp code goes in the ChildApp bin folder,
> your best bet could be to explain what you are trying to do in case
> someone would have a better way to achieve your goal (or are you trying to
> create a class library ??)
>
> --
> Patrice
>
> "Andy B" <(E-Mail Removed)> a écrit dans le message de news:
> %(E-Mail Removed)...
>>I have 2 web applications: ParentApp and ChildApp. The ChildApp root
>>folder is setup like this: ParentApp/ChildApp. I set the output folder of
>>the ChildApp under the build section in VS2005 properties for the project
>>to the ParentApp/bin folder. Everything builds ok, but when I run a page
>>in the ChildApp, I get something like: Can't load 'namespace.type'. The
>>file ChildApp could not be found. Is there any way to fix something like
>>this?
>>
>>
>>

>
>



 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      14th Dec 2007
And the size of this file ?

Try :
http://www.codinghorror.com/blog/archives/000131.html
The probing tag should allow to specify another directory in whihc case you
could perhaps left the dll file at its place and just ask the parent
application to saerach also the other bin folder for assemblies.

My personal preference would be likely rather to create a class library that
would contain ony the common code reducing the file size and having them at
both places.

Another option if those two sites are closely linked one with the other
would be to handle them as a single site with two "subsites"...
--
Patrice



"Andy B" <(E-Mail Removed)> a écrit dans le message de news:
ePW$(E-Mail Removed)...
>I am trying to put all of the dll/code files in the "whole" application in
>the parent bin folder because it would reduce the size of the application
>by not having bin folders for each application. The other thing is, if I
>have ChildApp.dll in ChildApp/bin, but ParentApp needs to make a reference
>to it, the whole application now has 2 copies of ChildApp.dll in it (this
>is what I am trying to avoid for the most part). Any ideas how to do this?
>I would rather not use the GAC since I have no access to it on the live
>server.
> "Patrice" <http://www.chez.com/scribe/> wrote in message
> news:(E-Mail Removed)...
>> Looks expected to me. The destination for the compiled code for ChildApp
>> is the parent bin folder... So when you run the ChildApp, it can't find
>> its own code as this is located somewhere else than in its own bin
>> folder...
>>
>> Though you could change the web.config file to change the default bin
>> folders or just let the ChildApp code goes in the ChildApp bin folder,
>> your best bet could be to explain what you are trying to do in case
>> someone would have a better way to achieve your goal (or are you trying
>> to create a class library ??)
>>
>> --
>> Patrice
>>
>> "Andy B" <(E-Mail Removed)> a écrit dans le message de news:
>> %(E-Mail Removed)...
>>>I have 2 web applications: ParentApp and ChildApp. The ChildApp root
>>>folder is setup like this: ParentApp/ChildApp. I set the output folder of
>>>the ChildApp under the build section in VS2005 properties for the project
>>>to the ParentApp/bin folder. Everything builds ok, but when I run a page
>>>in the ChildApp, I get something like: Can't load 'namespace.type'. The
>>>file ChildApp could not be found. Is there any way to fix something like
>>>this?
>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
One executable program send message to another executable program =?Utf-8?B?SkRI?= Microsoft Dot NET Framework 4 26th Aug 2007 05:08 PM
Error: Task executable could not be run. Executable not a valid Win32application !? Firona Microsoft C# .NET 0 14th Jan 2007 11:00 AM
load=load=load=load= Janusz Sokolowski Windows XP Help 0 26th Oct 2004 02:29 PM
how to catch the return code of one VB.Net executable from another VB.net executable =?Utf-8?B?bGlicw==?= Microsoft VB .NET 14 5th May 2004 10:01 PM
Unable to load Executable program from CD Frank H. Microsoft Windows 2000 Applications 0 21st Oct 2003 06:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:19 AM.