Skip to content

v6.18.0 breaks workflows in Unity projects #2248

Open
@sm-quasar

Description

@sm-quasar

Describe the bug
v6.18.0 fails to locate an MSBuild project file or solution file and is unable to test our C# scripts and thus cannot validate them.

Unhandled exception: System.IO.FileNotFoundException: Could not find a MSBuild project file or solution file in '/github/workspace'

After the upgrade to the .18 release our megalinter workflow began reporting warnings instead of failing/fixing PRs. We currently run it just against changed files in a Unity project ( this potentially puts us in an odd position as we have no .csproj or .sln committed since Unity will auto gen these and regularly stomps over them making for messy commit history). This was all working fine for us in V6.17.0 But something in the updated version has broken the flow (.Net 6 support maybe?)

For now we've returned to the .17 release but that obviously isn't what we'd like to do long term

To Reproduce
Steps to reproduce the behavior:

  1. Create a unity project
  2. Add some .cs scripts
  3. Add megalinter github action workflow to validate all changed files
  4. Observe the below error
    Unhandled exception: System.IO.FileNotFoundException: Could not find a MSBuild project file or solution file in '/github/workspace'

See attached logs

Expected behavior
Dotnet Format should have ran against the .cs files without error or warning

Additional context
Attached logs from the two versions in question and our yml file

v6.17.0 Log
SUCCESS-CSHARP_DOTNET_FORMAT.log

v6.18.0 Log
WARNING-CSHARP_DOTNET_FORMAT.log

Our .mega-linter.yml file (renamed for github's own sanity)
mega-linter.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingnostaleThis issue or pull request is not stale, keep it open

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions