After adding a new project to a large solution I am getting errors indicating the build is not right. Having always relied on Visual Studio to just make it happen, I would appreciate the help.
Below is a picture from the Configuration Manager. The project at the very end (Parties.Presentation.Wpf) has a dependency on an assembly named ‘Core.Presentation.Wpf’, as evidenced by the code below:
using Smack.Core.Presentation.Wpf.Services;
using Smack.Parties.Presentation.ViewModels.PimVms;
namespace Smack.Parties.Presentation.Wpf.ApplicationControl
{
public class PimVisualizerService : WpfUiVisualizerService
{
public PimVisualizerService(WpfTypeRegistrationService registrationServiceService)
: base(registrationServiceService) { _registrationService.Register<PimShellVm>("blah"); }
}
}
Not sure if it’s all R#, but before I try to build, there are no errors indicated and I can navigate to the base class in the Core assembly.
But I cannot build it, and I get this error:
Error 1 The type or namespace name 'Core' does not exist in the namespace 'Smack' (are you missing an assembly reference?)
C:\Users\L&M\Documents\Projects\Smack\trunk\src\Parties.Presentation.Wpf\ApplicationControl\PimVisualizerService.cs 1 13
Parties.Presentation.Wpf
Is this a build dependency issue? How can I fix it?
Cheers,
Berryl

UPDATE
Ok, per the last answer to this question, changing from ‘MixedPlatforms’ to ‘AnyCPU’ is letting me build again.
I’ll leave this open for a bit to see if anyone with more build experience than I says this is either a hack or the right thing to do. I’d be curious as to why the WPF projects default to x86 in the first place while at it.
Building ‘Any CPU’ breaks if you have actual (not accidental) x86 dependencies and try to run it on x64. It probably defaults to ‘x86’ as that was/is the most common platform target.
Unfortunately there isn’t a zero-maintenance way of fixing this. Because the work that I’m shipping to a corporate customer is mandated to be ‘x86’ for dependency reasons, I’ll rip the ‘Any CPU’ configs out of the .csproj file, and ensure that the default is set to ‘x86’, but adding a new project will have a ‘Any CPU’ config and the solution will flop over to ‘Mixed Platforms’ with ‘Any CPU’ and ‘x86’ set in the solution.