Problem:
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
Why?
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) we will not understand this very well.
Discussion and Resolution
This is a known limitation of our .NET implementation. The current fix is to delete the project, merge the targetFramework change, and then re-import the project so that we can see the new targetFramework and work accordingly.