Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2012 Project Xaml reports cannot find namespace error, but project compiles fine

I have a really weird problem with my Solution in VS2012.

The thing is, its a solution made by another person, and I have to use it for my c# course. I know it runs fine, because there are 3 others in my team, who got no warnings or anything like it.

From my point of view, the program runs just fine, but when I build, and search through the xaml files the errors just keep stacking up, about missing items in namespaces and other stuff like that:

Error 1 Could not load file or assembly 'Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. C:\Users\jesperplantener\Documents\Visual Studio 2012\Projects\02350Demo.VS2012 (1)\02350Demo.VS2012\02350Demo\View\App.xaml 9 9 02350Demo

Error 2 The name "EventTrigger" does not exist in the namespace "clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity". C:\Users\jesperplantener\Documents\Visual Studio 2012\Projects\02350Demo.VS2012 (1)\02350Demo.VS2012\02350Demo\View\NodeUserControl.xaml 68 17 02350Demo

and so on, I got around 29 of those errors.

Now to the fun part:

I am running on a macbook air 2013. Windows virtually installed in Parallels. I expected this to be the flaw at first, so I reinstalled a Windows 7. That did not fix it. Then I upgraded my parallels installation from 8 to 9. Did not fix the problem. I just finished installing Windows 8 now, in parallels 9, and the problem is still there!!!

Please, can somebody help me before I do something stupid! :D

And btw, yes the project has been downloaded several times, and it Works on my teammates computers.

like image 996
Jesper Plantener Avatar asked Nov 01 '22 14:11

Jesper Plantener


1 Answers

Windows interactivity if I recall can have an optional blend assembly. Version 1 of Visual Studio 2012 version of Blend only worked in Win 8 and would not do WPF applications. You may not have the WPF version.

One can determine if the application version of blend is installed by running Blend. If it is and it works blend will come up normally, if not it will tell you and provide a link to download the trial version WPF version of Blend. This may have changed in the updates...

So before you anything, install update 3 to visual studio and then try blend. Verify it runs and then if you did install the update try a rebuild.

----- Update ----

For Microsoft.Practices.Services Locator, install from codeplex (Common Service Locator library)

----Update From OP (Jesper) ---

Verify all packages match same versions of .Net. Use Nuget to install/uninstall packages til all are aligned.

like image 130
ΩmegaMan Avatar answered Nov 15 '22 06:11

ΩmegaMan