More in this section
Forums / Developing with Sitefinity / Bug: SitefinityWebApp.csproj contains multiple "Import Project" lines.

Bug: SitefinityWebApp.csproj contains multiple "Import Project" lines.

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. David
    David avatar
    11 posts
    Registered:
    02 Apr 2013
    17 Mar 2016
    Link to this post

    When building a project in Visual Studio 2015 I get the following warning message :

    Warning     "C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.props" cannot be imported again. It was already imported at "E:\!Sitefinity\Projects\SubZero\SitefinityWebApp.csproj (3,3)". This is most likely a build authoring error. This subsequent import will be ignored.

    When I open the build file for the project "SitefinityWebApp.csproj" I notice it contains the following line  multiple times  
    <Import Project = "$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition = "Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />"

    Is this a known bug? 
    I've not determined the exact cause yet, but it happens even if the file has never been opened in Visual Studio. 

    The solution:

    1.  Ensure the project is not open in Visual Studio. 
    2. Open the file "SitefinityWebApp.csproj" in an editor (ie: notepad)
    3. Delete 2nd & any subsequent occurrences of the line mentioned above "Import Project ="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props ....."
  2. Brandon
    Brandon avatar
    0 posts
    Registered:
    28 Sep 2015
    13 Sep 2016 in reply to David
    Link to this post
    Thanks David, good catch.
2 posts, 0 answered