Hi @Fai Developer ,
According to your description, I found some solutions:
1.Specific version signifies that Visual Studio will only build if it has access to the specific version of the referenced assembly.
This kind of error/check is enforced mostly when we implement .net assemblies targeting different versions of .net framework than the target Framework of the current project.
You could try to use this solution:
Please refer to this blog for more information:
https://realmpkdotnet.wordpress.com/2015/11/04/the-primary-reference-could-not-be-resolved-because-it-has-an-indirect-dependency-on-the-framework-assembly/
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
2.Try to upgrade the InfoPath solution for 2010 may not be very valuable. So you could try to rebuild an empty solution for .net 4.5 version.
3.I would suggest you try to make a custom web part of server object model instead of InfoPath, because InfoPath is no longer in the life cycle as below:
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.