VS 2010 designer error 'Could not find type XYZ' in Windows7. Works fine in XP

后端 未结 9 1314
遇见更好的自我
遇见更好的自我 2021-01-04 00:15

I\'m stuck on a problem in VS 2010 C# .NET. I\'ve had a project on Windows XP that includes forms, classes and a handful of my own custom components. These components are si

相关标签:
9条回答
  • 2021-01-04 00:28

    Ive run into this before, be sure that in your Form.Designer.cs code file, that each call to your custom controls are done so as absolute calls. For example:

    Namespace.CustomControl control;
    

    Rather than

    CustomControl control;
    
    0 讨论(0)
  • 2021-01-04 00:31

    I faced the same error, can't able to Build my application.

    So searched here, Says to change the solution platform X64 or X32. But in my case the Solution platform only shows Any CPU and configuration manager option only

    But i simply change the solution configuration.

    Debug => Release

    then

    Release => Debug

    Finally clean and rebuilt the solution. Its works for me!!:)

    0 讨论(0)
  • 2021-01-04 00:39

    If your project is targeted at 64 bit, you need to build for 32 bit and choose the 32-bit solution while doing your GUI editing. This is because studio is 32-bit so cannot load 64-bit controls.

    0 讨论(0)
  • 2021-01-04 00:43

    Set the default built to x86 and that should fix it.

    0 讨论(0)
  • 2021-01-04 00:43

    For anyone who with similar issue(s). I just came across this in VS 2013 (VB side) on an x86 PC. As mentioned above, I toggled from 'anyCPU' to 'x86' and the form designer opened right up. Simple, but probably wouldn't have tried it without the above post(s). For what it's worth, I toggled back to 'anyCPU', and as yet have had no recurrences...

    0 讨论(0)
  • 2021-01-04 00:45

    Have you tried disabling UAC completely (running IDE as Administrator + disabling UAC just in case). Also - always use Fusion Log for tracing assembly loads! See http://msdn.microsoft.com/en-us/library/e74a18c4(v=vs.71).aspx for how to set it up

    0 讨论(0)
提交回复
热议问题