VS2010 with .NET 2.0 WinForms - Error while binding to a shared list

I recently converted to Visual Studio 2010 and performed the conversion on a project that worked great in VS2008. In Visual Studio 2010, it’s not so sunny.

This is a .Net 2.0 WinForms project that makes heavy use of binding ListViews and Grids to shared lists, so retrieving shared lists is not possible.

I get the following error message (anonymous for publication purposes):

Could not find a type for a name.  The type name was   
'System.Collections.Generic.List`1[[MyAttribute, Domain, Version=1.0.0.5,    
Culture=neutral, PublicKeyToken=71c8708be064889a]], mscorlib, Version=2.0.0.0, 
Culture=neutral, PublicKeyToken=b77a5c561934e089'. Line 134, position 5.
C:\Projects\MyProject\Control.resx

The problem goes away if I upload the project to .net 4.0, but this project should target .net 2.0 so that there is no suitable long-term solution.

Google google offers a lot of messages from people / having / a problem, but none of them see people who solved the problem, so any help would be greatly appreciated.

That.

+3
3

.resx, designer.cs(resources.GetObject("...")), .

, , ​​ , , . .

resx , , , . , , [Browsable(false)], , .

, , , resx, visual studio .

+1

, .

. ? ? , DesignerSerializationVisibility. .

0

... VS2008, , , . MSBuild 3.5 VS2010 ( ​​ 2010 , 2010 ).

: TBDEV830.resx(143): . "System.Collections.ObjectModel.ObservableCollection`1 [[T1.Tb.SideBar.ISideBar, T1.Tb.SideBar, Version = 1.0.3702.18460, Culture = neutral, PublicKeyToken = null]], WindowsBase, Version = 3.0.0.0, = , PublicKeyToken = 31bf3856ad364e35 '. 143, 5.

Found several posts from other forums, and no one seemed to find a solution:

One article talks about the addition of [DesignerSerializationVisibility (DesignerSerializationVisibility.Content)], but it does not.

Another article (http://www.go4answers.com/Example/tfs2008-tfs2010-migration-upgrade-3526.aspx) instructed to load it into the IDE and asks if it helps isolate the problem, but that would mean an update project up to the 2010 format, which cannot be completed.

0
source

Source: https://habr.com/ru/post/1772867/


All Articles