Reputation: 243
I have a sample WPF project and I created a Setup project to it. Now I want to build the project and Setup project through the command line.
I tried with this
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe
C:\Users\nandh\source\repos\CommendApp\CommendApp\CommendApp.csproj
command for build the project file it is successfully worked.
Then use with
devenv /build Debug
"C:\Users\nandh\source\repos\CommendApp\CommendApp.sln" /project
"C:\Users\nandh\source\repos\CommendApp\App\App.vdproj" /projectconfig
Debug
for build the setup project it shows error.
------ Starting pre-build validation for project 'App' ------ ERROR: An error occurred while validating. HRESULT = '8000000A' ------ Pre-build validation for project 'App' completed ------
Regards.
Upvotes: 1
Views: 2270
Reputation: 659
Here is my build.bat script using Visual Studio Installer Projects Extension in Visual Studio 2022. Hope it helps someone.
@echo off
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
set "{{=setlocal enableDelayedExpansion&for %%a in (" & set "}}="::end::" ) do if "%%~a" neq "::end::" (set command=!command! %%a) else (call !command! & endlocal)"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
del build.log
%{{%
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.exe"
XXXX.sln
/out build.log
/build Release
/project XXX.Setup\XXX.Setup.vdproj
/projectconfig Release
%}}%
Upvotes: 1
Reputation: 28086
Have reproduced same issue in my machine. And resolve it by workaround from it3xl.
Create a Text Document file in desktop and copy the content from this xx.bat file into it. (for professional editon)
Save and rename the text document from xx.txt to Test.bat
Test.bat
file, then this issue goes away when i rebuild them by devenv
command.Hope it helps.
Upvotes: 3