views:

299

answers:

3

I have three machines. one installed VS2008 another two installed SDK6 and Framework3.5 (one of these two is a build machine).

When I use MSBuild to build our application, all of them get this warning:

C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning MSB3245: Could not resolve this reference. Could not locate the assembly "WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

and the build machine comes with some errors:

scsm\SCSM.cs(234,13): error CS1501: No overload for method 'Invoke' takes '1' arguments scsm\SCSM.cs(235,13): error CS1501: No overload for method 'Invoke' takes '1' arguments scsm\SCSM.cs(304,13): error CS1501: No overload for method 'Invoke' takes '1' arguments scsm\SCSM.cs(314,13): error CS1501: No overload for method 'Invoke' takes '1' arguments scsm\SCSM.cs(317,13): error CS1501: No overload for method 'Invoke' takes '1' arguments scsm\SCSM.cs(323,17): error CS1501: No overload for method 'Invoke' takes '1' arguments scsm\SCSM.cs(324,17): error CS1501: No overload for method 'Invoke' takes '1' arguments scsm\SCSM.cs(325,17): error CS1501: No overload for method 'Invoke' takes '1' arguments

but other machines are passed without error. Resources are identical in those three machines.

searched online but cannot find answer. Anybody here can help me resolve this? thanks

+2  A: 

Could not locate the assembly "WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35".

WPFToolkit is not part of the .net Framework but a component that can be downloaded.

Did you download and copy the WPFToolkit-DLL to some place on the build machine where your project can find it? (either some directory set in your project references or the GAC)


scsm\SCSM.cs(325,17): error CS1501: No overload for method 'Invoke' takes '1' arguments

In my experience, this problem can mean that you are missing SP1 for .net Framework 3.5.

EDIT: After seeing your code, I'm pretty sure this is the problem. Dispatcher.Invoke(delegate, params object[] args), which you are calling here, was added in Framework 3.5 SP1, see the MSDN page of this method:

Supported in: 3.5 SP1, 3.0 SP2

Heinzi
A: 

The WPFToolkit sounds like you might want to install this (at a guess).

The Invoke sounds like a different dll version; perhaps missing an overload or extension method. Check the references are identical on the build server (or better: include references inside the project). It could also be the difference (say) between .NET 3.5 and .NET 3.5 SP1 (or similar), but it is hard to tell without seeing the offending line of code.

Marc Gravell
+2  A: 

It looks like your machines are missing the WPF Toolkit assembly. For the smoothest results, include it in your version control system alongside your source code, and add references with the Browse tab in the Add Reference dialog in Visual Studio. Then you can be sure that it will be present and findable on any machine you fetch the source code onto in the future.

GraemeF
+1 for the suggestion to put it into the VCS.
Heinzi
+1 .. adding an assembly!
Andreas Niedermair