A change in the .net framework version has become necessary for my project and i'm running into some issues with changing a usercontrol. I narrowed done my code and got to just the bare minimum to make the error.
As you can see i've got a collection property in the uc. Okay, so i run my project with a new UserCTest control and get two errors which read:Code:Public Class UserCTest Private mMyCollection As Collection = New Collection Public Property MyCollection As Collection Get Return mMyCollection End Get Set(ByVal value As Collection) mMyCollection = value End Set End Property End Class
And this which seems like it's being cause by the first one:Code:Could not find a type for a name. The type name was 'Microsoft.VisualBasic.Collection, Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f11d50a3a'. Line 2659, position 5.
All the other properties in my uc are fine so it's just this one which causes an error. As you can see from the error message the problem is in the form resource file in the place where the collection data is stored. I did a test to see if there's a problem with any property that is saved in the .resx file like thisCode:Unable to open file '...\Solution Folder\Project Folder\obj\x86\Debug\WindowsApplication1.Form1.resources': The system cannot find the file specified.
It worked so as far as i know the problem is only with collections.Code:Public Class UserCTest Private mMyImage As Image Public Property MyImage As Image Get Return mMyImage End Get Set(ByVal value As Image) mMyImage = value End Set End Property End Class




Reply With Quote