1

I have VS2010 installed in my system and need to open solution file that is created in VS2015. I am unable to open and getting the following 2 errors

  1. "Unable to read the project file 'HardwareDrivers.csproj'."

  2. "The imported project "C:\Program Files (x86)\MSBuild\StyleCop\v4.7\StyleCop.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk."

I tried opening the sln file in notepad and edited the information highlighted in bold, but still the above issue exists.

Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 10

Is there any solution to this?

TheLethalCoder
  • 6,668
  • 6
  • 34
  • 69
NewLearner
  • 25
  • 1
  • 5
  • open VS -> New Project -> Other Solutions -> New (Empty) Solution -> Right Click Solution in Solution Explorer -> Add Existing -> Select *.csproj or *.vbproj file -> Ok – Radinator Dec 14 '16 at 15:17
  • As well as removing references in your solution file, you should check the csproj (project) files. It sounds like there may be a reference in one of those. – Hywel Rees Dec 14 '16 at 15:18
  • you can only open it if you haven't added any features that aren't compatible in older versions. See http://stackoverflow.com/questions/31532477/visual-studio-2015-solutions-backwards-compatibility-with-visual-studio-2013 Also, stupid question but have you verified that C:\Program Files (x86)\MSBuild\StyleCop\v4.7\StyleCop.targets exists on your machine? – ADyson Dec 14 '16 at 15:18
  • 1
    There are a *lot* of differences between VS2010 and VS 2015, never mind the differences between the unsupported 4.0 .NET Framework and 4.5.2, the earliest supported version. It makes more sense to upgrade to Visual Studio 2015 than try to backport the project. – Panagiotis Kanavos Dec 14 '16 at 15:20
  • I tried Radinator solution. Still the same error – NewLearner Dec 14 '16 at 15:23
  • Hi Panagiotis Kanavos, I dont have latest version of 2015 installation set up with me hence have to survive with 2010 – NewLearner Dec 14 '16 at 15:30
  • You could always download VS2015 community edition (it's free) – Hywel Rees Dec 14 '16 at 15:31
  • We had a similar problem after deinstalling an obfuscator that went out of business, and solved it simply by removing the problematic targets from the .csproj file manually (please back up your existing files before you try :P). – C.Evenhuis Dec 14 '16 at 15:43
  • From ADyson comment i tried to reinstall my StyleCop the error related to Style cop vanished,. But found new one as "C:\Program Files (x86)\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" was not found." how to perform this installation – NewLearner Dec 14 '16 at 16:20
  • @NewLearner by installing MS Build Community Tasks maybe? The error message is giving you a big hint? Think how you solved the last one... – ADyson Dec 15 '16 at 12:07

0 Answers0