Hi!
More or often less systematicly I get an error message when I try to view my forms in the Designer. It seems to be related to form which inherits from a baseform which again inherits from Form.
It worked fine until 1 1/2 week ago. Then I should continue working on an old form in project. This form gave an error message instantly and suddenly ALL of my forms (inherited from my baseform) was unable to see in the Designer.
I have tried making new projects, solutions, forms. Seems to start good but at some point they all get the same redline errormessage. This is VERY frustrating and timeconsuming. The whole customerproject will suffer from this unexpected problem. I have found no ice-breaking info on the net. The thread with almost the same subject line (except for the word 'New') is the closest I've got. I have included some info based on the advises in that thread.
I appreciate any help!
Regards Brede
********************************************************************
Contents:
* Solution info
* Error info TestCFIL - Form1.cs
* Error info TestCFIL - FrmConfig.cs
* Error info MatexPPCClient - FrmConfig.cs
* Manifest of Microsoft.VisualStudio.Designer.Interfaces.dll
* VS2005 info
********************************************************************
******
Solution MatexPPC (a Smart Device solution)
-> project TestCFIL
-> project MatexPPCClient
-> project NeotericCFIL
in order of dependencies.
******
Error info TestCFIL - Form1.cs -> View Designer => Sometimes OK. Other times I get the following message:
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Hide
at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.Type.GetType(String typeName)
at OpenNETCF.Diagnostics.TraceInternal2.get_Listeners()
at OpenNETCF.Diagnostics.Trace2.get_Listeners()
at Neoteric.CFIL.InstrumentationManager..ctor() in C:\VSS_LOCAL2\MATIQ\MATEX\MatexPPC\NeotericCFIL\CFIL.cs:line 65
at Neoteric.CFIL.InstrumentationManager.InstrumentationManagerInstance..cctor() in C:\VSS_LOCAL2\MATIQ\MATEX\MatexPPC\NeotericCFIL\CFIL.cs:line 30
******
Error info TestCFIL - FrmConfig.cs -> View Designer => Sometimes OK. Other times I get the same message as for Form1.cs
This is basicly the same file as the one below with the exception that it is put in an other project and needs a reference back to the main project MatexPPCClient.
******
Error info MatexPPCClient - FrmConfig.cs -> View Designer => Always the following message:
The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: FrmConfig --- The base class 'MatexPPCClient.MatexForm' cannot be designed.
Hide
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)
******
Manifest of Microsoft.VisualStudio.Designer.Interfaces.dll
// Metadata version: v1.1.4322
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 1:0:5000:0
}
.assembly Microsoft.VisualStudio.Designer.Interfaces
{
.custom instance void [mscorlib]System.Reflection.AssemblyDelaySignAttribute::.ctor(bool) = ( 01 00 01 00 00 )
.custom instance void [mscorlib]System.Reflection.AssemblyDescriptionAttribute::.ctor(string) = ( 01 00 2E 4D 69 63 72 6F 73 6F 66 74 2E 56 69 73 // ...Microsoft.Vis
75 61 6C 53 74 75 64 69 6F 2E 44 65 73 69 67 6E // ualStudio.Design
65 72 2E 49 6E 74 65 72 66 61 63 65 73 2E 64 6C // er.Interfaces.dl
6C 00 00 ) // l..
.custom instance void [mscorlib]System.Reflection.AssemblyTitleAttribute::.ctor(string) = ( 01 00 2E 4D 69 63 72 6F 73 6F 66 74 2E 56 69 73 // ...Microsoft.Vis
75 61 6C 53 74 75 64 69 6F 2E 44 65 73 69 67 6E // ualStudio.Design
65 72 2E 49 6E 74 65 72 66 61 63 65 73 2E 64 6C // er.Interfaces.dl
6C 00 00 ) // l..
.custom instance void [mscorlib]System.Resources.SatelliteContractVersionAttribute::.ctor(string) = ( 01 00 0A 31 2E 30 2E 35 30 30 30 2E 30 00 00 ) // ...1.0.5000.0..
.custom instance void [mscorlib]System.Reflection.AssemblyProductAttribute::.ctor(string) = ( 01 00 1C 4D 69 63 72 6F 73 6F 66 74 20 28 52 29 // ...Microsoft (R)
20 2E 4E 45 54 20 46 72 61 6D 65 77 6F 72 6B 00 // .NET Framework.
00 )
.custom instance void [mscorlib]System.Reflection.AssemblyDefaultAliasAttribute::.ctor(string) = ( 01 00 2E 4D 69 63 72 6F 73 6F 66 74 2E 56 69 73 // ...Microsoft.Vis
75 61 6C 53 74 75 64 69 6F 2E 44 65 73 69 67 6E // ualStudio.Design
65 72 2E 49 6E 74 65 72 66 61 63 65 73 2E 64 6C // er.Interfaces.dl
6C 00 00 ) // l..
.custom instance void [mscorlib]System.Reflection.AssemblyInformationalVersionAttribute::.ctor(string) = ( 01 00 0C 31 2E 31 2E 34 33 32 32 2E 35 37 33 00 // ...1.1.4322.573.
00 )
.custom instance void [mscorlib]System.Reflection.AssemblyCopyrightAttribute::.ctor(string) = ( 01 00 43 43 6F 70 79 72 69 67 68 74 20 28 43 29 // ..CCopyright (C)
20 4D 69 63 72 6F 73 6F 66 74 20 43 6F 72 70 6F // Microsoft Corpo
72 61 74 69 6F 6E 20 31 39 39 38 2D 32 30 30 32 // ration 1998-2002
2E 20 41 6C 6C 20 72 69 67 68 74 73 20 72 65 73 // . All rights res
65 72 76 65 64 2E 00 00 ) // erved...
.custom instance void [mscorlib]System.Resources.NeutralResourcesLanguageAttribute::.ctor(string) = ( 01 00 05 65 6E 2D 55 53 00 00 ) // ...en-US..
.custom instance void [mscorlib]System.CLSCompliantAttribute::.ctor(bool) = ( 01 00 01 00 00 )
.custom instance void [mscorlib]System.Runtime.InteropServices.GuidAttribute::.ctor(string) = ( 01 00 24 37 34 39 34 36 38 33 36 2D 33 37 61 30 // ..$74946836-37a0
2D 31 31 64 32 2D 61 32 37 33 2D 30 30 63 30 34 // -11d2-a273-00c04
66 38 65 66 34 66 66 00 00 ) // f8ef4ff..
.custom instance void [mscorlib]System.Runtime.InteropServices.ImportedFromTypeLibAttribute::.ctor(string) = ( 01 00 11 56 53 4D 61 6E 61 67 65 64 44 65 73 69 // ...VSManagedDesi
67 6E 65 72 00 00 ) // gner..
.custom instance void [mscorlib]System.Reflection.AssemblyCompanyAttribute::.ctor(string) = ( 01 00 15 4D 69 63 72 6F 73 6F 66 74 20 43 6F 72 // ...Microsoft Cor
70 6F 72 61 74 69 6F 6E 00 00 ) // poration..
.custom instance void [mscorlib]System.Reflection.AssemblyKeyFileAttribute::.ctor(string) = ( 01 00 36 45 3A 5C 44 4E 41 5C 70 75 62 6C 69 63 // ..6E:\DNA\public
5C 74 6F 6F 6C 73 5C 63 6F 6D 6D 6F 6E 5C 73 65 // \tools\common\se
63 75 72 69 74 79 5C 46 69 6E 61 6C 50 75 62 6C // curity\FinalPubl
69 63 4B 65 79 2E 73 6E 6B 00 00 ) // icKey.snk..
.custom instance void [mscorlib]System.Runtime.InteropServices.ComVisibleAttribute::.ctor(bool) = ( 01 00 01 00 00 )
.custom instance void [mscorlib]System.Reflection.AssemblyTrademarkAttribute::.ctor(string) = ( 01 00 80 81 4D 69 63 72 6F 73 6F 66 74 20 61 6E // ....Microsoft an
64 20 57 69 6E 64 6F 77 73 20 61 72 65 20 65 69 // d Windows are ei
74 68 65 72 20 72 65 67 69 73 74 65 72 65 64 20 // ther registered
74 72 61 64 65 6D 61 72 6B 73 20 6F 72 20 74 72 // trademarks or tr
61 64 65 6D 61 72 6B 73 20 6F 66 20 4D 69 63 72 // ademarks of Micr
6F 73 6F 66 74 20 43 6F 72 70 6F 72 61 74 69 6F // osoft Corporatio
6E 20 69 6E 20 74 68 65 20 55 2E 53 2E 20 61 6E // n in the U.S. an
64 2F 6F 72 20 6F 74 68 65 72 20 63 6F 75 6E 74 // d/or other count
72 69 65 73 2E 00 00 ) // ries...
.custom instance void [mscorlib]System.Reflection.AssemblyConfigurationAttribute::.ctor(string) = ( 01 00 49 4D 69 63 72 6F 73 6F 66 74 20 2E 4E 45 // ..IMicrosoft .NE
54 20 46 72 61 6D 65 77 6F 72 6B 20 62 75 69 6C // T Framework buil
64 20 65 6E 76 69 72 6F 6E 65 6D 65 6E 74 20 69 // d environement i
73 20 52 65 74 61 69 6C 2E 20 53 61 66 65 53 79 // s Retail. SafeSy
6E 63 20 63 6F 75 6E 74 65 72 3D 30 00 00 ) // nc counter=0..
.publickey = (00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 // .$..............
00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 // .$..RSA1........
07 D1 FA 57 C4 AE D9 F0 A3 2E 84 AA 0F AE FD 0D // ...W............
E9 E8 FD 6A EC 8F 87 FB 03 76 6C 83 4C 99 92 1E // ...j.....vl.L...
B2 3B E7 9A D9 D5 DC C1 DD 9A D2 36 13 21 02 90 // .;.........6.!..
0B 72 3C F9 80 95 7F C4 E1 77 10 8F C6 07 77 4F // .r<......w....wO
29 E8 32 0E 92 EA 05 EC E4 E8 21 C0 A5 EF E8 F1 // ).2.......!.....
64 5C 4C 0C 93 C1 AB 99 28 5D 62 2C AA 65 2C 1D // d\L.....(]b,.e,.
FA D6 3D 74 5D 6F 2D E5 F1 7E 5E AF 0F C4 96 3D // ..=t]o-..~^....=
26 1C 8A 12 43 65 18 20 6D C0 93 34 4D 5A D2 93 ) // &...Ce. m..4MZ..
.hash algorithm 0x00008004
.ver 1:0:5000:0
}
.module VSManagedDesigner.dll
// MVID: {71DE76DC-100A-4DD3-A6CF-58201F44EF25}
.imagebase 0x79fa0000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000009 // ILONLY
// Image base: 0x011D0000
******
VS2005 info:
Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727
Installed Edition: Enterprise
Microsoft Visual Basic 2005 77642-113-3000004-41349
Microsoft Visual Basic 2005
Microsoft Visual C# 2005 77642-113-3000004-41349
Microsoft Visual C# 2005
Microsoft Visual C++ 2005 77642-113-3000004-41349
Microsoft Visual C++ 2005
Microsoft Visual J# 2005 77642-113-3000004-41349
Microsoft Visual J# 2005
Microsoft Visual Studio Tools for Office 77642-113-3000004-41349
Microsoft Visual Studio Tools for the Microsoft Office System
Microsoft Visual Web Developer 2005 77642-113-3000004-41349
Microsoft Visual Web Developer 2005
Visual Studio 2005 Team Edition for Developers 77642-113-3000004-41349
Microsoft Visual Studio 2005 Team Edition for Software Developers
Crystal Reports AAC60-G0CSA4B-V7000AY
Crystal Reports for Visual Studio 2005
SQL Server Analysis Services
Microsoft SQL Server Analysis Services Designer
Version 9.00.2047.00
SQL Server Integration Services
Microsoft SQL Server Integration Services Designer
Version 9.00.2047.00
SQL Server Reporting Services
Microsoft SQL Server Reporting Services Designers
Version 9.00.2047.00

