Visual Studio error on command "attrib -r" on a dataset file - visual-studio-2012

I have downloaded a solution with multiple projects from TFS and getting 2 errors on building it.
error 1:
The command "attrib -r c:\web\idpm45\benchmarkloader\benchmarkloader\dataset\benchmarkimportdataset.cs /s
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\xsd.exe" /d /l:CS /namespace:BenchmarkLoader c:\web\idpm45\benchmarkloader\benchmarkloader\dataset\BenchmarkImportDataset.xsd /out:"c:\web\idpm45\BenchmarkLoader\benchmarkloader\dataset"
" exited with code 1.
error 2:
There was an error processing 'c:\web\idpm45\benchmarkloader\benchmarkloader\dataset\BenchmarkImportDataset.xsd'
Has anyone faced this attrib command errors?

Related

Could not find fsi.exe. Attempting to resolve fsi.exe in PATH

I am new to Azure Pibelines, but try to learn it. It seems very powerfull.
Have got at .netcore31 project who works/compiles fine with 'agent specification' "windows-2019", but when I update to .net6 and "windows-2022" or "windows-latest" I got the subtitle error "Could not find fsi.exe. Attempting to resolve fsi.exe in PATH".
Have read Missing FSI.exe from F# pipeline (sometimes) and others, but ... maybe I miss ssome basic informations.
The Pibeline has step for NuGet 5.4.0, NuGet rastore, and build solutionXXX.
The solution works fine on my own machine with VS2022, and in the pibeling with VS2019. Know that fsi.exe has another path, 19<>22, but ... do I have to set that path myselves (how) on a Azure Pibeline?
VS19: c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools\fsi.exe
VS22: c:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools\fsi.exe
Other helps are velcome (?), thanks a lot.
I use the following in local using the command line as an administrator and it could be added successfully:
setx /M path "%Path%;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools"
So could you kindly try to add a task before the failed build task for a try:
Here is the script for your reference.
steps:
- script: 'setx /M path "%Path%;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools"'
displayName: 'Command Line Script'

Getting error while executing an exe file. "Reason: The System can't find the file specified"

I have converted the test.bat file to test.exe using iexpresstool in windows.When i run the test.exe file. I am getting error saying
Error Creating process<command.com /c
c:\Users\Vamsi\AppData\Local\Temp\4\IXP000.TMP\test.bat>.
Reason:The system cannot find the file specified
When i run test.bat it is working fine.
The reason for the error is while generating exe using iexpress.
In Iexpress Wizard
goto - Install Program To Launch page
at Install Program tab - type as cmd /c "test.bat" instead of just selecting test.bat from drop down

VC++ 2017 Could not find VC++ tools version "14.16.27023"

