Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7687023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:36:33+00:00 2026-05-31T19:36:33+00:00

I have three projects 1)unmanaged c++ containing full business logic 2)C++/CLI ( Project name

  • 0

I have three projects

1)unmanaged c++ containing full business logic

2)C++/CLI (Project name managed)

3)C# GUI

I have added the library file of unmanaged c++ in C++/CLI and then dll of C++/CLI in C# project.This this all is working fine and execution is trouble-less.

Now i want to do unit testing of C# function that does call the C++/CLI wrapper and then get the results back.I created a unit test using Visual Studio 2010.I added the dll of C++/CLI in my test project.Now when i am trying to execute the test it throws the exception managed.dll not found

Here is the code

   [TestMethod()]
   public void getstateTest()
   {
    bool expected=true;
    bool actual=false;
    try
     {
        GUI.test target = new test();
        expected    = true; // TODO: Initialize to an appropriate value
        actual      = target.getstate();
     }
     catch (FileNotFoundException exception)
     {
        MessageBox.Show("Missing file is : " + exception.FileName);
     }
     Assert.AreEqual(expected, actual);
    }



    The getstate function is

namespace GUI
{
public class test
{
    public bool getstate()
    {
        bool chk = false;
        bool result;
        String a = "some path";
        String b = "some path"
        String c = "some path"
        managed  objct;
        objct = new  managed();
        objct.Initialize(a, b, c, chk);
        objct.Execute();//calls the C++/CLI execute which calls unmanaged C++
        result = objct.Executionresult();//gets a bool result
        return result;
    }
}

}

Same thing works fine when i run the application but on running the test project it says the dll is missing

Sorry if i made it confusing.Please ask if you need more information.Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:36:34+00:00Added an answer on May 31, 2026 at 7:36 pm

    Have you looked at the test project output folder ? Maybe the managed.dll isn’t copied to the output.

    Update:

    Could you please post fusion log from the exception ? This should give some ideas why the file is not found.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following three projects in my solution: 1. C# library 2. C++/CLI
Suppose I have three projects in my sln. (1) xyz.a{Class Lib}{no reference added} (2)
I am creating solution and inside I have three projects: A WCF Service Library
Using MySQL, I have three tables: projects : ID name 1 birthday party 2
I have a project which has shared functionality between three other projects and have
I have several projects open in an Eclipse workspace. Like so: com.harbl.project.one com.harbl.project.two com.harbl.project.three
I have several projects, some using managed code and some using only unmanaged. All
I have a Visual Studio 2010 solution that contains C# (managed), C++/CLI (unmanaged) and
I have three projects: TestNHibernateMappings - A console project WebApplicationPbiBoard - An Asp.Net MVC
I have a project which uses C++/CLI to implement a GUI and some background

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.