New Unable to view designer in vs2005 c#
RamiEmad
Hi,
I added the DesktopCompatible(false) to the project and the xmta file was added. I also read about Design-time attributes (new for me) at MSDN and had great expectations. BUT the project wouldn't compile as long as the xmta file existed. When I removed it, the project compiled fine. I got an error message saying:
Error 54 genasm.exe(1) : error There was an error initializing MatexPPCClient.Matex.OrderHead. Typen MatexPPCClient.Matex.Carrier, MatexPPCClient, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null ble lastet inn i ReflectionOnly-konteksten, men AssemblyBuilder ble ikke opprettet som AssemblyBuilderAccess.ReflectionOnly. MatexPPCClient
I guess the Norwegian part is saying something like: ...PublicKeyToken=null was loaded in ReflectionOnly-context but AssemblyBuilder was not created as AssemblyBuilderAccess.ReflectionOnly.
I found another MSDN thread dealing with a similar problem (postid=359496). They talked about a known issue with the use of generics. And yes, I do use a generic in my baseform:
private
Dictionary<ControlDelegateKey, SpecialKeyPressedEventHandler> _controlDelegates = new Dictionary<ControlDelegateKey, SpecialKeyPressedEventHandler >(); This is widely used so I have not tried to remove it because of my time constraint and the fact that I need to have it.Is this "known issue" a part of my VS2005 version (see system info above) or is it something else
Now I'll will try to conditionalize some of the problem code by using Environment.OSVersion.Platform as described in the MSDN document "create_migrate_designer_controls_vs2k5.asp" as an additional possibility besides the DesktopCompatibleAttribute.
Anyway, thank you very much for your great help so far in this very troublesome matter.
Regards Brede
lushdog
Just to be clear, this is a Smart Device project, right Have you ever seen this error on a regular project
The device designer has its own Type Resolver to do any extra translation between types. What is likely happening here is that the typeresolver is being bypassed during form creation because you are using a base form and the type resolver isn't hooked up yet.
It would be useful to know the queried type at:
at System.Type.GetType(String typeName)
if there is some way you can get it (put a breakpoint in the OpenNETCF code).
Visual Inheritance has limited support in device projects, so you may not be able to get this to work. What I would do is capture the exception, look at what Types are causing it (most likely in Microsoft.WindowsCE.Forms.dll. Then try to avoid using them in base types.
Beth31
I post the solution for my "new problem" (see above) here:
Problem: VS2005 CF skipped deployment of projects to the device (stopped/error after build).
Solution: Added the missing setting directly in the solution file (.sln) using a text editor: Lines telling which projects should be deployed. Example:
Original:
{0ED38ED2-94B8-4F0E-984B-82A50DE45740}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0ED38ED2-94B8-4F0E-984B-82A50DE45740}.Debug|Any CPU.Build.0 = Debug|Any CPU
Added a line like this for each of the projects I wanted to deploy:
{0ED38ED2-94B8-4F0E-984B-82A50DE45740}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
I did this directly in the .sln file because I couldn't find such a property in the GUI of VS2005.
Regards Brede
g-spot-web
Thank you very much for your reply!
Yes, it is a Smart Device project and me or any of collegues have not seen anything like this before in a regular project. Occasionally, on one single form at a time, I have seen it in this same solution/project prior to this total showstopper situation I experience now.
I will try to analyse which type is making problems for me. It seems like it has to do with the type InstrumentationManager from the Neoteric CFIL framework. In one of my first workarounds I tried to comment out any calls to this but even then I experienced some similar trouble.
Another workaround was to comment out the single line in the Neoteric framework that caused trouble but then I got an error for the next line complaining about that it couldn't find the "coredll" which is obviously right because it's not on the PC only on the Device. The ImportDll statement was the end of that chain. I didn't find any reason for this either. Is it connected to the same issue
One thing...this happens design-time. The solutions compile and can run on the device. If I am going to use breakpoint then I need to step every System.Type.GetType call. I don't have the OpenNETCF code, I use dlls. Is there any tricks to get this info design-time Attach the VS2005 from another instance of VS2005 or something
The really strange thing for me is that it has worked for months and suddenly it stops working on all forms. The trouble started when I was going to work on a form which had given such an error in the Designer for a long time. Now it was time to clean this one up and get things closed. To identify where the problem with this single form was I started to make a similar form step by step. Suddenly this new one came with an error to and after this all the forms went in to this state of trouble.
Anyway, it's midnight in Norway now and I will try a take a new dive into it tomorrow. I am going on vacation next week so I hope the people returning when I leave can come back to something that works...
Regards Brede
ReLoad
I have so far (so good) ended up with the following actions:
1. Added Platform conditional design-time "compile" some vital places in the code:
if
(Environment.OSVersion.Platform == PlatformID.WinCE){
QueryPerformanceFrequency(
ref queryPerformaceFrequency);}
2. I made a new main project (in the same solution). Copied file by file from my old project. Checked the designer that each single form was visible. (In the old project with the identical code the Designer view failed...s t r a n g e!...I have not found the core difference between the old and the new project). Now, four hours after the operation it is still working but for how long Hopefully forever!
***************
Now I got into a new problem: The automatic deployment (F5) to the device (both hw and emulator) is not working any longer. No dialog about which device to choose as target any more. I assume this is a new thread...
Is it me or VS or the weather or my wife or ... what is going on What is triggering all this "self -destructing" chain of problems with VS I just want to make my application in time. No more no less.
***************
Regards Brede
Diegota
One thing you can try is to add an attribute
DesktopCompatible(false)
to the base form in the xmta file of your project (add a designtime metadata file if you don't have one already).
What _should_ happen IIRC is that the device designer will stub out the base class altogether -- in effect disabling visual inheritance. It may get you unblocked.