Skip to main content
GameDev.net gamedev.net
🔒 Locked

[.net] Compiling C# Libs & Exe

Started by webjeff Jan 17, 2008 at 9:48 AM 3 replies 1.1k views
Original Post
webjeff
webjeff
Guys: I have noticed an annoying feature of Visual Studio. I have about 8 libraries and 1 application. Whenever I build, it has to go through each project (lib & app) and build them.... it's not compiling anything, because nothing has changed. It appears to be relinking though (can't tell really what its doing). It just takes an obscene amount of time to go through that process. Then I hit f5 to run (I have already built remember). It then again has to go through and does a build on each project, then runs. Any way around this? (Besides just clicking on my app and doing debug/run). I want to hit f5 as that is what I'm use to from C++. Thanks Jeff.
benryves
benryves
Hitting F5 should rebuild and run automatically, there is no need to explicitly rebuild first.

When you added the libraries as references to the main runnable application, I assume you picked them from the "Projects" tab rather than browsing for their individual .dll files? If not, I'd try that instead.
[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]
Talonius
Talonius
If you don't want it to link the libraries you're going to have to remove them from the solution. If the application is dependent on the libraries the compiler is going to verify that nothing has changed - the C++ compiler would do the same.
..what we do will echo throughout eternity..
webjeff
webjeff
benryves:

You are correct, however, in C++ if nothing has changed, it says completed and moves on (takes almost no time).

In C#, it sits on a library and says "Build Started"... then "Build Progress" for each library. One or two libs, its not bad, but 8 or 9 and then time adds up quickly. In C++, it takes a fraction of time to go through each lib and say 1 Up to Date, and goes on.

Talonius:

All these libs are linked to the Executable, I don't mind it rebuilding if something has changed, but if nothing has changed it should see it and skip it. It's doing something

Jeff
Marineio
Marineio
Quote:
Original post by webjeff
benryves:

You are correct, however, in C++ if nothing has changed, it says completed and moves on (takes almost no time).

In C#, it sits on a library and says "Build Started"... then "Build Progress" for each library. One or two libs, its not bad, but 8 or 9 and then time adds up quickly. In C++, it takes a fraction of time to go through each lib and say 1 Up to Date, and goes on.

Talonius:

All these libs are linked to the Executable, I don't mind it rebuilding if something has changed, but if nothing has changed it should see it and skip it. It's doing something

Jeff


No, they're not linked per-se.

In C++, each file is compiled on its own. However, in C# and VB.NET the compiler is invoked with all files togther, and produces 1 assembly, without individual object files. This is where the two languages and compilers differ.


Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.