Visual Studio warning: “Some of the properties ass

2019-01-21 01:12发布

When I open my solution, I get a dialog with this warning. The solution (one web app, one class project) builds without errors.

How can I determine what properties are causing the problem, and resolve the error?

14条回答
beautiful°
2楼-- · 2019-01-21 01:29

The best solution is to force the VS to regenerate the configs. To do this:

  1. Open the sln file with some text editor.
  2. Scroll down till you reach the last "End Project" element.
  3. Delete everything after that.
  4. Save, Close and rebuild the solution and everything will be regenerated.
查看更多
\"骚年 ilove
3楼-- · 2019-01-21 01:34

Seems like there is a number of reasons for this warning. I was getting it because my solution file SccNumberOfProjects = 4 when there was only 3.

查看更多
Explosion°爆炸
4楼-- · 2019-01-21 01:37

The other answers already explain how to fix the problem. Maybe I can help to not get the problem again:

How I got the problem Our solution file got mixed up when I added a new project to it, while another developer also added a new project and committed his changes (which I didn't got at my local system). When I started to commit my changes, I had to merge the .sln file, where I obviously messed up :-)

What I learned

Solution files are awful to merge. If you add a project do the following: 1. Get latest Version 2. Add your project 3. Commit

If you see your solution file under pending changes, but you don't see a change in the compare mode, you have to press 'Save All'. While adding your new project, VisualStudio also altered the solution. However, this is an unsaved change at the moment.

查看更多
Animai°情兽
5楼-- · 2019-01-21 01:39

I had the same problem, and my solution is:

  1. Open the solution in VS
  2. Set the Solution Platform to Default
  3. Save it
  4. Close the VS
  5. Open the .sln file in Notepad++ (or any other editor)
  6. Delete all of the other Solution Platform item from everywhere
  7. (for example:{73E03C8F-1F76-45E2-9D45-FA040A63F0AA}.Release|Any CPU.Build.0 = Release|Any CPU)
  8. Save it, and reopen the solution.

This works for me.

查看更多
混吃等死
6楼-- · 2019-01-21 01:41

I had a multitude of the errors above. I renamed the project, saved closed, reopened changed the name back. This recreates the .sln file and in my case took out all the extra items.

查看更多
迷人小祖宗
7楼-- · 2019-01-21 01:41

i fixed similar problem in vs2012.

in my case the problem was that the SccProjectName0 property value inside GlobalSection in the MySolutionName.sln file was empty.

i solved it by setting SccProjectName0 value with copy of this string value from another solution, and replacing the name of the project in the string to the current one (BTW - if your project name as space in it (' '), it need to replace with '\u0020').

*

in my case the problem begin after i mistakenly opened solution controlled by TFS with old MySolutionName.sln file of the same solution from time that this solution was controlled by VSS.

查看更多
登录 后发表回答