Last post Mar 01, 2018 08:10 AM by Angie xu - MSFT
Feb 09, 2018 05:09 PM|durgaprasad.kinthada|LINK
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
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)
The type or namespace name 'Entities' does not exist in the namespace 'AdminTools.Common' (are you missing an assembly reference?)
Feb 13, 2018 07:09 AM|Deepak Panchal|LINK
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.
Visual Studio Multi-Targeting Overview
Feb 14, 2018 04:59 PM|durgaprasad.kinthada|LINK
Thank you for your reply, getting same issue.
Can you please provide alternate solution for this issue.
Mar 01, 2018 08:10 AM|Angie xu - MSFT|LINK
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.
You passed a variable name to the typeof operator.
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.
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.