This is why hate Visual Studio - XDG0008
Posted: Tue May 18, 2021 9:37 am
In >20 years working with VO, VO has given me a handful of "strange" issues only. Visual Studio, on the other hand, has these kind of issues all the time, taking hours to try to solve and sometimes (like now) it's better to give up.
What I wanted to do is create a WPF page to enable the user selecting directories from a treeview. A compact sample to begin with is on https://docs.microsoft.com/en-us/answer ... nding.html. It works, according to the person who asked for the solution.
However, even when I paste the exact same code in a project, I get
Error XDG0008 The name "ViewModel" does not exist in the namespace "clr-namespace:Backup".
XLS0414 The type 'local:ViewModel' was not found
(and a few more).
But it it's certainly there:
.....
xmlns:local="clr-namespace:Backup"
<Window.DataContext>
<local:ViewModel/>
</Window.DataContext>
namespace Backup
{
public partial class SelectFiles : Window
{
public SelectFiles()
{
InitializeComponent();
}
public class ViewModel
{
public ViewModel()
(// etc)
}
The issue is mentioned for VS2010-2019. Like most serious issue, there is no chance that any is solved in the numerous updates that are released.
There are many pages concerning this error. Most, but not all, finally got rid of this error by "solutions" like deleting a .vs directory, changing from Debug to Release, and back; changing from AnyCPU to x86 and back, or doing a voodoo ritual around their Pc.
And that's the tool we are supposed to do our professional work with (yes I know there Xide but I need WPF).
Dick
What I wanted to do is create a WPF page to enable the user selecting directories from a treeview. A compact sample to begin with is on https://docs.microsoft.com/en-us/answer ... nding.html. It works, according to the person who asked for the solution.
However, even when I paste the exact same code in a project, I get
Error XDG0008 The name "ViewModel" does not exist in the namespace "clr-namespace:Backup".
XLS0414 The type 'local:ViewModel' was not found
(and a few more).
But it it's certainly there:
.....
xmlns:local="clr-namespace:Backup"
<Window.DataContext>
<local:ViewModel/>
</Window.DataContext>
namespace Backup
{
public partial class SelectFiles : Window
{
public SelectFiles()
{
InitializeComponent();
}
public class ViewModel
{
public ViewModel()
(// etc)
}
The issue is mentioned for VS2010-2019. Like most serious issue, there is no chance that any is solved in the numerous updates that are released.
There are many pages concerning this error. Most, but not all, finally got rid of this error by "solutions" like deleting a .vs directory, changing from Debug to Release, and back; changing from AnyCPU to x86 and back, or doing a voodoo ritual around their Pc.
And that's the tool we are supposed to do our professional work with (yes I know there Xide but I need WPF).
Dick