node -v: Unknown (GitHub integration)npm -v: Unknown (GitHub integration)snyk -v: Unknown (GitHub integration)Snyk engine analyzed a C# project successfully.
Snyk engine failed to analyze a C# project with message "Expected target framework net472 is not present in proj file".
@alexanderkozlenko This is a limitation we are aware of, today every project is very coupled with the Target Framework.
Each target framework in a project generates a completely different set of dependencies so we have to generate X projects if X target frameworks are present in the manifest file.
This means that once a framework is removed that particular project is no longer going to be updated. We have considered allowing users to just update the TF, but this is still something we are discussing as it doesn't quite feel right due to how different the dependencies will be in this scenario. It is essentially a brand new project in terms of dependencies.
The work around => re-import the project so we pick up the new framework & delete the old one. This means also updating the commit status checks on you side to not be required if that was set.
We are actively working towards allowing all of this to be more dynamic, so please stay tuned for future updates.
@lili2311, thank you for the explanation and workaround!
Hi @lili2311, I have the same error message for a PR where .NET framework version was not changed: https://github.com/alexanderkozlenko/dotnet-launcher/pull/19
Hey @lili2311, I seem to be getting this as well. Can I confirm whether this is still a known issue with Snyk?
Do you have any updates? We have the same issue - we are migrating our projects from .NET 4.5.2 to .NET 4.6.2 and we are not able to run the Snyk tests on our "migration" branch, before merging that change to the mater branch... it is somehow possible to create two Snyk projects for different branches in the same repo?
Also, the "re-import the project" workaround is a bit unfortunate because we as developers don't have rights to manage Snyk projects, so we have to contact our company Snyk admins after every change of the .NET Framework version in any project...
@DominikPalo I was able to fix the issue by deleting the project and re-importing it, just like the recommendation here said.
Most helpful comment
@lili2311, thank you for the explanation and workaround!