*referenced dll is not seen when trying to use a using statement from/in another project

iqworks Information Quality Works 236 Reputation points
2024-04-28T01:10:04.0533333+00:00

Hi, I have a project called MBSAnalysisMVCWebApp which is a web app.

I reference MBSAnalysisMVCWebApp from my main MVC project Mbsa.

 

Both have a target framework of 4.7.2. and a binding direct  

<dependentAssembly>

        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />

        <bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />

      </dependentAssembly> 

But when I try to code a “Using MBSAnalysisMVCWebApp;” statement in an Mbsa class, it says:User's image

The MBSAnalysisMVCWebApp.dll is in the Mbsa reference

Here you can see the project belongs to Mbsa.

User's image

Here is the Mbsa reference to MBSAnalysisMVCWebApp.dll in Mbsa.User's image

This is the error message when I try to build.

|Severity|Code|Description|Project|File|Line|Suppression
State| | -------- | -------- | -------- | -------- | -------- | -------- | -------- | |Severity|Code|Description|Project|File|Line|Suppression State| |Error|CS0246|The type or namespace name 'MBSAnalysisMVCWebApp' could not be found (are you missing a using directive or an assembly reference?)|Mbsa|D:\MBSSys\Mbsa\Mbsa 2021\Controllers\MbsaMenuMainController.cs|16|Active|

 Not sure why Mbsa cannot see the referenced MBSAnalysisMVCWebApp.dll.

I have looked through many forum posts from different sources, don’t see much that helps me. 

I am still looking through forum posts and even yout ube videos for a clue. 

But, in the mean time thanks for any suggestions or advice.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,647 questions
{count} votes