MSBuild 15.0 (Visual Studio 2017) error MSB4067 for SSDT (SSRS and SSAS) projects: "The element <State> beneath element <Project> is unrecognized"

Update (October 2017)

The latest version of Microsoft Reporting Services Projects for Visual Studio (1.18) adds MSBuild support for SSRS projects. With this installed, SSRS projects can be updated to a format supported by MSBuild, which prevents this problem from happening.


Original Answer

This is a bug in MSBuild 15, labelled for fix in "foundation update 2".

A workaround as given in the GitHub issue thread by one of the MSBuild maintainers is:

Place a file with these contents next to your .sln file with the special name:

after.{yoursolutionname}.sln.targets

<Project InitialTargets="WorkAroundMSBuild2064">
 <Target Name="WorkAroundMSBuild2064">
  <!-- Work around https://github.com/Microsoft/msbuild/issues/2064 by
   removing *.rptproj from the generated solution metaproject. -->
  <ItemGroup>
   <ProjectReference Remove="%(ProjectReference.Identity)"
                 Condition="'@(ProjectReference->'%(Extension)')' == '.rptproj'" />
  </ItemGroup>
 </Target>
</Project>

This seems to work provided that there are no Project Dependencies from other .csproj projects to the .rptproj projects.