what could be the possible reasons for this behavior?
According to the images you provided, I could reproduce this issue if I select the project file .csproj instead of solution file .sln in the Visual Studio build task:
That because if we select the project file .csproj
, there is a warning when we build the project:
Warning : The OutputPath property is not set for project 'ASP.NETMVC.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='release' Platform='any cpu'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project.
Although the result of the task is passed, the output is not output correctly due to the above warning.
That the reason why you build is successfully, but bin
folder is not generated.
To resolve this issue, we select the solution file in the Visual Studio Build task:
Then the warning disappeared, and bin
folder is generated:
Update:
when i select the solution instead of the csproj i got errors related
to the unsuccessful builds due to some missing references.
That because you just restore the one of packages.config file in the nuget restore task. You need to change it to the .sln
file instead of packages.config
file.
Besides, to resolve your previous issue, we could choose the .sln
file instead of the project file (I answered before.). Or you could change the default variable BuildPlatform from any cpu
to AnyCPU
(move the space).
Hope this helps.