dotnet / msbuild

The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
https://docs.microsoft.com/visualstudio/msbuild/msbuild
MIT License
5.21k stars 1.35k forks source link

error MSB4067: The eleme nt <DeploymentModel> beneath element <Project> is unrecognized. #3270

Open fenngineering opened 6 years ago

fenngineering commented 6 years ago

When using MSBuild 15.0, cleaning or building a solution which contains dtproj projects gives the following error:

Packages.dtproj(3,3): error MSB4067: The element beneath element is unrecognized.

When using MSBuild 14.0, the behaviour is better: it logs warnings (MSB4078) about unsupported projects:

warning MSB4078: The project file "Packages.dtproj" is not supported by MSBuild and cannot be built.

The latter behaviour is more desirable (for me, at least): I would like to able to build a solution in a configuration which includes the .dtproj files. This would allow me to include these projects when building the solution in Visual Studio, and to be able to use the same configuration when building the solution via an MSBuild script.

Is this change of behaviour a bug? The message certainly seems like it is attempting to parse the dtproj file into some structure to which it doesn't belong. If it is not, is there a way to downgrade the error MSB4067 to a warning, or to skip certain projects when building a solution? The /ignoreprojectextensions:.dtproj option does not prevent the error.

benjiadell commented 6 years ago

Any update on this? I need it because is failing to compile in our Private Agent and we don't know how to solve this!

kDipak commented 6 years ago

Running into this same issue with a mixed solution file with a dtproj project in it.

dtproj(3,3): Error MSB4067: The element DeploymentModel beneath element Project is unrecognized.

Shriram-A-R commented 5 years ago

Is this issue still open? I am getting this error with my dtproj while using Hosted Agent VS 2017 even today!

dasMulli commented 5 years ago

You can only build MSBuild based projects using msbuild. This integration services project types is still a non-MSBuild based visual studio project type and thus only builds using devenv.exe /Build / devenv.com.

icnocop commented 5 years ago

See this issue and comment for workarounds: https://github.com/Microsoft/msbuild/issues/2064#issuecomment-315875143

StingyJack commented 5 years ago

@dasMulli - getting this error on an Azure DevOps hosted VS 2017 build agent using a VS build task.

rdxshubham commented 5 years ago

Getting the same error on Azure DevOps hosted VS 2017 Build. Any other alternative to build the dtproj project.

StingyJack commented 4 years ago

And this is still happening with a AzDO hosted VS 2019 agent using a VS build task set to use VS Version "Latest"

ashamrai commented 1 year ago

Try to use the following tools: