After Update of Windows 10 schema references lost - wpf

This is really annoying: a WPF production application that works for months at the customer and hasn't been touched suddenly stopped to compile. I'm getting tons of errors of the type "schema information not found":
Could not find schema information for the element 'http://schemas.microsoft.com/winfx/2006/xaml/presentation:Grid'
Could not find schema information for the element 'http://schemas.microsoft.com/winfx/2006/xaml/presentation:UserControl'.
Could not find schema information for the element 'http://schemas.microsoft.com/winfx/2006/xaml/presentation:Grid.ColumnDefinitions'.
etc...
Anyone out there that has an idea how to fix that?

OK, after a day of playing around I got the thing working again and I would like to share what happened.
All the errors came from a single user control. They were so many that their count exceeded what VS2015 would display. When I opened the component in the editor I could see the XAML code but the design window didn't show up, as if for VS this was a normal class module.
After trying around eventually I copied both file of the component (XAML and c#) to a backup location, deleted the coponent from the project, created a new user control with the same name and copied and pasted all code from the saved files into the newly created component. And suddenly everything worked again as always.
It seems to me that the problem was somewhere within VS2015 as the application works now again with literally the same code as before. I only recently updated from VS2013 and in all the years I never had any comparable issue with that version.

Related

WPF Ribbon not displaying correctly in Designer [duplicate]

I'm using thbe Microsoft Ribbon for WPF (System.Windows.Controls.Ribbon) and VS2015. Since I removed unnecessary depencies from my project (like Dynamic Data Display etc, things not related to the ribbon) it does not render correctly in the Designer anymore. All RibbonButtons get rendered as usual buttons and so on.
I used the Clean Solution option and also rebuild multiple times, without sucess. While execution everything is fine, just the designer can't handle the ribbon anymore. What could have caused this strange behaviour?
This is how my ribbon looks now in the designer:
And this is how it's supposed to look and looked before:
Update: it clearly seems to be a visual studio bug, as I opened the project on another machine with the same VS version and there everything is fine.
deleting %LOCALAPPDATA%\Microsoft\VisualStudio\14.0\Designer\ShadowCache wasn't working but this:
close solution (at best every instance of VS, you never know)
delete bin\ and obj\ in solution folder ("Clean Solution" isn't enough nowadays. Why should it? It isn't anything anyone would ever do if VS is doing strange things. Maybe I should fall back to kill -9 devenv.exe && git clean -fX as default m( )
Reopen solution and hope for the best.
This drove me nuts. The only real google hits for this problem was this SO question, another one without any answer, 500+ pseudomirrors of SO and thousands of false positives... sorry for the rant.
The problem was resolved by clearing the Visual Studio Designer Cache.
This is done by deleting the subfolders in %LOCALAPPDATA%\Microsoft\VisualStudio\14.0\Designer\ShadowCache

SSRS VS2015 SSDT Report Wizard Style Selection Screen Not Showing

I am stumped on this one. I am not sure if others are having the same issue.
In past versions, when I use the report wizard, one of the screens lets me choose the style (Slate, Forest...)
With my new setup the screen never appears and on the summary screen it says 'Style:Modern'
I tracked down the StyleTemplate.Xml, made a copy and changed 'Modern' to 'ModernTest'. Both in the Styles folder and the en folder. I have searched my c drive and these are the only two places this file exists.
EDIT: I had to change the label to 'ModernTest' not the name. Now 'ModernTest' is showing up in the summary. I still however do not get the chance to change styles.
I added a new style to see if the page only shows up if more than one is present but maybe since that one was from an older version it still only thinks there is one valid style so skips the selection page... I will try to replicate modern...
I am using VS2015 Version 14.0.25123.00 Update 2, SSDT Version 14.0.1601.5
Anyone else have the same issue?
EDIT: I copied an xml file from a previous version and now slate appears as the style. I guess the only problem is that the screen to select the style no longer shows up.

Visual Studio crashes on opening XAML file

I try and open a XAML file in a silverlight project, VS crashes.
I can create a new Silverlight project, and open XAML files in that new project no problem. However even if I create a new XAML file in my existing project VS still crashes, so my hunch is that it's not the content of the XAML, but rather something else in the project.
Any suggestions on how to troubleshoot this further before I go down the laborious task of starting with an empty but working project, and adding the bits of the existing project until it crashes.
As it turns out my DesignTime ViewModel data was the source of the problem. I inject a design-time repository that populates various collections with suitable design-time data. After a bit of refactoring that was done around the same time as the Silverlight update was applied, I messed up one of the property setters. The validator throw the exception and these caused VS to crash.
In the end I debugged this by starting a second instance of Visual Studio attaching the debugger to the first instance, and setting a bunch of breakpoints in my view model locator and design-time repository.
I debated removing this question, but decided to leave it up, with this answer as I suspect I'm not the first person to have VS crash for no apparent reason.
Deleting the ngen cache worked for me. See What causes Visual Studio 2008 SP1 to crash when switch to Design View of a WPF application
Try deleting the .suo file. You will find it where your solution file is and it will have the same name as the solution file i.e.
MySolution.sln
MySolution.suo
I just had this problem and I solved it this way :
launch the project in debug mode, try then to look at you xaml.
It worked, after closing the program everything was alright.
It's quick and safe. (you don't delete any hidden files...)
Maybe it will work for you.

Why is Visual Studio 2010's solution explorer so friggin' jumpy?

I am getting the following error on when I try to compile:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFX.targets(269,9):
error MC6000: Project file must
include the .NET Framework assembly
'WindowsBase, PresentationCore,
PresentationFramework' in the
reference list.
This project is the Web backend for a Silverlight Business Application with very little modification. When I do add these references, everything breaks. I've tried removing every single reference from my references until all I had left was a reference to System. I still get the error though. In fact it is the only error that shows up.
Edit
Figured it out, and I have a new question: I accidentally moved (dragged) a XAML file from my Silverlight front-end project. Visual Studio is very finicky and will drag something at the drop of a hat. When I click an item, even if I release the mouse right away, sometimes it will drag the item following the mouse. Is there a way to make it less jumpy?
If you copied or moved an item from another project, its "Build Action" property might be set to "Page". This happened to me, and changing it to "Resource" (because that's what the item was) fixed the problem.
I've copied this answer from another site. It was the problem I was facing.
http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/7bf38ed6-43f8-492e-a304-0842e6c7c6b2/

Problems when splitting Silverlight App into smaller components

I have a Silverlight 3 App that became quite big over the time. So I began to try to break it in several smaler Applications that will be dynamically loaded in my Main Application on demand. But I run into a strange problems with my VS 2008.
When I add a new Silverlight Application project to my solution and copy User Controls from my old Main Application into this new project it happens from time to time (about twice a day) that the XAML files and their code behind files loose their association. When this happens and I try to build the project, the compiler complains that he cannot find all the Ccontrols like buttons, labels etc. in the code behind files that I added to the class in the XAML-file. And the build fails of course.
The only workaround that I found so far is to add another Silverlight Application project and move all the content from the first added project to it. Than everything works fine for a while until the problem occurs again.
But that's not really a solution.
Any Ideas what happens here and what i can do?
Best Regards,
Rocko
I have seen issues like this before when changing the namespaces on controls in silverlight. The issue crops up when you don't change both the namespace on the control class, and the full name of the class in the x:class attribute on the root element of the control.
Not sure if this fits your situation or not, but it's the only time I've run into similar issues.

Resources