form designer fails to find a class (Please make sure that the assembly that contains this type is referenced) RRS feed

  • Question

  • Hi,

    I had that class A in that Namespace B.

    I could open the form designer.

    Form designer generated something like:

    this.creditItemBindingSource.DataSource = typeof(B.A);

    I then moved A to another namespace C

    Changed the generated code to :

    this.creditItemBindingSource.DataSource = typeof(C.A); // no error reported on that line in the editor

    Double clicking the form, Designer says : Could not find type 'C.A'. Please make sure that the assemble that contains this type is referenced.

    Again, looking at the code (myclass.Designer.cs) does not show any error on that line.




    Microsoft Visual Studio Enterprise 2017  (2)

    Version 15.5.3
    Microsoft .NET Framework
    Version 4.7.02053

    Installed Version: Enterprise

    Visual Basic 2017   00369-60000-00001-AA219
    Microsoft Visual Basic 2017

    Visual C# 2017   00369-60000-00001-AA219
    Microsoft Visual C# 2017

    Visual F# 4.1   00369-60000-00001-AA219
    Microsoft Visual F# 4.1

    Application Insights Tools for Visual Studio Package   8.10.01106.1
    Application Insights Tools for Visual Studio

    ASP.NET and Web Tools 2017   15.0.31127.0
    ASP.NET and Web Tools 2017

    ASP.NET Core Razor Language Services   1.0
    Provides languages services for ASP.NET Core Razor.

    ASP.NET Web Frameworks and Tools 2017   5.2.51007.0
    For additional information, visit

    Azure App Service Tools v3.0.0   15.0.31106.0
    Azure App Service Tools v3.0.0

    Common Azure Tools   1.10
    Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

    JavaScript Language Service   2.0
    JavaScript Language Service

    JavaScript Project System   2.0
    JavaScript Project System

    JavaScript UWP Project System   2.0
    JavaScript UWP Project System

    Liquid Technologies XSD Editor and Web Service Tools   15.0
    Graphical XML Schema Editor for XSD 1.0 and XSD 1.1, Graphical WSDL Editor, Web Service Test Client and XPath Tools.

    Microsoft Azure Tools   2.9
    Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.51120.3

    Microsoft Continuous Delivery Tools for Visual Studio   0.3
    Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.

    Microsoft JVM Debugger   1.0
    Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

    Microsoft MI-Based Debugger   1.0
    Provides support for connecting Visual Studio to MI compatible debuggers

    Microsoft Visual Studio Tools for Containers   1.1
    Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

    Microsoft Visual Studio VC Package   1.0
    Microsoft Visual Studio VC Package

    NuGet Package Manager   4.5.0
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit

    SQL Server Data Tools   15.1.61710.120
    Microsoft SQL Server Data Tools

    TypeScript Tools   15.5.11025.1
    TypeScript Tools for Microsoft Visual Studio

    Visual Studio Code Debug Adapter Host Package   1.0
    Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

    Visual Studio Tools for Universal Windows Apps   15.0.27130.2020
    The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

    H E L P ! ! ! ! ! 

    Wednesday, April 4, 2018 9:59 AM