I'm new to Visual Studio on mac, can someone show where we can run a terminal window to execute some git commands?
Terminal window is not a part of the built-in tools within Visual Studio for Mac. There might be some add-ins or extension for this, but I am not aware.
However, there is a GUI Git tool called 'Version Control' which is integrated to VS, you can use it.
If you still want to use a terminal window, you can open a separate terminal window, outside of the VS. Alternatively there is an VS fro Mac add-in that allows you to open a terminal window (again outside of the VS) on any solution's dir.
UPDATE:
You can open any directory from Visual Studio for Mac in a terminal by right-clicking any project directory > Tools > Open in Terminal
In Mac VS2019, I found access to Terminal
under Solution navigation
Select your Project
Crl-Click (hold)
Navigate to Tool
Open in Terminal
It seems to work for me!
Visual Studion for Mac Previews now include a terminal as of April 2020
Tools->Show Terminal Window or crtl+`
https://devblogs.microsoft.com/visualstudio/meet-visual-studio-for-macs-new-integrated-terminal/#:~:text=%20Meet%20Visual%20Studio%20for%20Mac%E2%80%99s%20New%20Integrated,at%20any%20time.%20%20...%20%20More%20
Related
I run some mac build agents linked to TFS / DevOps Server. From time to time Visual Studio / Xamarin Studio gets some updates, I want to update Visual Studio via SSH or on via a local Terminal.
On windows I found an UI and Terminal (Command Line) approve:
https://learn.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio?view=vs-2017
I can do something like this on command line for Windows:
vs_enterprise.exe update --quiet
I found that How-To (which is UI-driven) for a Mac. This steps I do at the moment for every update on each build agent:
https://learn.microsoft.com/en-us/visualstudio/mac/update
I found that here on StackOverflow:
How to install Visual Studio for Mac from Terminal (Mac OS)
How can I update Visual Studio for Mac / Xamarin Studio from the Terminal? Is there a similar command-line tool like "vs_enterprise.exe update --quiet" from the windows world for macs?
Doesn't seem like there is anything built into Visual Studio to let you update from command line.
There is vstool in /Applications/Visual Studio.app/Contents/MacOS which seems to let you update add-ins from command line. But nothing that seems to update Visual Studio itself.
You could perhaps use a third party tool such as homebrew and let that update Visual Studio for you.
Install VS:
brew cask install visual-studio
Update casks later:
brew cask upgrade
Not sure if that helps you much though.
I have a visual studio project that generates an exe file. I can run this project from within Visual Studio Community for Mac simply by clicking Run for the Release or Debug configurations.
I need to be able to do this from the command line. I've tried using wine but it throws exceptions that I never see in VSC.
Thanks #Lex Li!
The solution is to open a terminal and run
mono <path to your app> <your app's arguments>
I want to create an IPA file for both the release and debug for my app created in xamarin. I created the release IPA file with the following command in Bamboo:
-v build -t:Build "-c:Release|iPhone" CustomerApp.sln
This can be replicated on the terminal too by doing this:
/path-to-/mdtool -v build -t:Build "-c:Release|iPhone" CustomerApp.sln
But when I try to use the "-c:Debug|iPhone" this will not create the ipa file, when trying to use the terminal or Bamboo. I then tried different configurations like "-c:Release|iPhoneSimulator", "-c:Debug|iPhoneSimulator", "-c:Ad Hoc|iPhone" and "-c:Debug|iPhoneSimulator" but all of these will not create the IPA file. Why is this?
I know that the path to mdtool and the solution are fine because it works for the Release IPA but is it to do with the configuration in either Xamarin or Xcode?
If you are on the same Mac as the one you are running Xamarin Studio, it should mimic the provisioning profile setup you have in the IDE. If the build in Xamarin Studio builds with that combination with no drop down change on the main project, I would expect the mdtool to work. Note that now in Visual Studio 2017 for Mac it will be vstool under the /Applications/Visual Studio.app folder.
My build line looks like this:
/Applications/Visual\ Studio.app/Contents/MacOS/vstool --verbose build --f --target:Build --configuration:"Debug|iPhone" --buildfile:my.sln > $BuildResults
Update January 2019, I have found very little guidance on the web about what exactly vstool can do and how to use it. I believe it to be the Microsoft version of the mdtool, which is part of the Monodevelop project at Github (mono/monodevelop). The mdtool source code is under monodevelop/main/src/tools folder. It appears to be a runner for a variety of tools available in the Monodevelop / Visual Studio installation. Running
/Applications/Visual\ Studio.app/Contents/MacOS/vstool -q
will list out the available tools. There is also a man page as part of the Monodevelop build process, at monodevelop/main/man which provides a bit more enlightenment. I was shown how to use the specific command by someone who was very familiar with the project.
So it appears that TFS Source Control Explorer in Visual Studio 2015 is missing an option available in Visual Studio 2013 - "Open in Windows Explorer" when right-clicking a folder. I've looked for this option in Tools > Options without success. Has anyone found a way to get this option back? (yes, I'm aware I can right-click a folder in Solution Explorer, but sometimes you're browsing a repository and it's a huge timesaver to have the option there).
This option is from Windows Shell Extensions of TFS Power Tools, so you need to install TFS Power Tools, then you'll see this option.
I converted VS2006 vc++ project to VS2008. When compiling I get the above error. How do i fix it? am I missing this exe ?
There is a bug in the Visual Studio 2008 Standard Edition installer. It does not install cl.exe if you only install Visual C++ but not Visual C#. To work around this you have to install Visual C# even if you do not need this.
cl.exe is VS2008 (and any other VS) C/C++ compiler, so check for more detailed error message why it cannot be spawned. Be sure you've installed C++ language support when installing VS2008.
It could be that your "path" environment variable does not contain the path to the folder where cl.exe is located.
Another possible reason could be that when installing VS2008, you did not select the option to install the Win32 tools (which include the command line compiler).
In any case, you may want to try to repair the installation of VS2008 (by running its setup via Control Panel - Add/Remove Programs), or use its "Add/Remove components" option and add the "Win32 tools" option (under Visual C++ - Visual C++ Tools).
I had this problem under Windows 10 and solved it by adding the following paths to the PATH environment variable:
C:\ProgramFilesC\VS2008\Common7\IDE
C:\ProgramFilesC\VS2008\VC\bin\x86_amd64
where C:\ProgramFilesC\VS2008 is the path where I installed Visual Studio.
Actually this error occurs because of path is not correctly set.
Goto Tools>Options>Directories> show directories for > Select Executable files
Here copy the path address from the folder where you installed and paste that path address
G:\Program files\vb (visual basic) 6.0\Visual Basic 6.0\VC98\BIN
then click OK.
This may work for you.