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

  • SEARCH
  • Home
  • 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 5839655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:36:52+00:00 2026-05-22T11:36:52+00:00

I am using Visual Studio 2008, .NET 3.5 SP1, and have a test application

  • 0

I am using Visual Studio 2008, .NET 3.5 SP1, and have a test application with the following modules:

  1. a C++ DLL
  2. a C++/CLI DLL that uses #1
  3. a C# WPF application that uses #2

When I try to use classes from #2 as resources in the WPF XAML, the designer won’t let me:

<Window x:Class="WpfApplication1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:lib1="clr-namespace:ClassLibrary1;assembly=ClassLibrary1" <- ERROR 

The error is: “Assembly ‘ClassLibrary1’ was not found. Verify that you are not missing an assembly reference. Also, verify that your project and all referenced assemblies have been built.”

But when I use a class from the C++/CLI DLL in the code-behind of the application main window, everything works fine. Class1 is created, and in its constructor it calls into the C++ DLL, no problem.

using ClassLibrary1;

...

public partial class Window1 : Window
{
    public Window1()
    {
        InitializeComponent();

        //use in code-behind
        Class1 tmp = new Class1();
        tmp.FirstName = "foo";
        Title = tmp.FirstName;
    }
}

If I modify the C++/CLI assembly, remove its call into the C++ DLL and rebuild everything, the designer stops complaining and loads the C++/CLI assembly without complaint.

I suspect this problem has something to do with where the WPF designer looks for dynamic libraries.

  • 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-22T11:36:53+00:00Added an answer on May 22, 2026 at 11:36 am

    Because the Visual Studio designer copies your assemblies to a temporary location, but doesn’t copy your unmanaged dependencies, you can run into this problem.

    The simplest solution, although not ideal, is to add a folder that contains your unmanaged dependencies to the PATH environment variable, and then start DevEnv.exe with that PATH.

    You can do this either by:

    • Adding the folder to the System environment variables using Computer -> Properties
    • Using a batch file that sets the path and then starts DevEnv

    The problem with this solution is that as the unmanaged dependencies are rebuilt Visual Studio tends to “hang onto” them or not use the new ones and so you end up needing to exit and restart Visual Studio after using the designer to properly totally rebuild everything and this can be a bit of a pain.

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

Sidebar

Related Questions

Using Visual Studio 2008, c#, .net 2.0. I have a Windows Forms client application
I am using visual studio 2008, asp.net.vb I have various functions; 1 that calculates
I'm developing an ASP.NET application with C# and Visual Studio 2008 SP1. I'm using
Now that I have built a database. Visual Studio 2008 SP1’s ADO.NET Entity Framework
I'm developing an ASP.NET application with C# and Visual Studio 2008 SP1. I'm using
I'm using Visual Studio 2008 SP1 on .NET 3.5 SP1 on Vista Any time
We have an ASP.Net MVC 1.0 solution developed using Visual Studio 2008 and .net
I am using visual studio 2008 coding asp.net.vb I have 20 images on my
I'm developing an application for Windows Mobile Devices using Visual Studio .NET 2008 whose
I am using Visual Studio 2008 SP1 with .NET Framework sp1. I am not

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.