I've installed Visual 2017 C++ build tools. I am attempting to run vsdevcmd to prepare the environment. But, I am getting an error stating VC++ tools are not installed when they infact are.
Below is the error I am getting:
[DEBUG:vcvars.bat] Could not find VC++ tools version "14.16.27023" under "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\".
[DEBUG:ext\vcvars.bat] init:COMPLETE
[DEBUG:core\vsdevcmd_end] initializing with arguments ''
[ERROR:VsDevCmd.bat] *** VsDevCmd.bat encountered errors. Environment may be incomplete and/or incorrect. ***
[ERROR:VsDevCmd.bat] In an uninitialized command prompt, please 'set VSCMD_DEBUG=[value]' and then re-run
[ERROR:VsDevCmd.bat] vsdevcmd.bat [args] for additional details.
[ERROR:VsDevCmd.bat] Where [value] is:
[ERROR:VsDevCmd.bat] 1 : basic debug logging
[ERROR:VsDevCmd.bat] 2 : detailed debug logging
[ERROR:VsDevCmd.bat] 3 : trace level logging. Redirection of output to a file when using this level is recommended.
[ERROR:VsDevCmd.bat] Example: set VSCMD_DEBUG=3
[ERROR:VsDevCmd.bat] vsdevcmd.bat > vsdevcmd.trace.txt 2>&1
[DEBUG:VsDevCmd] Writing post-execution environment to C:\Users\KRAFTW~1\AppData\Local\Temp\dd_vsdevcmd15_env.log
[DEBUG:VsDevCmd.bat] --------------------- VS Developer Command Prompt Environment [post-init] ---------------------
Here's the level 3 error reporting of that specific error:
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC>if exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\" (
set "VCToolsInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\"
set "VCToolsVersion=14.16.27023"
) else (
set VCToolsInstallDir=
if "3" GEQ "2"
goto :end
)
[DEBUG:vcvars.bat] Could not find VC++ tools version "14.16.27023" under "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\".
That directory exists because I copied and pasted the path and was able to change into that directory. Using explorer I can also see that exact version does exist, and within it all the expected tools (as can be seen in the image below)
Any ideas what the problem could be?
Edit
As Hans pointed out in the comment there is wild character at the beginning of the filename 14.16.27023.
According to the output it's loading the path from here: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC>set "__VCVARS_DEFAULT_CONFIG_FILE=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"
I've inspected this file and it contains the following (no odd character):
Also viewed with a hex editor and there's nothing there:
I inspected the vcdevcmd.bat file and it's failing at this:
#REM *****************************************************************
#REM This section executes all .bat files found in vsdevcmd\ext.
#REM Any "leaf node" script should be placed in this directory.
#REM A few notes:
#REM * For determinism sake, the scripts are called in alphabetical
#REM order.
#REM * This section does NOT recursively look in sub-directories
#REM under vsdevcmd\ext. Sub-directories may be used for
#REM "implementation detail" scripts called by .bat files in the
#REM vsdevcmd\ext folder.
#REM *****************************************************************
#REM Iterate through ext scripts
if NOT EXIST "%VS150COMNTOOLS%vsdevcmd\ext\" (
#echo [ERROR:%~nx0] Cannot find 'ext' folder "%VS150COMNTOOLS%vsdevcmd\ext\"
set /A __vscmd_vsdevcmd_errcount=__vscmd_vsdevcmd_errcount+1
goto :ext_end
)
for /F %%a in ( 'dir "%VS150COMNTOOLS%vsdevcmd\ext\*.bat" /b /a-d-h /on' ) do (
call :call_script_helper ext\%%a
)
:ext_end
set __vscmd_dir_cmd_opt=
exit /B 0
with the error:
'"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\vsdevcmd\ext\"' is not recognized as an internal or external command,
operable program or batch file.
[ERROR:ext\] init:FAILED code:1
Now I'm not even sure if these 2 errors are related but both appear in the logs. I have attempted complete removed of VS and all of it's products. I've reinstalled with a fresh installer, to no avail.
Thing is, I had this working initially.
Edit 2
Ok, here is the problem with being unable to load VC++ tools (from vcvars.bat):
:export_env_vctoolsinstalldir
if exist "%VCINSTALLDIR%Tools\MSVC\%__VCVARS_TOOLS_VERSION%\" (
set "VCToolsInstallDir=%VCINSTALLDIR%Tools\MSVC\%__VCVARS_TOOLS_VERSION%\"
set "VCToolsVersion=%__VCVARS_TOOLS_VERSION%"
) else (
set VCToolsInstallDir=
if "%VSCMD_DEBUG%" GEQ "2" #echo [DEBUG:%~nx0] Could not find VC++ tools version "%__VCVARS_TOOLS_VERSION%" under "%VCINSTALLDIR%Tools\MSVC\".
goto :end
)
I can't find any env. variables set for __VCVARS_TOOLS_VERSION or VCVARS_TOOLS_VERSION. If I could set that, maybe I can get it to work.
Found this at the head of the same file:
if "%__VCVARS_VERSION%" NEQ "" (
set __VCVARS_TOOLS_VERSION=%__VCVARS_VERSION%
goto :export_env_vctoolsinstalldir
)
I attempted to set that variable and rerun vcdevcmd but it still failed:
set __VCVARS_VERSION=14.16.27023
Also tried:
vsdevcmd -arch=amd64 -host_arch=amd64 -vcvars_ver=14.16.27023
That produces the error:
[DEBUG:vcvars.bat] Checking architecture { host , tgt } : { x86 , x86 }
[DEBUG:vcvars.bat] Could not add directory to PATH: "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCPackages"
[DEBUG:vcvars.bat] Could not find VC++ tools version "14.16.27023" under "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\".
[DEBUG:ext\vcvars.bat] init:COMPLETE

Testing Pre-Built Command Event

Is there anyway I can test pre-built event command line, from visual studio command prompt or from any other tool?
I have this event
REM C:\Program Files\TortoiseSVN\bin\SubWCRev.exe $(SolutionDir). $(SolutionDir)\mynamespace\Release.tmpl $(SolutionDir)\mynamespace\Release.txt
But it does not seems to work (Nothing happens). I also tried to execute this command from simple comand prompt, still without success. any help would be great.
However, if I remove the REM from the front, I get the following error message (as mentioned by #Giorgi):
The command "C:\Program Files\TortoiseSVN\bin\SubWCRev.exe
"C:\Projects\GUI\RTS\Development."
"C:\Projects\GUI\RTS\Development\mynamespace\Release.tmpl"
"C:\Projects\GUI\RTS\Development\mynamespace\Release.txt""
exited with code 9009.
You have REM there.
It means that the line is a comment.
Try deleting REM.
Change
REM C:\Program Files\TortoiseSVN\bin\SubWCRev.exe $(SolutionDir). $(SolutionDir)\mynamespace\Release.tmpl $(SolutionDir)\mynamespace\Release.txt
to
C:\Program Files\TortoiseSVN\bin\SubWCRev.exe $(SolutionDir). $(SolutionDir)\mynamespace\Release.tmpl $(SolutionDir)\mynamespace\Release.txt

wxwidget 2.9.1 compiling at visual c++, error MSB 3073: The command xcopy

Hallo,
Im trying to compile wxwidget 2.9.1 in Visual c++ 2010, every time i try there appear this error:
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(103,5): error MSB3073: The Command "xcopy ....\include\wx\msw\setup.h ....\lib\vc_dll\mswu\wx\ /Y
22>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(103,5): error MSB3073: :VCEnd" ended with code 4.
Is there anyone who can help me out, t tried many things but no chance, at the wiki widgets there is a tip how to do, but it doesnt work at all. Im very pleasureful if someone can help me out.Thanks
The build is trying to copy the file setup.h to a different directory. Specifically from folder \include\wx\msw\setup.h to \lib\vc_dll\mswu\wx. Try doing this manually, and solve any problems that arise.

Resources