I have 2 projects in a solution, 1 a dll, the other an exe. Both were using .net version 4.0 however no 4.0 specific libraries were used so it should be possible for me to safely change them to 3.5
I did this under both project properties, I built the dll fine. Now when i try to build the exe it cannot find the dll's namespace. I have readded the reference, but it still cant see it. When I reverted the .net version it did say I might have to modify the project files before it builds. I have tried to search for a solution via google but the key words I am using are too commonly used. Can anyone advise?
Many thanks, Chris
Edit: Tried the following already..
Rather than referencing the output DLL, have you tried setting it as a project reference instead.
Also, have you done a clean build of the solution incase any .Net 4.0 files were lingering? You can manually clean the project by deleting the bin and obj folders.
Have you tried removing the projects from the solution, creating a new .net 3.5 project and compiling that. Then add in the ddl project (Add -> existing project) and compile, then add in exe project without reference, compile then add in the references.
Odd question, but have you check the name spaces still. Can you call in your project the namesapce, i.e. using mydllproject.model.myengine
I would open your project files as XML. To do this, close the soltion and reopen the projects only by clicking the down arrow on the File/Open button and selecting Open With... XML (Text) Editor. Check to make sure each project has a ToolsVersion="4.0" in the header. Check the RootNamespace and TargetFrameworksVersion elements to see if they have the values that you expect. At the bottom of the file, check the ProjectReference element within the ItemGroup. Make sure the GUID in the project reference matches the GUID that is defined in your solution file.
Finally, make sure you clean your project before you rebuild it. If you're using source control, check out the project into a new, empty sandbox.
Good Luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With