How to make project references in solution work reliably

The solution builder works fine for out main product after much trial and error.

however a smaller tools related project uses a lot of the same libraries yet builds one incorrectly.
It comes down to the project references in that project.

If I build the csproj file separately it looks up and builds the four other projects before building that projects contents.

When I build the solution that contains the csproj in question.

It creates a metaproj for the solution which seems to make sense.
It ALSO creates a metaproj for that csproj which has 2 less project references and thus fails when it gets to compile the internals of that project.

If someone can explain what is going on so I can prevent of control the generation of the second metaproj, I would be greatly appreciative.

3 comments
Comment actions Permalink

Hi,

metaproj file is created by MSBuild. Probably the problem is with MSBuild. Please try the solution suggested in this blog post.

0
Comment actions Permalink

Hi thanks for your response.

I was managing the Dependencies properly.
The final trick was to simply create another Dev solution for building.

We have Mixed (c++ and c#) projects in our solution.

To build all your C# components x64 you have to create a configuration called x64 that copies the data from AnyCPU.
The build system and msbuild is fine with this but the dev environment likes that AnyCPU heading for the C# projects.

So the answer was to create a copy of the solution so I could set all the targets in x64 to build.

TLDR;
I had the project references right but the BUILD checkbox was not checked for certain latforms so they were skipped.
The answer I found was to create a copy of the solution so I could modify the target plaforms and build checkboxes without affecting the developers.
The problem was all msbuild and MS not being clear enough why it was choosing to skip building a dependancy.

0
Comment actions Permalink

Thanks Christopher, and thanks for sharing your solution. Glad it's working!

0

Please sign in to leave a comment.