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'
Related
I just downloaded Python and Visual Studio. I'm trying to test the debugging feature for a simple "Hello World" script and I'm receiving this error:
Failed to launch the Python Process, please validate the path 'python'
followed by this in the debug console:
Error: spawn python ENOENT
Could someone please help me out and tell me how to fix this?
I'm running on windows 10.
Thanks!
Do not uninstall!
1) Go to location that you installed the program.
*example: C:\Program Files (x86)\Microsoft VS Code
copy the location.
2) right click on computer> properties >Advanced System Settings> Environment variables > under user variables find "path" click> edit> under variable value: go to the end of the line add ; then paste your location>ok > then go under system variables find "path"> do the same thing.... add ; then paste your location.
FOR EXAMPLE" ;C:\Program Files (x86)\Microsoft VS Code
3) Restart your Visual Studio Code
For those who are having this error after the recent (May-June of 2017) update of Visual Studio Code.
Your old launch.json file might be causing this issue, due to the recent updates of launch.json file format and structure.
Try to delete launch.json file in the .vscode folder. The .vscode folder exists in your workspace where your source code exists, not to be confused with the one in your user home folder (C:\Users\{username}\.vscode).
This workaround worked fine for me with Windows10 + Visual Studio Code + Python extension. Just delete the existing launch.json and restart Visual Studio Code, and then start your debugging. The launch.json file might be regenerated again, but this time it should be in the correct shape.
Simply restart your VB studio code. Those show that some packages have been downloaded but not yet installed until reboot it.
Add python path by following these steps.
1. Go to uninstall a program.
2. Go to Python 3.6.1 (this is my python version). Select and click on Uninstall/change.
3.Click on Modify.
4. Click next > In advanced options > tick add Python to environment variable. Click install. Restart VS code.
This fixed it for me. The launch.json file in the .vscode folder in your working directory NOT in your program files directory needs to be opened in the Visual Studio Code editor. Here you need to find the line (for me line 13) at the top that says "pythonPath": here you type "py" and make sure to save it!! Ctrl+S. It has something to do I think with the way it looks for python spelled "python" when it needs to be spelled as "py".
Here is the link where I found the info: https://paulpccodes.blogspot.com/2017/08/fixing-failed-to-launch-python-process.html
Figured it out, if you just started python then you probably did not add python to your path.
To do so uninstall python and then reinstall it. This time click "add python to path" at the bottom of the install screen.
Is there a way to launch Microsoft Visual Studio Code from the command line in windows? I can't even seem to find the directory for code on my computer. It didn't even ask me where to download it.
Navigate to the directory that you want to open and type code . to launch VS Code.
As many folks already suggested ways to open code from command prompt using code . command. This will only open Visual Studio Code Stable build. But If you have downloaded Visual Studio Code Insider build/version (Which has all latest build/features but unstable version) then you need to follow below instructions in windows :
Go to Control Panel\System and Security\System. Click on Advanced System Settings
Click on Environment Variables
Under System Variables tab, Click on Edit for Path Variable
Add a new path C:\Users\tsabu\AppData\Local\Programs\Microsoft VS Code Insiders\bin
(or)
C:\Program Files\Microsoft VS Code Insiders\bin based on location at which you have installed vscode insider in your machine.
Open a new command prompt and type code-insiders . to open vscode-insider
build/version
Short answer:
code your_path your_filename
Long answer:
Here your_path can simply be . if you want to use the current directory as your working path. Or .. for 1 level up, etc.
code is the name of the executable of Visual Studio Code (code.exe). If it doesn't launch, perhaps your VSC path hasn't been added to the path environment variable. Run this command to add it:
set PATH=";C:\Program Files\Microsoft VS Code\bin"
Of course you'll need to specify a different path if your VSC is installed somewhere else.
How can you find out the installation path? (click for screenshot) Go to "Start" menu, type in "Visual Studio Code", right click on the found program, "Properties", check "Target". Now you'll see!
It may come already added to your path when installed. Try using code <filename> in your command line. If it's not you can add the command line script's directory to your path. The command line script's directory is downloaded by default in the following location
C:\Users\<username>\AppData\Local\Code\bin
Point your command prompt to the specific folder that has the file that you want to open. Let's say you want to open the file titled main.scss. Simply run this command:
start code main.scss
If Visual Studio Code is already open, you can simply do:
code main.scss
I'm setting up our build server. I've installed Jenkins on a Windows 7 machine and am running into problems when building the 64 bit version of our solution.
We're using Visual Studio 2012 Express for Windows Desktop. Jenkins uses the MSBuild plugin and is targeting the 64 bit MSbuild exe at
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe
However, when it runs msbuild an evironment variable is not being parsed properly. VCTargetsPath.
If I leave everything as-is then the output of MSBuild is this
error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
I played around a bit with the VCTargetsPath variables in the registry, Windwos Environment Variables and as Jenkins Eviornment Variables too. I noticed this behavior.
If I set VCTargetsPath to be "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110" then the output of msbuild is the same as above. However, if I set it to "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0" then the output changes to this.
error MSB4019: The imported project "C:\progra~2\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
The tile Microsoft.Cpp.Default.props is found in "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110" I checked the limits on environment variable length and it's supposed to be 2048 characters. Am I missing something obvious here? I've found some info that basically says I am going to have to reinstall everything in a specific order, which is quite annoying (but also very Microsofty).
I fixed this by adding
/p:VCTargetsPath="C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V120"
or the more elegant
/p:VisualStudioVersion=12.0
into
Build > Build a Visual Studio project or solution using MSBuild > Command Line Arguments
Your first round of fix-it attempts for a build server.
Install the appropriate SDK on the build machine.
http://www.microsoft.com/en-us/download/details.aspx?id=8279
If that doesn't work, report back.
EDIT:
/p:VisualStudioVersion=11.0
Add that to your command line...as a parameter for msbuild.exe
EDIT:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe
I have a 64 bit version of msbuild.exe there.
Which isn't what you show.
I'm throwing a guess out, nothing concrete, FYI.
Try passing : /p:PlatformTarget=x86 as one of the arguments to MSBuild.
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.
Today is officially my first day with C++ :P
I've downloaded Visual C++ 2005 Express Edition and Microsoft Platform SDK for Windows Server 2003 SP1, because I want to get my hands on the open source Enso Project.
So, after installing scons I went to the console and tried to compile it using scons, but I got this error:
C:\oreyes\apps\enso\enso-read-only\src\platform\win32\Include\WinSdk.h(64) : fatal error C1083: Cannot open include file: 'Windows.h': No such file or directory
scons: *** [src\platform\win32\InputManager\AsyncEventProcessorRegistry.obj] Error 2
scons: building terminated because of errors.
After checking these links:
VS ans PSDK
Include tiffi.h
Wndows.h
I've managed to configure my installation like this:
And even run this script
And I managed to compile the file below in the IDE.
// Test.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <Windows.h>
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
But I still get that exception in the console. Does anyone have scons experience?
EDIT
Actually (and I forgot to tell you this) I started the command prompt with the link "Visual Studio 2005 Command Prompt".
I assume this will include the paths in environment variables. Well after printing them I find that it didn't:
echo %INCLUDE%
echo %LIB%
echo %PATH%
And they were not present, so I created this .bat file:
set PATH=%PATH%;"C:\Program Files\Microsoft Platform SDK\Bin"
set INCLUDE=%INCLUDE%;"C:\ Program Files\Microsoft Platform SDK\Include"
set LIB=%LIB%;"C:\ Program Files\Microsoft Platform SDK\Lib"
Still, scons seeems not to take the vars... :(
Using the above recommendations will not work with scons: scons does not import the user environment (PATH and other variables). The fundamental problem is that scons does not handle recent versions of SDKs/VS .
I am an occasional contributor to scons, and am working on this feature ATM. Hopefully, it will be included soon in scons, but the feature is much harder to implement reliably than I first expected, partly because every sdk/compiler combination is different (and sometimes even MS does not get it right, some of their .bat files are broken), so I can't give you a date. I hope it will be included in 1.2 (to be released in approximatively one month).
You need to set the include file path (and possibly other things). At the command line this is typically done using a batch file that Visual Studio installs called vsvars32.bat (or vcvars32.bat for compatibility with VC6).
I'm not familiar with scons so I don't know the best way to get these settings configured for that tool, but for standard makefiles there's usually a line in the makefile which sets a macro variable with the include directory path and that macro is used as part of a command line parameter in the command that invokes the compiler.
Another possibility might be to have the scons process invoke vsvars32.bat or run the scons script from a command line that has been configured with the batch file.
In short you need to get the things that vsvars32.bat configures into the scons configuration somehow.
There will be a batch file similar to this one (for MSVC 2005) that sets up the environment variables:
c:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat
Step 1: Find a similar file in the Express installation folders
Step 2: Create a shortcut on the desktop with these target details and a suitably modified path:
cmd.exe /K "c:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat"
Step 3: Open the DOS prompt via this shortcut
The command line build should now work from within this console window.
You show us how you configured Visual Studio for compilations within Visual Studio but you didn't show us what command line environment you tried. Sorry I haven't tried Express versions so I don't know if they create additional Start menu shortcuts like Pro and above do. If you open a suitable command prompt with its environment variables already set then you can compile on the command line. Otherwise you have to set variables yourself or execute a batch script to set them, each time you open a command prompt.
It'll be nice when scons does this automatically. For now, I use this (run from an SDK command prompt, not sure if there is a difference if run after vsvars32.bat):
import os
env = Environment(ENV={'PATH': os.environ['PATH']})
env['ENV']['TMP'] = os.environ['TMP']
env.AppendUnique(CPPPATH=os.environ['INCLUDE'].split(';'))
env.AppendUnique(LIBPATH=os.environ['LIB'].split(';'))
This works for me while compiling wxwidgets with Visual C++ 2005 Express using the command line prompt:
REM Fix Error error C1083 'windows.h'
(Use /useenv option when compiling.)
set PDSKWIN=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2
(Change to the right one.)
set INCLUDE=%PDSKWIN%\Include;%INCLUDE%
set LIB=%PDSKWIN%\Lib;%LIB%
Then I use this line when compiling. I believe just add /useenv to your lines and everything should work fine:
vcbuild /useenv /nohtmllog /nologo name.proj (or any file to compile)