I'm trying to figure out how to make MSBuild work so I can set up automated builds and would appreciate some help with this weird error.
I'm using Visual Studio 2013, and a Web Application project. The solution has 8 different class libraries. I've got several Publish Profiles set up for my web project, I've been using these for a few months and they work flawlessly.
Now I'm trying to use MSBuild to execute one of my Publish Profiles. This is the command I have at the moment:
MSBuild "C:\Projects\OD_CD_MIS\Release 6.10\Source\NCCDPHPMIS_Web_Build.sln"
/p:DeployOnBuild=true /p:PublishProfile="Dev Intranet"
This fails immediately with the following message:
Build started 6/10/2015 11:18:01. C:\Projects\OD_CD_MIS\Release 6.10\Source\NCCDPHPMIS_Web_Build.sln : Solution file error MSB5004: T he solution file has two projects named "NCCDPHPMIS_BLL".
Build FAILED.
C:\Projects\OD_CD_MIS\Release 6.10\Source\NCCDPHPMIS_Web_Build.sln : Solution file error MSB5004: The solution file has two projects named "NCCDPHPMIS_BLL".
0 Warning(s) 1 Error(s)
Time Elapsed 00:00:00.01
The first thing I checked for was two projects in the *.sln file with the same name and I don't see anything. I went as far as to create a new solution file and add all my project files to that and I'm getting the same error.
I don't see what I'm missing. Does anybody know what else could cause this error?
Thanks.
This is most likely some project naming issue in your solution file. Check for things like similar names except for punctuation like _ or .. There appears to be some behavior that will treat blah_something and blah.something as the same thing and report this error. Source