0

I have two .net projects in my solution.First project is .net 2.0 windows forms project and the second project is .net 4.5 windows forms project.I'm opening a windows form of my .net 4.5 project from .net 2.0 project. for code example:

    ReportManager.Form1 f1 = new ReportManager.Form1();
    f1.Show();

it gives following run time error (ReportManager is my .net 4.5 project name)

Could not load file or assembly 'ReportManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. any advice is welcome.

1 Answers1

1

From the comment "Did try to convert and build my .NET 2.0 project and this error came "Interop type 'LOGkeeper.ManagerClass' cannot be embedded. Use the applicable interface instead."

Perhaps this helps in migrating the project up from .NET 2.0?

Interop type cannot be embedded

Julia Hayward
  • 1,987
  • 1
  • 14
  • 16
  • Thanks, It worked Julia Hayward. I just convert my .NET 2.0 project to .NET 4.5 and on the reference section right clicked on my .NET 2.0 SDK library and select properties then there was a key named "Embed Interop Types". I just did set it to "false" and now every thing works fine. – Sajith Dushmantha Samarathunga Jun 20 '19 at 05:09