I'm new to coding. I have Visual Studio 2019 and am doing tutorials to learn.
The command prompt is: C:\Program Files (x86)\Microsoft Visual Studio\2019\community> . When I try to go to a file, my entire community folder appears. How can I set the path to something else that allows me to go to the file I want? Example: mkdir projects>cd projects>mkdir helloworld>cd helloworld>code .
I tried a couple times with no change.
How are you starting your VS 2019? After you install it, you should have a item "Visual Studio 2019" with a purple icon next to it. It is below where you have the developer prompt. After you have made your directory, use that to start VS.
Click on "Create a new project". On the next screen, you specify you want to create a C/C++ console application or whatever. On the following screen, you can specify whatever directory where want your solution to be.
If this answers your question, click the check mark to the left of this answer to indicate the problem has been solved.
Related
I've been working on trying to figure out why our auto-generated deploy.cmdscripts will not work when installed to C:\Program Files (x86)\OurProgram. I finally narrowed down the issue to the closing parenthesis in (x86) as the script would terminate with "Files was unexpected at this time". One possible solution was to manually create another batch file to set _DeploySetParametersFile to a Windows path ( C:\Program^ Files^ (x86^)\OurProgram\Program.Parameters.xml). This isn't a valid solution for me, so I dug into the auto generated file and found the issue to be 2 variables:
RootPath
_DeploySetParametersFile
Both of which were referenced using %'s(i.e. %RootPath%), however as soon as they were changed to !'s(i.e. !RootPath!), no 2nd script was needed and I can run the cmd script from Program Files (x86) just fine. The issue of course with this is, the deploy.cmd file is auto-generated on each build, thus I have to change it for each build I do. My question is this: Is there a way to edit the template Visual Studio uses to generate the deploy.cmd file? If so, where? It seems so ridiculous that Microsoft would have this be an issue in their web deployment.
I have a pretty annoying problem and I am not getting the right thing to do. Whenever I try to 'Restore Packages' by right clicking the file 'package.json' in Visual Studio 2015 I get:
npm command completed with exit code 1
and nothing gets installed in my project.
I have a screen shot of the error I get you may see that:
To avoid such type of issue you can do following things
1- Goto Tools>Options
2- Click 'Projects & Solutions' Tab and go to 'External Web Tools'.
3- Add a new entry of your local node.js installation eg c:/programms/nodejs/(if not exist) and move it to the top of the list.
4- Restart Visual Studio and restore packages.
That will work if npm version is at least 3.x.x.
I recently started adding Post-Build events to my projects and today I came across an annoying issue.
Post-build event command line:
"$(ProjectDir)PostBuildRelease.bat"
PostBuildRelease.bat - 1
CMD
SET parameter=%1
CD %1
The above errors with message:
'´╗┐CMD' is not recognized as an internal or external command,
operable program or batch file.
"Saved parameter "
Which is strange, because I definitely have another project where the first line reads CMD and it works perfectly.
Setting the first line to SET parameter=%1 also complains that SET is not a recognised command.
PostBuildRelease.bat - 2
Trying the same but with an empty file gives this error (build fails):
The command "C:\Users\name\ITSelfHelp\ITHelp\PostBuildRelease.bat" exited with code 1.
PostBuildRelease - 3
Entering the CMD code directly into the Post-Build Event command line field results in a successful post-build event, but this is not ideal for me and seems strange as I can run from an external .bat in other projects.
Can anyone explain this behaviour, or let me know how I can debug this?
It turns out the text editor in Visual Studio was encoding my batch script.
To recreate this:
Right-click the solution
Add file
Text file
Rename file.bat
Write the script in Visual Studio
Build
Check the output window for the error
To resolve:
Delete the file created in Visual Studio
Created a new .bat file in the same location using Windows Explorer
Open the file with Notepad++ and paste in the script
Save and build
I also noticed that syntax highlighting was not being applying in the file created by Visual Studio, which is a bit of a giveaway along with the ´╗┐ in front of the errors.
I am trying to use the SketchFlow Template for Windows Phone (http://wp7sketchflow.codeplex.com) with Blend for Visual Studio 2013 and when I try to create a project with the template I get this error:
New Project failed. Could not find file "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Blend
Preview\ProjectTemplates\en\CSharp\WindowsPhone\WindowsPhone\csWindowsPhonePrototype.zip[ControlLibrary\AssemblyInfo.cs].
I have looked inside the directory and the file does file exist. Does anyone have a solution? The only other stuff I found is http://wp7sketchflow.codeplex.com/discussions/429011.
Thanks,
I've also posted to that thread with a solution. Which I will also add here.
I've posted a fix for using this template with SketchFlow that ships in Blend/VS2013 (may work in 2012 but I didn't test).
Please read my instructions I've tried to be a clear as possible.
You WILL need to download and install the SketchFlowWP7.zip file from this codeplex (I also provide a copy in the link below).
Extract SketchFlowWP7.zip and run the SketchFlowWP7.msi to install.
When it prompts where to install choose the path to your copy of Blend. For instance for VS2013 it's default path is "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Blend"
Next you will need to navigate down into the following folder "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Blend\ProjectTemplates\en\CSharp\WindowsPhone"
Here you will find a file names csWindowsPhonePrototype.zip, delete it. Yes really delete it, you are going to be replacing it's contents in the next steps.
Download the csWindowsPhonePrototype.zip from the following linkg - http://sdrv.ms/1hED9Cm
Extract the contents of csWindowsPhonePrototype.zip and you will have a folder called csWindowsPhonePrototype
Move the extracted folder into the "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Blend\ProjectTemplates\en\CSharp\WindowsPhone" directory. PLEASE make sure that you don't have a folder called csWindowsPhonePrototype inside of it, if you do it's that child folder you need to move.
Now when you fire up Blend you should see an option for SketchFlow for Windows Phone.
all!
There are many vc projects in my solution. i can call devenv.exe xxx.sln to build/rebuild all these projects together. Also i can right-click some specific project and rebuild it.
My question: how to do the same thing of "right-click and rebuild" when i use devenv.exe ?
I want to rebuild the same project with different building macro --- setting "PreprocessorDefinitions" in .vcproj
another question: is there a simple way to replace the value of PreprocessorDefinitions in the .vcproj? im now using the python to do this.
devenv has the command line option /command to run a command on start up: could this be used?
Devenv Command Line Switches