I am working on a WPF project and I just came across a weird error, I have code that runs perfectly fine but has 16 errors in the form of 2:
IComponentConnector.Connect(int, object)' is explicitly implemented more than once
(In the same document at the same space I might add) and 14 ambiguity errors due to this. All of this happened after I added a button, but removing it does nothing.
As I said before the project runs perfectly fine, but it seems to think as if there are duplicates of the code?
Completely recreating the window does nothing either and the "errorscribbles" don't even show up. I seem to be only one suffering from this as I could not find anything online cept This which is a similar but not equal problem.
Could it be the version I am running? I have .NET 5.0, but changing this does nothing. I am really out of ideas and in the worst case scenario il just live with the errors.
The code that is getting the error:
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Eu4MissionDesigner
{
/// <summary>
/// Interaction logic for DirSelectWindow.xaml
/// </summary>
public partial class DirSelectWindow : Window
{
public DirSelectWindow(FileDirs FileDirectories)
{
InitializeComponent();
FileDirs fdDW = FileDirectories;
if (fdDW != null)
{
if (fdDW.LocDir == null) { LocDirBlock.Text = "No Directory"; } else { LocDirBlock.Text = fdDW.LocDir; }
if (fdDW.ImgDir == null) { ImgDirBlock.Text = "No Directory"; } else { ImgDirBlock.Text = fdDW.ImgDir; }
if (fdDW.MisDir == null) { MisDirBlock.Text = "No Directory"; } else { MisDirBlock.Text = fdDW.MisDir; }
}
}
private void LocButtClick(object sender, RoutedEventArgs e)
{
}
}
}
It is really simple code and I don't see what could be wrong. It keeps referring to:
public DirSelectWindow(FileDirs FileDirectories)
as if it is something wrong (no errors in other documents, could post entire project if necessary).
Sorry for my English, I am using the last of my mental capacity left to write this