element under the element is not recognized"...">

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

MSBuild 14.0 (the version included with Visual Studio 2015) warns logs (MSB4078) when creating a solution containing SSDT projects (rptproj or dwproj projects). For example:

warning MSB4078: the project file "Reports.rptproj" is not supported by MSBuild and cannot be created.

This is good, MSBuild does not support SSDT projects, and we must return to creating them using Visual Studio (i.e. devenv.com). See, for example, this answer .

When using MSBuild 15.0 (the version included with Visual Studio 2017), however, creating the same solution file gives the following error :

Reports.rptproj (3,3): error MSB4067: The <State> element under the <Project> element is not recognized.

Although I could remove the SSDT projects from the build configuration, this is not ideal since I want them to be created when building the solution from Visual Studio.

Is there a way to lower error MSB4067 to a warning or skip certain projects when building a solution?

+12
source share
2 answers

Update (October 2017)

Microsoft Reporting Services Visual Studio (1.18) MSBuild SSRS. SSRS , MSBuild, .


MSBuild 15, " 2".

, MSBuild GitHub:

.sln 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>

, .csproj .rptproj .

+11

/ignoreprojectextensions:.rptproj, ( VS2015), , , .

,

msbuild /t:myCsProj /t:mySqlProj /t:myOtherProjThatIsntaRptProj

, , , , "" .

MSBuild (, https://speaksql.wordpress.com/2013/06/07/a-journey-to-db-deployment-automaton-ssis-build-using-msbuild/).

" " , SSIS. , SSRS/SSAS .

0

Source: https://habr.com/ru/post/1016929/


All Articles