I've been working on multiple apps in Visual Studio and the current project I'm working on started about a month ago. All worked great until I get the following 2 error messages today:
Files has invalid value "obj\Release\Klantvolgsysteem.Droid.C_.Projects.Klantvolgsysteem.Trunk.Klantvolgsysteem.Klantvolgsysteem.Klantvolgsysteem.UI.Pages.FormCategoriesPage.FormCategoriesPageView.xaml.g.cs". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. Klantvolgsysteem.Droid
The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. Klantvolgsysteem.Droid C:\Projects\Klantvolgsysteem\Trunk\Klantvolgsysteem\Klantvolgsysteem\Klantvolgsysteem\UI\Pages\FormCategoriesPage\FormCategoriesPageView.xaml
The error message is very clear, but I can not seem to find out why the error occurs, or how to solve it. The problem seems to be that when the app is build, the files in the obj folder get the full path to the source file as the file name... For example:
I have a xaml page named "HomePageView.xaml", the source file is located at:
Now, when the app is build, the obj folder will contain a file named
Which in the end has the full pathname:
For this page in particular the filepath was not too long, but as shown in the error message the "FormCategoriesPageView" fails to build.
Now I would like to understand why the file in the obj folder gets these long filenames, because this is not the default behaviour.