This project is read-only.

Source Code

Jun 27, 2010 at 9:28 AM


First I download the source code.

Then I open the solution, SilverUnit for example.

In VS2010 I convert the Solution.

I add the CThru and CTru.Silverlight assemblies to the complaining projects.

I get the folllowing error:

Error    13    Overload resolution failed because no accessible 'FireEvent' can be called without a narrowing conversion:
    Extension method 'Public Sub FireEvent(eventName As String, ParamArray args() As Object)' defined in 'CThru.Silverlight.DependencyObjectExtensions': Argument matching parameter 'eventName' narrows from 'CThru.Silverlight.UIEvents' to 'String'.
    Extension method 'Public Sub FireEvent(selectedEvent As UIEvents, ParamArray args() As Object)' defined in 'CThru.Silverlight.DependencyObjectExtensions': Argument matching parameter 'selectedEvent' narrows from 'CThru.Silverlight.UIEvents' to 'CThru.Silverlight.UIEvents'.    C:\Users\Jason\Desktop\CThru-49388\SilverUnit\SilverUnit\SilverUnit\SilverUnit.vb    23    9    CThru.SilverUnit


Error    12    'Func' is ambiguous in the namespace 'System'.    C:\Users\Jason\Desktop\CThru-49388\SilverUnit\SilverUnit\SilverUnit\Reflect\ReflectCache.vb    37    90    CThru.SilverUnit



Error    2    'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'.    C:\Users\Jason\Desktop\CThru-49388\SilverUnit\SilverUnit\SilverUnit\Extensions\DependencyObjectExtensions.vb    20    6    CThru.SilverUnit

Either this is an easy problem and VB.NET is confusing me,


Something wrong in the VS2010 conversion,


Something that could be improved in the codebase?


Hope you can help.

Jun 27, 2010 at 2:18 PM

Hmm could you try a cleanup? Also make sure you're referencing the correct version of System.Core (should be and not Lloks like the project sees both versions of System.Core and complains..

Should be something with the conversion, since the VS2008 version works just fine.

Jun 27, 2010 at 2:40 PM

VS2010 says that the System.Core is automatically added at build time.

I removed the System.Core reference from the ControlTest.CS and CThru.SilverUnit.

I also added a reference to CThru from the Typemock library to the CThru.SilverUnit project.


It's up and running now.


Jun 27, 2010 at 2:50 PM

No, wait.

The first test passed the second doesn't (c# tests)


Also the System.Core is being refused by VS2010 ,

saying that the build system automatically references this library.

Jun 27, 2010 at 3:47 PM

You're right. I just removed all references to System.Core, and it compiled fine.

As for the tests, which one fails? What's the message?


Jun 28, 2010 at 4:26 AM

The test SetChildTemplate() in the ControlTests.CS.

Error is cannot find System.Core



Any chance that you would upgrade the Solution and the projects to VS2010 and SL4.



Jun 28, 2010 at 4:31 AM

Also in converting to VS2010 the CThru reference breaks in the CThru.SilverUnit project.



Jun 28, 2010 at 4:34 AM

Also the CThru.SilverUnit reference to the CThru assembly included in the Dependency folder caused an error with an undefined InterceptInfo.

Changing the reference to the CThru library in the TypeMock/6.0/CThru/ folder fixed it.

Is everyone getting this problem?

Jun 28, 2010 at 4:36 AM

That error for the SetChildTemplate():

 'M:ControlTests.CS.AutoCompleteBoxTests.SetChildTemplate' failed: Could not load file or assembly 'System.Core,


Jun 28, 2010 at 9:02 AM

Ok, I'll add the converted solution to the source and let you know

Jun 28, 2010 at 5:11 PM

Just committed a couple of project converted to the VS2010 format (except for the tests which should be converted just fine). Please try this.


Jun 29, 2010 at 10:47 AM

I'm happy that you have a vs2010 solution now.


The CThruAndSilverUnitTogether_vs2010 solution still had a few conversions when opened in VS2010.

The FluentAOP vs2010 Project isn't named vs2010 and therefore is missing in the Solution.

The complete solution wouldn't built as the FluentAOP.dll file was missing.

I think you simply need to create a FluentAOP_vs2010 project and this will build.


I got the same problem with the  
        public void SetChildTemplate()

in the file AutoCompleteBoxTests.cs

using TestDriven, Right click, Run Test.



System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.
    File name: 'System.Core, Version=, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'
    at Microsoft.Windows.Controls.VisualStates.TryGetVisualStateGroup(DependencyObject dependencyObject, String groupName)
    AutoCompleteBox\AutoCompleteBox.cs(1179,0): at Microsoft.Windows.Controls.AutoCompleteBox.OnApplyTemplate()
    AutoCompleteBoxTests.cs(33,0): at ControlTests.CS.AutoCompleteBoxTests.SetChildTemplate()
    SilverlightUnitTestAttribute.vb(30,0): at CThru.Silverlight.SilverlightUnitTestAttribute.Execute()
    at TypeMock.MockManager.a(String A_0, String A_1, Object A_2, Object A_3, Boolean A_4, Object[] A_5)
    at TypeMock.InternalMockManager.getReturn(Object that, String typeName, String methodName, Object methodParameters, Boolean isInjected)
    AutoCompleteBoxTests.cs(26,0): at ControlTests.CS.AutoCompleteBoxTests.SetChildTemplate()


What's with VS2010 saying that it will automatically add System.Core?

Hope you can narrow down the problem.