FxCop Analysis with .Netcore library failed in VS2015 update 3

492 views Asked by At

I was built my project(Class Library) in .Net core and trying to analyze my code using FxCop in VS2015.

But i am getting following error: "could not identify platform for project" enter image description here

Also i tried to set platform for my project. But i can't able to set it. enter image description here

Any thing i missed here?

thanks, Suresh

1

There are 1 answers

0
Suresh Ram On

By referring this link Use code analysis with Visual Studio DNX project (.xproj) I have added following lines in project.Json file now its working.

"frameworks": {
    "net46": {
      "buildOptions": {
        "define": [ "CODE_ANALYSIS" ]
      }
    },
    "netstandard1.6": {
      "imports": "dnxcore50"
    }
  }

enter image description here

Note: After added the code in project.json file, close all visual studio application and start it. Then it will work.