Here is the background, we have a solution file (a.sln) which contains 2 projects (service.csproj & client.csproj). There is another old solution file (b.sln) which contains 3 projects (service.csproj, client.csproj & test.csproj). We dont use this solution file and the test project too.
We use NANT script for compilation. Within NANT we use the <exec> task
which calls the "devenv.com" to compile the solution files. I was trying to make some changes to the build script (generating the proxy for the service on the fly during build), so for this I was
trying to compile the service.csproj file alone. I updated the NANT script as shown below:
<exec program="${visualstudio.install.dir}\devenv.com" commandline=""${base.dir}\Service.csproj" /rebuild ${config}" failonerror="true" />
But when the above line is executed it compiles (in the following order)
a. client.csproj
b. service.csproj
c. test.csproj
The service.csproj does not have any project references to the client and test project.
I broke my head to find what exactly is happening and how the client/test projects are getting compiled.
This is what I found, we have the following folder structure:
MyFolder ->
-> Service
service.csproj
b.sln
-> Client
client.csproj
-> Test
test.csproj
a.sln
Since b.sln was obsolete and not used it was in the MyFolder -> Service folder (same folder as the service.csproj file). (Developers are so bad with this in my new company that they dont delete unused files and just keep renaming it as _old.)
The devnenv.com was somehow taking the project files from the b.sln file and compiling them. I deleted the b.sln file and the script compiles the service.csproj without any issues.But when the service.csproj and b.sln are in the same folder visual studio (devenv.com) tries to compile all the 3 projects mentioned within the
solution file.
Anyone have any idea on what is happening?