András Tóth‘s professional blog
banditoth.net

Hey there 👋, I’m banditoth a .NET MAUI developer from Hungary.
I write about software development with .NET technologies.

You can find me on:
LinkedIn | Github | StackOverflow | X / Twitter | Threads

Tag: build

  • .NET MAUI – One or more invalid file names were detected.

    This content has 1 year. Some of the information in this post may be out of date or no longer work. Please, read this page keeping its age in your mind.

    Developers working on .NET MAUI projects may encounter a perplexing error during the build process, revealing invalid file names that must adhere to specific rules.

    /usr/local/share/dotnet/packs/Microsoft.Maui.Resizetizer.Sdk/7.0.101/targets/Microsoft.Maui.Resizetizer.targets(525,9): error : One or more invalid file names were detected. File names must be lowercase, start and end with a letter character, and contain only alphanumeric characters orunderscores.

    The Solution

    To resolve this issue, developers need to identify and correct the problematic file names. On macOS, the hidden file .DS_Store is a common culprit causing this error. Here’s a step-by-step guide to resolving the issue:

    For macOS

    1. Open Finder.
    2. Navigate to the root directory of your project.
    3. Press Command + Shift + Period to toggle the visibility of hidden files.
    4. Look for any hidden files, particularly .DS_Store.
    5. Delete or rename the problematic hidden files.

    If the Finder app does not show any files, try opening a terminal, navigate to the resources folder of your project, and type ls -la to see the files. It should display the invalid files. Remove them accordingly.

    For Windows

    1. Open File Explorer.
    2. Navigate to the root directory of your project.
    3. Select the “View” tab on the File Explorer ribbon.
    4. Check the “Hidden items” option in the “Show/hide” group.
    5. Look for any hidden files, and particularly check for files similar to .DS_Store (Windows might have different hidden files causing the issue).
    6. Delete or rename the problematic hidden files.
  • Xamarin: Project not selected to build for this solution configuration

    This content has 3 years. Some of the information in this post may be out of date or no longer work. Please, read this page keeping its age in your mind.

    If your Xamarin Android, iOS or UWP application is not starting when you are hitting the Run or F5 button, then probably your Build configurations are misconfigured. This usually happens when you are opening a too old source code. No worries, we will have a solution for it.

    Solution

    Right click on your solution, and select configuration manager
    Ensure that the desired project has the deploy column ticked.