we have legacy projects which were running under .net3.5 version framework.
Created another solution and added web api project(Running under 4.6.1 .net framework+mvc5) which will access legacy project dlls or libraries (running under .net 3.5).
I have added 9 dll references(running under .net 3.5) to web api project(Running under 4.6.1 .net framework
+mvc).
While building and rebuilding web apiproject,
it got succeeded in both the cases.
While building entire solution, it got succeeded.
While rebuilding the entire solutionit
is giving errors, one dll not building properly out of 9 dlls. Every time getting different number of errors related to that project dll.
In .CS files it is not showing any error realted to dll.
But in error list it is showing below error(one sample error message)
Severity
Code
Description
Project
File
Line
Suppression State
Error
CS0234
The type or namespace name 'Entities' does not exist in the namespace 'AdminTools.Common' (are you missing an assembly reference?)
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
If you see this error after moving code from one development machine to another, make sure that the project on the new machine has the correct references, and that the versions of the assemblies are the same as on the old machine.
You can also use the Object Browser to inspect an assembly and verify whether it contains the types that you expect it to contain.
Regards,
Angie
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
None
0 Points
5 Posts
.net Projects running under Different version in same solution
Feb 09, 2018 05:09 PM|durgaprasad.kinthada|LINK
Hi Team
we have legacy projects which were running under .net3.5 version framework.
Created another solution and added web api project(Running under 4.6.1 .net framework+mvc5) which will access legacy project dlls or libraries (running under .net 3.5).
I have added 9 dll references(running under .net 3.5) to web api project(Running under 4.6.1 .net framework
+mvc).
While building and rebuilding web api project, it got succeeded in both the cases.
While building entire solution, it got succeeded.
While rebuilding the entire solution it is giving errors, one dll not building properly out of 9 dlls. Every time getting different number of errors related to that project dll.
In .CS files it is not showing any error realted to dll.
But in error list it is showing below error(one sample error message)
Severity
Code
Description
Project
File
Line
Suppression State
Error
CS0234
The type or namespace name 'Entities' does not exist in the namespace 'AdminTools.Common' (are you missing an assembly reference?)
GenericToolsMvcWeb
C:\dev\AdminTools\AdminTools\Src\GenericToolsWebApi\Source\UdwBaseWebServiceWrapper.cs
6
N/A
Contributor
2990 Points
1210 Posts
Re: .net Projects running under Different version in same solution
Feb 13, 2018 07:09 AM|Deepak Panchal|LINK
Hi durgaprasad....,
Did you try to store all the DLL in one separate folder and then try to add reference to it?
If you did not try that then you can try to do the same and inform us about your testing result.
If issue persist , We will try to provide you further suggestions to solve the issue.
Reference:
Visual Studio Multi-Targeting Overview
Regards
Deepak
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
None
0 Points
5 Posts
Re: .net Projects running under Different version in same solution
Feb 14, 2018 04:59 PM|durgaprasad.kinthada|LINK
Hi Deepak,
Thank you for your reply, getting same issue.
Can you please provide alternate solution for this issue.
Thanks.
All-Star
32817 Points
3815 Posts
Re: .net Projects running under Different version in same solution
Mar 01, 2018 08:10 AM|Angie xu - MSFT|LINK
Hi,
Possible causes for this error include the following:
An assembly that contains the definition of a type was not referenced in the compilation; use /reference (Import Metadata) to specify the assembly.
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/reference-compiler-option
You passed a variable name to the typeof operator.
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/typeof
You tried to reference an assembly that is not part of your target .NET Framework profile.
For more information, see Troubleshooting .NET Framework Targeting Errors.
https://docs.microsoft.com/en-us/visualstudio/msbuild/troubleshooting-dotnet-framework-targeting-errors
If you see this error after moving code from one development machine to another, make sure that the project on the new machine has the correct references, and that the versions of the assemblies are the same as on the old machine.
You can also use the Object Browser to inspect an assembly and verify whether it contains the types that you expect it to contain.
Regards,
Angie
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.