How do I create a batch file that supports an older version of Visual Studio - visual-studio

I have been building Smart Device application on Visual Studio 2008 and have been using a batch file to do so.
This has been working until I have installed Visual Studio 2015 and I wanted to still build and debug the solution via Visual Studio 2008 because Visual Studio 2015 doesn't support Smart Device development. However, using the same batch file I can no longer do so.
I am looking for a way to be able to target the devenv of the older version of Visual Studio for the batch file without uninstalling Visual Studio 2015, because I too have projects built on that version.
NOTE: I can run Visual Studio 2008 perfectly fine and using their on-click build tool it builds fine.

The batch file is probably picking up environment variables (INCLUDE, LIB etc) set up by VS 2015, which the 2008 toolset will not work with.
The Visual Studio 2008 menu should have a Visual Studio Tools submenu. Run Visual Studio 2008 Command Prompt from that submenu, which will open a cmd console with the VS 2008 environment set correctly. Run your batch file at that prompt.
You can automate it by writing a small batch file to first execute vcvarsall.bat (which is what the menu command does), then run your batch.
#call "<path-to-vs2008-install-directory>\vcvarsall.bat" x86
#call "<your-batch.bat>"

Related

Cannot set parameters or run program in visual studio 2022

I recently installed visual studio 2022 to use as a secondary IDE for monogame specifically, but I cannot run the project nor set which CPU to use
Here is an image of what I can see when I'm in visual studio, is this simply a missing part of my visual studio installation or is it more complex?
In case it helps, I'm not signed in.

Visual Studio 2012 PowerShell project

We are using PowerShell for provisioning/configuration/patching of virtual machines on the Windows Azure platform. Are there any project templates available to manage PowerShell projects in Visual Studio 2012 through which I can manage these scripts?
I would like to be able to create
PowerShell project with-in VS 2012 and add script files to it
Have basic syntax-coloring and highlighting (good to have intellisense).
Manage scripts using source control
I have found this visual studio extension PowerGUI VSX but it works only for VS 2010.
Updated [09/25/2013] : Found PowerShell Tools for Visual Studio. It provides all the features mentioned above for working with PowerShell Projects in VS 2012
PowerShell doesn't get much Visual Studio love. How about the PowerShell ISE, PowerGUI, or PowerShell Plus?
Of the three, the last is the only one with any source control integration.
There is another component in the Microsoft gallery for PowerShell integration in Visual Studio 2012; PowerShell Tools for Visual Studio 2012.

Is the "xsd" command not supported in Visual Studio 2012 command window?

I've read that it is possible to run xsd commands right in visual studio (2010). I have VS 2012 on my machine and when I run
xsd XMLFile.xml
I get
Command "xsd" is not valid.
So, is the "xsd" command not supposted in VS 2012 and is there any other way to execute "xsd" in VS 2012?
xsd.exe is available from the 'Developer Command Prompt for VS2012, not the command window that is part of the VS2012 IDE.
The 'Developer Command Prompt for VS2012' itself can be started from Start Menu -> All Programs -> Microsoft Visual Studio 2012 -> Visual Studio Tools -> Visual Studio Command Prompt For VS2012
Under Visual Studio 2012, there is a feature called Past Special
which generate the class from an xml file.
See here: Paste XML or JSON as classes in Visual Studio.
Note that this feature requires at least .NET 4.5.
How to bring up the Visual Studio Command Prompt:
They say a picture is worth a thousand words (Works for Visual Studio 2017 - Community Edition / Windows 10):
Bring up the Visual Studio Command prompt.
Now run the XSD command against the relevant XML file.
It's as easy as that!

VS2010 doesn't appear in my apps windows 8

Mine is a Windows 8 machine. I installed Visual Studio 2012, then went to Microsoft SQL Server 2012. Later I was told to install Visual Studio 2010.
The first two installs worked great. Got all the neat icons and everything is good. MSVS2010 SP1 got installed successfully.
Now the third install of Visual Studio 2010 is where I am stuck.
I am downloading it from a Microsoft licensed CD. No errors during installation, but it is only installing Microsoft Visual Studio command prompt, X64 Win64 command prompt and Microsoft Visual Studio 2010 documentation. Nothing else. So basically I dunno where to start to fire up the program.
So I went to C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7, C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7 to find the devenv.exe. Couldn't find in either of the locations.
Then went to Run and typed devenv.exe, boom VS2010 opens. So I did a Apps search on Windows 8. When I type devenv.exe the only thing I could find there is SQL Server data tools which has a VS2010 icon. Double click this and VS 2010 opens. So my guess is SQL server 2012 needs VS2010 and installed it.
Questions:
Where is devenv.exe?
Why isn't it installing the rest of the stuff?
How do I start VS2010?
I don't think double clicking on sql server data tools is the correct way. I want VS2010 to appear in my Apps just like any other application. This could be a rather silly question. I did a lot of research and am kinda confused with all these parameters.
In Windows 8, if you search for "Visual Studio" in "Start" screen you won't find VS 2010. Instead search for "devenv", it appears.
Searching for "SQL server data tools" also will work.
In 64bit machines, you can find 2010 in
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
Create a Desktop short cut.
Uninstalling and re installing Visual Studios is not required for the Visual Studio 2010 icon to show up on Windows 8.The Visual Studio 2010 icon is located at C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv. You can add this icon to your task bar or windows desktop and launch Visual Studio 2010. There are two devenv icons in that folder location just select latest one you can find that out by looking at the file properties. The folder path I mentioned above will be different for 64 bit windows machines.
For some reason Visual Studio 2010 did not completely load for me, although it said it did. So I went into its folder and selected the setup.exe to run maintenance mode. There I re-installed it. It asked me (this time) to restart my laptop. I did that. Then I was prompted to update it using the service pack 1 update, via the given link. Then it was ok.
There are two ways to view:
In Win8 or Win8.1 search for "devenv.exe" name it appear and create shortcut in desktop.
Go to this address on your computer:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe
and create a shortcut for this file on your desktop.
You have two options here
in windows 8.0 or 8.1 go to run and type'devenv' and then the Visual studio opens up for you.
Else search using the app name and select 'Microsoft Visual studio' from the list of apps installed, right click on the app and select the option 'pin to the start' or 'pin to the task bar'. This creates short cut with the icon of the app handy.

Visual Studio 2010 configuration

I have a Windows 32-bit project designed in Visual Studio 2010 using C++. When I build and compile it on one computer, I get the GUI and the project works. However, on a different computer it only shows me a command prompt and then exits. What configuration changes do I need to make to see the GUI on this computer?

Resources