while building my solution from commandline
msbuild "app1.Web.test.sln /target:package
I'm getting the below error
error:MSB4057 "The target not found in the project"
So I googled for a solution and found the below link which is similar to my scenario.
as per the solution provided in the link I tried the below command
msbuild app1.Web.test.sln /t:app1_Web_test:Package
and the below snippet saved in to my solution folder with the name before.app1.Web.test.sln.targets
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Target Name="app1_Web_test:WebPublish">
<MSBuild
Condition="'%(ProjectReference.Identity)' == '$(SolutionDir)app1.Web.test.sln'"
Projects="@(ProjectReference)"
Targets="package"
BuildInParallel="True"
ToolsVersion="4.0"
Properties="BuildingSolutionFile=true; CurrentSolutionConfigurationContents=$(CurrentSolutionConfigurationContents); SolutionDir=$(SolutionDir); SolutionExt=$(SolutionExt); SolutionFileName=$(SolutionFileName); SolutionName=$(SolutionName); SolutionPath=$(SolutionPath)"
SkipNonexistentProjects="%(ProjectReference.SkipNonexistentProjects)" />
But still the issue persists.
Can anybody figure out where it gone wrong?