Having problems debugging and building a WPF app

0

I've been making modifications to a WPF app we wrote a few years ago using the ModernUI framework, adding a Shared Project, making the necessary changes. However, I've found that I can neither debug the app, nor build it. When I tried to debug the app I get this error:

System.Windows.Markup.XamlParseException
  HResult=0x80131501
  Message='Provide value    on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.' Line number '7' and line position '19'.
  Source=PresentationFramework
  StackTrace:
   at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
   at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
   at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   at LRAT.MainWindow.InitializeComponent() in D:\Src\LRAT\Labor Relations Action Tracker (LRAT)\LRAT\LRAT\MainWindow.xaml:line 1

Inner Exception 1:
IOException: Cannot locate resource 'assets/14546169_s-01.ico'.

I've searching throughout the project. There were two places in a couple of ModernWindow which had that .ico file the value of the Icon property. However, I changed it to be like this:

<mui:ModernWindow x:Class="LRAT.MainWindow"                  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mui="http://firstfloorsoftware.com/ModernUI"
              xmlns:view="clr-namespace:LRAT.View"
              xmlns:uc="clr-namespace:LRAT.UserControls"
              Style="{StaticResource BlankWindow}"    
              Closing="ModernWindow_Closing"
              Icon="/Assets/14546169_S-01.ico" 
              Loaded="ModernWindow_Loaded" 
    >

So, I don't know where else to look, since searching through the whole solution didn't show anything like assets/14546169_s-01.ico, whereas I've changed the 2 .xaml files to be /assets/14546169_s-01.ico.

If I try to build it, the rest is even weirder. All it tells me is

Unknown build error, 'An item with the same key has already been added.'

The only thing it says is that the problem is in the LRAT project. No file is mentioned.

We started this project with VS 2017. I get the errors there. And I get them with VS 2019, too.

wpf
visual-studio-2017
modern-ui
visual-studio-2019
asked on Stack Overflow Apr 11, 2019 by Rod

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0