I saw many projects which always have built.bat which allow to build project without opening visual studio and it was mistery for me until now. In my team we have designer who can but dont need to open Visual Studio but needs to build project locally. So i have created simple bat file.
But it was not working even when we open VS on that machine it shows exceptions.
---------------------------
Microsoft Visual Studio
---------------------------
The imported project "PATH\*.wpp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets
---------------------------
ОК
---------------------------
<PropertyGroup>
<VSToolsPath Condition="$(SkipWebPublish) == '' Or $(SkipWebPublish) == '*Undefined*'">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
@echo off
reg.exe query "HKLM\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\12.0" /v MSBuildToolsPath > nul 2>&1
if ERRORLEVEL 1 goto MissingMSBuildRegistry
for /f "skip=2 tokens=2,*" %%A in ('reg.exe query "HKLM\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\12.0" /v MSBuildToolsPath') do SET MSBUILDDIR=%%B
IF NOT EXIST "%MSBUILDDIR%msbuild.exe" goto MissingMSBuildExe
"%MSBUILDDIR%msbuild.exe" /version
"%MSBUILDDIR%msbuild.exe" Source/SolutionName.sln /t:rebuild /p:configuration=Debug /p:Platform="Any CPU" /p:VisualStudioVersion=12.0 /p:SkipWebPublish=true
---------------------------
Microsoft Visual Studio
---------------------------
The imported project "PATH\*.wpp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets
---------------------------
ОК
---------------------------
<PropertyGroup>
<VSToolsPath Condition="$(SkipWebPublish) == '' Or $(SkipWebPublish) == '*Undefined*'">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
@echo off
reg.exe query "HKLM\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\12.0" /v MSBuildToolsPath > nul 2>&1
if ERRORLEVEL 1 goto MissingMSBuildRegistry
for /f "skip=2 tokens=2,*" %%A in ('reg.exe query "HKLM\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\12.0" /v MSBuildToolsPath') do SET MSBUILDDIR=%%B
IF NOT EXIST "%MSBUILDDIR%msbuild.exe" goto MissingMSBuildExe
"%MSBUILDDIR%msbuild.exe" /version
"%MSBUILDDIR%msbuild.exe" Source/SolutionName.sln /t:rebuild /p:configuration=Debug /p:Platform="Any CPU" /p:VisualStudioVersion=12.0 /p:SkipWebPublish=true
---------------------------
Microsoft Visual Studio
---------------------------
The imported project "PATH\*.wpp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets
---------------------------
ОК
---------------------------
<PropertyGroup>
<VSToolsPath Condition="$(SkipWebPublish) == '' Or $(SkipWebPublish) == '*Undefined*'">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
@echo off
reg.exe query "HKLM\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\12.0" /v MSBuildToolsPath > nul 2>&1
if ERRORLEVEL 1 goto MissingMSBuildRegistry
for /f "skip=2 tokens=2,*" %%A in ('reg.exe query "HKLM\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\12.0" /v MSBuildToolsPath') do SET MSBUILDDIR=%%B
IF NOT EXIST "%MSBUILDDIR%msbuild.exe" goto MissingMSBuildExe
"%MSBUILDDIR%msbuild.exe" /version
"%MSBUILDDIR%msbuild.exe" Source/SolutionName.sln /t:rebuild /p:configuration=Debug /p:Platform="Any CPU" /p:VisualStudioVersion=12.0 /p:SkipWebPublish=true
Melbourne, Australia
01 September 2015
---------------------------
Microsoft Visual Studio
---------------------------
The imported project "PATH\*.wpp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets
---------------------------
ОК
---------------------------
<PropertyGroup>
<VSToolsPath Condition="$(SkipWebPublish) == '' Or $(SkipWebPublish) == '*Undefined*'">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
@echo off
reg.exe query "HKLM\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\12.0" /v MSBuildToolsPath > nul 2>&1
if ERRORLEVEL 1 goto MissingMSBuildRegistry
for /f "skip=2 tokens=2,*" %%A in ('reg.exe query "HKLM\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\12.0" /v MSBuildToolsPath') do SET MSBUILDDIR=%%B
IF NOT EXIST "%MSBUILDDIR%msbuild.exe" goto MissingMSBuildExe
"%MSBUILDDIR%msbuild.exe" /version
"%MSBUILDDIR%msbuild.exe" Source/SolutionName.sln /t:rebuild /p:configuration=Debug /p:Platform="Any CPU" /p:VisualStudioVersion=12.0 /p:SkipWebPublish=true