简体   繁体   中英

unable to add system reference to vs2015 project

I am trying to add Microsoft.CSharp and other system references to ac# class library in vs 2015 community edition bound to tfs. when i add it doesn't persist the path for this particular class library. All the references i add are highlighted in yellow !. The same references and paths I am able to add to other projects but not this current one I am facing an issue with.

I have created a new solution and tried. it still doesn't work. However I would not want to create a new project file. Any suggestions or workarounds to solve this problem?

Your .csproj files might be "corrupted" somehow. I would create a new project file and then overwrite your existing project file so that it can be checked into TFS.

Create a new project and copy all of your source files into the folder. If you have folders use Visual Studio to re-create them. Use the show hidden button in Solution Explorer to show all the files. Now include the files by right clicking and selecting include in project (you can use Shift to select multiple files). Check your project properties and make sure you copy anything important.

I tried a few things-

I changed from community edition to professional edition 2015. the same problem persisted.

I created a new csproj file and added back the files manually. It got added fine. However I am pulling the references from a nuget packages folder and updating. if we have the wrong path to the nuget packages, even though we add the references, they were being shown as not referenced.

The nuget packages needed to be correctly mapped or else VS2K15 acts weird. So bottom line, because my nuget references were incorrect it was throwing these errors. I know This is very weird!!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM