1

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. enter image description here

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 ------

enter image description here

Regards.

3
  • Hi friend, any update for this issue? Please let me know if it solves your issue. And if you have any discovery or solution you can share it as an answer :) Commented Jul 22, 2019 at 1:29
  • Yeah Sure friend. Commented Jul 22, 2019 at 9:29
  • @LanceLi-MSFT The below first answer is working for the issue, and my problem was solved with this. Commented Jul 22, 2019 at 13:25

2 Answers 2

3

Have reproduced same issue in my machine. And resolve it by workaround from it3xl.

  1. Create a Text Document file in desktop and copy the content from this xx.bat file into it. (for professional editon)

  2. Save and rename the text document from xx.txt to Test.bat

  3. Double click the Test.bat file, then this issue goes away when i rebuild them by devenv command.

Hope it helps.

Sign up to request clarification or add additional context in comments.

1 Comment

Yeah! it's working fine .msi file was generated successfully, Thanks
1

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
%}}%

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.