473,472 Members | 2,208 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

References embedding

Following the scenario:
client want the application in ONE file only and do not want to hear about
more then one exe in directory.
The application is about 10 projects (no other way to build 'cos consist of
3d parties without sources)
So thinking about folloing scenarion:
1) Make base class to embedd in it all classes in the application
2) On running such class (run-time - not installation) unpack all files into
temporary directory
3) On exit run Mr. Clean.

This is VERY DURTY AND UGLY solution, BUT I do not know another way... So
Maybe You do???

Please advice...

--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
Nov 16 '05 #1
4 1223
Probably the best solution, but very very messy. It would require late
binding and a lot of deleting. Also maybe difficult because once you bind
it, you cant unbind it, so in a lot of situations you would get access
violations trying to delete the assemblies. It is not exactly the same, but
maybe if your client would allow it, have all of the assemblies reside on one
server. Have one executable that can be copied/moved anywhere and use
remoting or even just load the assemblies over the network. That is if all
computers are on the same network.

"Tamir Khason" wrote:
Following the scenario:
client want the application in ONE file only and do not want to hear about
more then one exe in directory.
The application is about 10 projects (no other way to build 'cos consist of
3d parties without sources)
So thinking about folloing scenarion:
1) Make base class to embedd in it all classes in the application
2) On running such class (run-time - not installation) unpack all files into
temporary directory
3) On exit run Mr. Clean.

This is VERY DURTY AND UGLY solution, BUT I do not know another way... So
Maybe You do???

Please advice...

--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "

Nov 16 '05 #2
"landagen" <la******@discussions.microsoft.com> wrote in message news:<06**********************************@microso ft.com>...
Probably the best solution, but very very messy. It would require late
binding and a lot of deleting. Also maybe difficult because once you bind
it, you cant unbind it, so in a lot of situations you would get access
violations trying to delete the assemblies. It is not exactly the same, but
maybe if your client would allow it, have all of the assemblies reside on one
server. Have one executable that can be copied/moved anywhere and use
remoting or even just load the assemblies over the network. That is if all
computers are on the same network.

"Tamir Khason" wrote:
Following the scenario:
client want the application in ONE file only and do not want to hear about
more then one exe in directory.
The application is about 10 projects (no other way to build 'cos consist of
3d parties without sources)
So thinking about folloing scenarion:
1) Make base class to embedd in it all classes in the application
2) On running such class (run-time - not installation) unpack all files into
temporary directory
3) On exit run Mr. Clean.

This is VERY DURTY AND UGLY solution, BUT I do not know another way... So
Maybe You do???

Please advice...
You could also embed all the assemblies into an exe as a binary
resource streams and use the Assembly.Load(byte[]). You could do this
in response to the AppDomain.CurrentDomain.AssemblyResolve event to
find and load the appropriate resource stream or you could create an
entirely seperate exe whose sole purpose is to load the assemblies
from its resource stream and invoke entry point of your exe (now also
embeded in the resource stream) allowing you to completely seperate
this packaging concern from the project itself. In either case since
all assemblies would be directly loaded into memory no cleanup needs
to be done on exit or left over files if the program crashes/power
outage or whatever.

I did a quick google search and found some sample code for you too at:
http://weblogs.asp.net/jdennany/arch.../24/29035.aspx

- Kurt

--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "

Nov 16 '05 #3
You could use an IL Linker to join all the assemblies into one. Serge Lidin
wrote a nice little one, and you can get it here:
http://www.gotdotnet.com/Community/U...f-820137305e24

--
Michael Giagnocavo
MVP
www.atrevido.net
"Tamir Khason" <ta**********@tcon-NOSPAM.co.il> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Following the scenario:
client want the application in ONE file only and do not want to hear about
more then one exe in directory.
The application is about 10 projects (no other way to build 'cos consist
of 3d parties without sources)
So thinking about folloing scenarion:
1) Make base class to embedd in it all classes in the application
2) On running such class (run-time - not installation) unpack all files
into temporary directory
3) On exit run Mr. Clean.

This is VERY DURTY AND UGLY solution, BUT I do not know another way... So
Maybe You do???

Please advice...

--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "

Nov 16 '05 #4
Dynamic assemblies will have issues with some things (say, XML
serialization).

--
Michael Giagnocavo
MVP
www.atrevido.net

"Kurt" <ku********@hotmail.com> wrote in message
news:27**************************@posting.google.c om...
"landagen" <la******@discussions.microsoft.com> wrote in message
news:<06**********************************@microso ft.com>...
Probably the best solution, but very very messy. It would require late
binding and a lot of deleting. Also maybe difficult because once you
bind
it, you cant unbind it, so in a lot of situations you would get access
violations trying to delete the assemblies. It is not exactly the same,
but
maybe if your client would allow it, have all of the assemblies reside on
one
server. Have one executable that can be copied/moved anywhere and use
remoting or even just load the assemblies over the network. That is if
all
computers are on the same network.

"Tamir Khason" wrote:
> Following the scenario:
> client want the application in ONE file only and do not want to hear
> about
> more then one exe in directory.
> The application is about 10 projects (no other way to build 'cos
> consist of
> 3d parties without sources)
> So thinking about folloing scenarion:
> 1) Make base class to embedd in it all classes in the application
> 2) On running such class (run-time - not installation) unpack all files
> into
> temporary directory
> 3) On exit run Mr. Clean.
>
> This is VERY DURTY AND UGLY solution, BUT I do not know another way...
> So
> Maybe You do???
>
> Please advice...
You could also embed all the assemblies into an exe as a binary
resource streams and use the Assembly.Load(byte[]). You could do this
in response to the AppDomain.CurrentDomain.AssemblyResolve event to
find and load the appropriate resource stream or you could create an
entirely seperate exe whose sole purpose is to load the assemblies
from its resource stream and invoke entry point of your exe (now also
embeded in the resource stream) allowing you to completely seperate
this packaging concern from the project itself. In either case since
all assemblies would be directly loaded into memory no cleanup needs
to be done on exit or left over files if the program crashes/power
outage or whatever.

I did a quick google search and found some sample code for you too at:
http://weblogs.asp.net/jdennany/arch.../24/29035.aspx

- Kurt
>
> --
> Tamir Khason
> You want dot.NET? Just ask:
> "Please, www.dotnet.us "
>
>
>

Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Alicia Haumann | last post by:
I accidentally sent this to webmaster@python.org, so this could be a duplicate if "webmaster" forwards it to this list. :{ Hi, there. Thanks for any help that can be offered. I've been...
9
by: Xah Lee | last post by:
in coding Python yesterday, i was quite stung by the fact that lists appened to another list goes by as some so-called "reference". e.g. t=range(5) n=range(3) n='m' t.append(n) n='h'...
0
by: hq4000 | last post by:
Given AStyleSheet.xsl : <AStyleSheet> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.mytest.mytest2.mytest3.com" version="1.0"> <xsl:output method="xml"...
6
by: Qun Cao | last post by:
Hi Everyone, I am a beginner on cross language development. My problem at hand is to build a python interface for a C++ application built on top of a 3D game engine. The purpose of this python...
3
by: =?Utf-8?B?am1obWFpbmU=?= | last post by:
When I put asp controls inside the LoginView it removes the codebehind references so that the page will not build. For example: <asp:LoginView ID="LoginView" runat="server" > <LoggedInTemplate>...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.