Ticket T649089
Visible to All Users

Message 'Could not find type WaitForm1. Please make sure that the assembly of this type is referenced.....'

created 7 years ago

Hi,

I keep having the following message when opening form where WaitForm is in use.

Could not find type 'xxxxxx.WaitForm1'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU

The strange is when click 'Ignore and Continue' everything looks fine, can build and run without issuel
Then … close the form designer and open again, error appears:

Value does not fall within the expected range.

Call stack:
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.VisualStudio.NativeMethods.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure)
at Microsoft.VisualStudio.Shell.Design.Serialization.DesignerDocDataService.GetFileDocData(String fileName, FileAccess access, String createTemplate, Boolean addToHostList, Boolean nestedItem)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomProvider.OnParseBegin(TextReader reader)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.Parse(TextReader codeStream)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.MergedCodeDomParser.System.CodeDom.Compiler.ICodeParser.Parse(TextReader stream)
at System.CodeDom.Compiler.CodeDomProvider.Parse(TextReader codeStream)
at Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom.CodeDomDocDataAdapter.get_CompileUnit()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)

Closed solution and opened again - everything is back to normal.

It is not about the version, I have it for a longer time and it is very intermittent.
Anyone else had similar issue?

Thanks,
Mike

Answers approved by DevExpress Support

created 7 years ago (modified 7 years ago)

Hi,

As you know, Visual Studio is a 32-bit application and to visualize a form, it has to load all referenced assemblies at design time. Most likely, this issue occurs because the Platform target option is set to x64, that is why Visual studio cannot load the compiled 64-bit assembly in its 32-bit environment. This behavior is reproducible with any .NET controls. I suggest reviewing the Visual studio designer in x64 doesn't work StackOverflow topic for additional information in this regard.

To overcome this shortcoming, temporarily set the Platform target option to Any CPU to finish configuring controls at design time or configure SplashScreenManager at runtime (in code). Please let me know your results once you have had an opportunity to test these approaches.

    Show previous comments (6)
    DevExpress Support Team 6 years ago

      Hi,

      Yes, the Visual studio cannot load a compiled 64-bit assembly in its 32-bit environment. This point is also reflected in Svetlana's solution post.
      Please feel free to reactivate this ticket in case of other questions regarding this scenario.

        This is an old thread, but I just had a similar issue. My solution was to package the custom control in a separate assembly and add it to the solution. Then, I set my build config to compile my main application/assemblies as x64 and the assembly with the custom control as Any CPU.

        DevExpress Support Team 3 years ago

          Hi Dean,

          Thank you for sharing your solution with us.
          Do not hesitate to contact us if you have any other questions or concerns. We'll be happy to help.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.