When the TargetFramework is updated on a .NET repository, sometimes Snyk does not pick up the change and the Target Framework remains on the old value.
Steps to reproduce:
- Import an existing (working) .NET project to Snyk
- Any new changes made will pass PR checks as expected
- Change the .NET targetFramework for your project in code
- Make a PR with the above change
- The PR checks fail
Each .NET project is linked 1:1 to the targetFramework it was imported with. If a manifest file (e.g. csproj) mentions 2 or 3 targetFrameworks it will be imported to Snyk as 2 or 3 separate projects.
This means that if a project's targetFramework is changed (added or removed) Snyk will not understand this very well.
Projects linked to removed targetFrameworks will remain in the portal, but will be unable to re-test (recurring or manual)
New targetFramework projects will only show if the repo/file is reimported.
Discussion and Resolution
This is a known limitation of Snyk's .NET implementation. The current fix is to delete the project, merge the targetFramework change, and then re-import the project so that Snyk can see the new targetFramework and work accordingly.