473,387 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to compile a single file

LP
Hi,
I have a site which runs on .Net technology. The site is
already deployed and running. I need to change 1 file for
some small enhancement. Please tell me, how can I compile
that 1 file and merge it to the original DLL (the one
deployed on the live server) so as to upgrade it. I dont
want to recompile the whole project for the 1 file

Regards,.
LP
Jul 19 '05 #1
2 2882
You can build the one library by selecting it in the
Solution Explorer window and then either pressing Ctrl-F7
or select it off the Build Menu. It should show as a
separate menu item (i.e. Build MyLib as opposed to Build
Solution). That's the closest I've found to a limited
build.
-----Original Message-----
Hi,
I have a site which runs on .Net technology. The site is
already deployed and running. I need to change 1 file for
some small enhancement. Please tell me, how can I compile
that 1 file and merge it to the original DLL (the one
deployed on the live server) so as to upgrade it. I dont
want to recompile the whole project for the 1 file

Regards,.
LP
.

Jul 19 '05 #2
C# and VB.NET have no concept of 'linking' object files, so if a single
source file changes in your project then all the source files for the
assembly have to be rebuilt. I guess Microsoft took this approach to make
building an assembly a simpler procedure than the two step compile and link
that occurs with C++.

Managed C++ does have the concept of linking, so you compile C++ source
files to .obj files (with cl.exe) and then link them (with link.exe) to get
the assembly. If one source file changes and the .obj's for the other source
files exist then building the assembly only involves compiling the single
source file and linking together the .obj's.

Neither .NET, nor Win32, have a concept of 'merge [a compiled source file]
to the original DLL, to upgrade it'. The reason is that when the assembly is
built the compiler creates a hash value of the module and any modules it
uses and these are place in the assembly manifest. When the assembly is
loaded these hashes are created again and compared to the stored values to
see if the assembly has been tampered with.

The actual process is not quite that simple, because if you have a multi
module file modules are only loaded when the types in them are specifically
requested. In fact, you can use this as a way to get round your problem. If
you put the code for the types that are likely to change into a .NET module,
you can recompile this at a later stage and copy it into your app directory
to replace the old version. However, this will only work for assemblies that
have not been signed. Once you sign an assembly (provide a
[AssemblyKeyFile]) the hash for the module is checked when it is loaded, and
so if you replace it with another version the hash will be different and a
FileLoadException will be thrown.

Richard
--
my email ev******@zicf.bet is encrypted with ROT13 (www.rot13.org)

"LP" <lp******@hotmail.com> wrote in message
news:0a****************************@phx.gbl...
Hi,
I have a site which runs on .Net technology. The site is
already deployed and running. I need to change 1 file for
some small enhancement. Please tell me, how can I compile
that 1 file and merge it to the original DLL (the one
deployed on the live server) so as to upgrade it. I dont
want to recompile the whole project for the 1 file

Regards,.
LP

Jul 21 '05 #3

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

Similar topics

7
by: John Dolinka | last post by:
I have a project of several files with #defines to setup a conditional compile. I would like to put these #defines in a single file and change the conditional compile from this one file with the...
3
by: LP | last post by:
Hi, I have a site which runs on .Net technology. The site is already deployed and running. I need to change 1 file for some small enhancement. Please tell me, how can I compile that 1 file and...
4
by: andrewcw | last post by:
I am moving some code forward from .NET 1.1. I was able to load the XSL file and perform the transform. The MSDN documentation looks like it should be easy. But I get a compile error. Ideas ?...
4
by: ygao | last post by:
>>compile('U"ÖĞ"','c:/test','single') <code object ? at 00F06B60, file "c:/test", line 1> <code object ? at 00F06BA0, file "c:/test", line 1> u'\xd6\xd0' u'\u4e2d' why is the result different?...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.