Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - compiling multiple projects into single exe

Reply
 
Old 12-04-2008   #1 (permalink)
Patogenx


 
 

compiling multiple projects into single exe

i am using visual studio 2005. i have a project and i want to use
HtmlAgilityPack. i use it in my solution by project reference however
its compiled into a dll but i want to compile it as a single exe.
so i try to combine projects by applying the following comment however
cannot be successful. the .netmodule file of the second file is not
linked into the .exe file but its just referenced as an external file,
so the exe does not work when the .netmodule file deleted.

do you have any suggestions to combine projects without using ILMerge.
i just want to know if its possible to do this without using ILMerge
because i want to understand compiling and linking tools better.
it seems to be possible with AL or within the visual studio by
MSBuild.
but how?
thanks in advance
~~~~~~~~~~~~
http://www.hanselman.com/blog/Mixing...ndMSBuild.aspx
Commetn by Jay R. Wren
This is a cute hack, but with the CSC and VBC both supporting the /
target:module and /addmodule options, you could actually do this
without ILMerge just by using a shell script or make file.

Visual Studio doesn't support the "netmodule" type, but MSBuild does.

Add the VB project to your solution. Unload the project and edit the
project file.

Change OutputType to module : <OutputType>module</OutputType>

Instead of adding a reference to the desired project, we add a module.
Sadly, again VStudio fails here, but MSBUILD works just fine. Unload
the project and edit the project file. Add an item group with
AddModules include directives.
<ItemGroup>
<AddModules Include="..\VbXml\bin\Debug\VbXml.netmodule" />
</ItemGroup>

This will tell msbuild to tell CSC to use /addmodule directives, just
like the Reference Item Group which Studio does manage.
~~~~~~~~~~~~

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Access multiple VPC on single machine Virtual PC
Multiple accounts, single inbox? Live Mail
View on multiple partitions on a single drive General Discussion
Multiple files and folders, single user Vista account administration
Multiple emails per single contact Vista mail


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46