Take the 2-minute tour ×

I'm having a problem with a VS2010 solution. I have two projects in the solution, one is the main program, while the other is a program used for editing data/setting up files for the second. In order to make my second project work, I need to be able to access the classes/enums/etc. inside the first.

I know with VS2010 you can add a project as a reference inside another project. I tried doing that, and it seemed to work. I can add the namespaces, and use the enums, but as soon as I try and compile the 2nd project, it's as though it looses the references, and it returns errors for all the classes/enums i used from the main project. If I delete the reference, and readd it, I can again use all the stuff in the first project, but again compiling destroys the references.

I've tried rebuilding the first project, tried changing the output type, etc. but to no avail. Does anyone have an idea what might be wrong?

For reference, this is on Windows 7 64, using Visual Studio 2010 Ultimate, and both are C# 4.0 projects. I'm using System.Data.SQLite/System.Data.SQLite.Linq, but removing them didnt make it work.

Thanks in advance

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Make sure when compiling (debug), your solution platform is set to "Any CPU"

share|improve this answer
add comment

Make sure they both are referencing the same .Net 4 Profile, one may be using the client profile
http://msdn.microsoft.com/en-us/library/cc656912.aspx .net Project Profiles

They should both be .NET 4 or both be .NET 4 Client Profile

share|improve this answer
add comment

Your Answer


