Click here to Skip to main content
15,891,529 members
Home / Discussions / C#
   

C#

 
GeneralRe: CustomCollection + Auto code generation in designer Pin
Heath Stewart18-Jan-04 11:45
protectorHeath Stewart18-Jan-04 11:45 
GeneralRe: CustomCollection + Auto code generation in designer Pin
James Simpson18-Jan-04 11:50
James Simpson18-Jan-04 11:50 
Generalado.net Pin
Roger Alsing18-Jan-04 1:30
Roger Alsing18-Jan-04 1:30 
GeneralRe: ado.net Pin
Arjan Einbu18-Jan-04 4:10
Arjan Einbu18-Jan-04 4:10 
GeneralRe: ado.net Pin
Heath Stewart18-Jan-04 11:31
protectorHeath Stewart18-Jan-04 11:31 
Generalcreating a dll with win32 functions, and calling it from C# Pin
misterbear17-Jan-04 23:52
misterbear17-Jan-04 23:52 
GeneralRe: creating a dll with win32 functions, and calling it from C# Pin
Nick Parker18-Jan-04 5:47
protectorNick Parker18-Jan-04 5:47 
GeneralRe: creating a dll with win32 functions, and calling it from C# Pin
leppie18-Jan-04 6:15
leppie18-Jan-04 6:15 
GeneralRe: creating a dll with win32 functions, and calling it from C# Pin
Heath Stewart18-Jan-04 11:24
protectorHeath Stewart18-Jan-04 11:24 
GeneralRe: creating a dll with win32 functions, and calling it from C# Pin
misterbear20-Jan-04 6:51
misterbear20-Jan-04 6:51 
GeneralRe: creating a dll with win32 functions, and calling it from C# Pin
Heath Stewart20-Jan-04 8:24
protectorHeath Stewart20-Jan-04 8:24 
GeneralWeb Service Question Pin
Mazdak17-Jan-04 20:25
Mazdak17-Jan-04 20:25 
GeneralRe: Web Service Question Pin
Heath Stewart18-Jan-04 11:19
protectorHeath Stewart18-Jan-04 11:19 
GeneralTesting Distributed Applications Pin
Mohamad Al Husseiny17-Jan-04 19:26
Mohamad Al Husseiny17-Jan-04 19:26 
GeneralRe: Testing Distributed Applications Pin
Heath Stewart18-Jan-04 11:17
protectorHeath Stewart18-Jan-04 11:17 
GeneralRe: Testing Distributed Applications Pin
Mohamad Al Husseiny18-Jan-04 15:08
Mohamad Al Husseiny18-Jan-04 15:08 
GeneralRe: Testing Distributed Applications Pin
Heath Stewart19-Jan-04 3:02
protectorHeath Stewart19-Jan-04 3:02 
GeneralRe: Testing Distributed Applications Pin
Mohamad Al Husseiny19-Jan-04 20:09
Mohamad Al Husseiny19-Jan-04 20:09 
Generalproblem in reading from DB Pin
hadi20sa17-Jan-04 17:50
hadi20sa17-Jan-04 17:50 
GeneralRe: problem in reading from DB Pin
Rocky Moore17-Jan-04 18:44
Rocky Moore17-Jan-04 18:44 
QuestionHow do you make a .net component run as an embedded resource? Pin
Arg...darn anynomous mode lol17-Jan-04 15:36
sussArg...darn anynomous mode lol17-Jan-04 15:36 
AnswerRe: How do you make a .net component run as an embedded resource? Pin
Colin Angus Mackay17-Jan-04 15:42
Colin Angus Mackay17-Jan-04 15:42 
QuestionHow do you make a .net component run as an embedded resource? Pin
Anonymous17-Jan-04 15:34
Anonymous17-Jan-04 15:34 
AnswerRe: How do you make a .net component run as an embedded resource? Pin
Arjan Einbu18-Jan-04 4:19
Arjan Einbu18-Jan-04 4:19 
AnswerRe: How do you make a .net component run as an embedded resource? Pin
Heath Stewart18-Jan-04 11:15
protectorHeath Stewart18-Jan-04 11:15 
First of all, what's wrong with just shipping an extra DLL? So long as you don't use the registry and rely instead on .config files (which is what you're supposed to do), you don't have to worry about elaborate installations, hence the "xcopy" deployment term, describing .NET's touchless deployment capabilities.

Second, don't embed it as a resource. If you mean VB.NET (instead of VB), there is a way to do it and handle AppDomain.AssemblyResolve but this is a HUGE waste of time and just isn't proper.

You can also compile two modules compiled from different source languages like C# and VB.NET and merge them into a single assembly. Compile one or the other using the target "module". I would recommend that you do this for the VB.NET project. Then, when you compile the other app into an assembly, you use /addmodule to reference the other module and link it into the assembly:
// Compile the VB.NET project to a module
vbc.exe /t:module /out:Plugin.dll *.vb 
// Compile the C# project to an assembly and link the previous module
csc.exe /t:exe /addmodule:Plugin.dll /out:App.exe *.cs
See the compiler documentation or type "csc.exe /?" or "vbc.exe /?" to see more information.

Seriously, though, you'd gain a lot more flexibility by having your exe and dll separate, especially if you want to include more plugins through a .config file. There are several articles here on CP about plug-in architectures. Try a search[^] for examples.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.