Namespace cannot be found after changing target structure from version 4.0 to version 3.5

I have 2 projects in solution, 1 dll, the other is exe. Both used .net version 4.0, however 4.0 specific libraries were not used, so it would be safe for me to change them to 3.5

I did this with both properties of the project, I built dll fine. Now when I try to build exe, it cannot find the dll namespace. I read the link, but it is still not visible. When I returned the .net version, he said that I might have to modify the project files before building it. I tried to find a solution through Google, but the keywords that I use are too often used. Can anyone advise?

Thanks a lot Chris

Edit: Tried the following already.

  • Help DLL specifically, while providing a non 4.0 copy
  • Delete bin and obj folders
  • Restart VS
+5
source share
5 answers

Instead of referencing the output DLL, did you try installing it as a reference to the project.

Also, did you make a clean build of the solution if any .Net 4.0 files were delayed? You can manually clean the project by deleting the bin and obj folders.

You tried to remove projects from the solution by creating a new .net 3.5 project and compiling it. Then add the ddl project (Add -> existing project) and compile, then add the exe project without a link, then compile, then add the links.

An odd question, but you are still checking namespaces. Can you call a name in your project, i.e.using mydllproject.model.myengine

+2

XML. , "/" " ... XML ()". , ToolsVersion = "4.0" . RootNamespace TargetFrameworksVersion, , . ProjectReference ItemGroup. , GUID GUID, .

, , , . , .

!

+1

-Put dll exe 3.5
- DLL
- DLL
-

0

DLL, , , "Engine.dll". .NET Refractor, . v4.0, .NET.

0

. : " " Windows .

.NET4.0 Windows .

, , , :

  • .NET 4.0 . .

  • ​​ .

  • ​​ windows forms

  • "Build Action" "Compile"

  • Right-click the class library project and select Rebuild.

  • Then, when I enter my window projects, I see the namespace when I use ' using namespace_name .

Note. You may not need to create a new project, as I did in the first few steps. But changing the action of the assembly definitely did the trick.

Hope this helps.

0
source

All Articles