Jesper Plantener
Jesper Plantener

Reputation: 229

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.

Upvotes: 5

Views: 1533

Answers (3)

Mark Bergan
Mark Bergan

Reputation: 83

I had a similar issue in Blend. The VS 2012 designer was fine, but received the same errors as you in Blend, preventing me to use Blend's designer.

To solve this, I removed the offending reference, and re added it; but I didn't use the "Add Project Reference...", instead I used the "Add Reference" and selected the DLL manually from the file-dialog box.

Upvotes: 0

ΩmegaMan
ΩmegaMan

Reputation: 31616

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.

Upvotes: 2

Alag
Alag

Reputation: 1408

Try download the assembly from http://scsf2012.codeplex.com/Download/AttachmentDownload.ashx?ProjectName=scsf2012&WorkItemId=1&FileAttachmentId=630895 (the link can be found at http://scsf2012.codeplex.com/workitem/1 ).

PS: just copied error message to google.

Upvotes: 0

Related Questions