Phonegap Install for Visual Studio [duplicate] - visual-studio-2010

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Not Able To Install Apache Cordova for Windows Phone7
Im trying to install Phonegap for visual studio 2010.
I downloaded the skd and installed it. from this link
Windows Phone SDK
I downloaded the phonegap zip here http://phonegap.com/download
the next step says to "•copy the file CordovaStarter-x.x.x.zip to the folder : \My Documents\Visual Studio 2010\Templates\ProjectTemplates\"
The file i downloaded and extracted is phonegap-phonegap-2.1.0-0-g26d211b.zip.
I could not find any other zip file in all the directorys in that folder.
What am i missing or doing wrong?

It says you should download Cordova too.
http://docs.phonegap.com/en/2.1.0/guide_getting-started_windows-phone_index.md.html#Getting%20Started%20with%20Windows%20Phone

I read furhter on and saw that i needed to do this step to get that template installed.
2.1. Building the template :
( note, this step may not be required. If the lib\windows-phone directory already contains a file CordovaStarter-x.x.x.zip then you may skip this step ) - Open the file lib\windows-phone\templates\standalone\CordovaSolution.sln in Visual Studio Express for Windows Phone - From the file menu, select 'Export Template...' - Choose template type 'Project template' - Give the exported template a name, ex. CordovaStarter-2.1.0 will produce CordovaStarter-2.1.0.zip - Optionally, you may add a description, icon image, and Preview image. These are what is displayed in Visual Studio in the 'New Project' dialog.- - Note: If you select ( 'Automatically import the template ... ') then you will not need to copy the .zip file over as outlined in step 2. - Press 'Finish'

Related

Flutter windows build: Nuget is not installed

I uninstalled Visual Studio 2019 and installed it as 2022.
I reinstalled Flutter.
When building Flutter desktop, the following problem is repeated.
If I run it in another project, it works without any problem.
Launching lib\main.dart on Windows in debug mode...
Building Windows application...
Nuget is not installed.
Nuget.exe not found, trying to download or use cached version.
1- make sure you have installed Visual Studio
2-
NuGet Package Manager (PM UI and PM Console) is included with Visual
Studio. The latest NuGet releases are delivered as part of Visual
Studio updates.
HOWEVER: nuget.exe itself is not included with any version of Visual Studio.
so you need to download the latest NuGet Windows x86 Commandline from https://www.nuget.org/downloads
3- put it inside the flutter sdk folder or any folder you like
4- copy the folder path
5- in windows serach, search for env so you can put it as system variables. edit path with a new line and past the folder path
6- restart android studio
7- congrats
there's a video on youtube for the exact steps:
https://www.youtube.com/watch?v=J5b5sj6mG8M
Although I don't know why it would work without this error message on the same machine, I recently ran into this issue as well. The way I fixed it was to download the nuget executable and add it to my path.

Installing Visual Studio Installer Projects extension offline

The Microsoft Visual Studio Installer Projects web pag at VisualStudio Marketplace has a Download button for offline installation, but the resulting file is a compressed file InstallerProjects.zip which contains lots of different folders and files but no installation instructions. How do I install this extension?
Even though the file is called InstallerProjects.zip, it is actually a .vsix file and can be installed as explained in this answer:
There is an app called: VSIXInstaller.exe. Its exact location depends on which version of Visual Studio you are using; for me it is located at
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE
Right-clicked on the extension file > Open-With > Choose Default Program > More Options > Scroll down to 'Look for another app on this PC' > navigate to the location of VSIXInstaller.exe and select it.

Is there a way to change the extensions folder location for Visual Studio Code?

I've put Visual Studio Code on OneDrive, for the purpose of syncing it with its settings across my devices.
However, extensions are stored in %USERPROFILE%\.vscode\extensions on Windows.
Is it possible to change this folder's location so I can put it in the main Visual Studio Code folder?
At first I thought that copying the extensions in the resources\app\extensions of Visual Studio Code folder will be a nice workaround, but that doesn't work.
I've also searched for a solution on the documentation page and in the user settings, with no results.
What I did - after installing Visual Studio Code for the first time, I checked the documentation and added at the end of 'Target' field of editor's shortcut the following (there's a space before the two dashes):
--extensions-dir="DRIVELETTER:\VSCODE\extensions"
--user-data-dir="DRIVELETTER:\VSCODE\settings"
where DRIVERLETTER and VSCODE are the corresponding drive and directory where Visual Studio Code is installed. So mine looks like this:
"D:\Microsoft VS Code\Code.exe" --extensions-dir="D:\Microsoft VS Code\extensions"
Here is for the user data directory:
"D:\Microsoft VS Code\Code.exe" --user-data-dir="D:\Microsoft VS Code\settings"
Accessing the 'Target' field is done by right-clicking the shortcut and choosing 'Properties'
Anyway, there's a simpler solution to that problem - just use the portable version of Visual Studio Code. It works under Windows, Linux, and macOS:
Enable Portable Mode
Windows and Linux
After unzipping the Visual Studio Code download, simply create a data folder within Visual Studio Code's folder:
|- VSCode-win32-x64-1.25.0-insider
| |- Code.exe (or code executable)
| |- data
| |- ...
From then on, that folder will be used to contain all Visual Studio Code data, including session state, preferences, extensions, etc.
The data folder can be moved to other Visual Studio Code installations. This is useful for updating your portable Visual Studio Code version: simply move the data folder to a newer extracted version of Visual Studio Code.
macOS
On macOS, you need to place the data folder as a sibling of the application itself. Since the folder will be alongside the application, you need to name it specifically so that Code can find it. The default folder name is code-portable-data:
|- Visual Studio Code.app
|- code-portable-data
Portable mode won't work if your application is in quarantine, which happens by default if you just downloaded Visual Studio Code. Make sure you remove the quarantine attribute, if portable mode doesn't seem to work:
xattr -dr com.apple.quarantine Visual\ Studio\ Code.app
Note: On Insiders, the folder should be named code-insiders-portable-data.
UPDATE 14.12.2021
From Visual Studio Docs
Note: Do not attempt to configure portable mode on an installation from the Windows User or System installers. Portable mode is only supported on the Windows ZIP (.zip) archive. Note as well that the Windows ZIP archive does not support auto update.
A little hack:
Create a symbolic link to the folder %USERPROFILE%\.vscode\extensions under the Visual Studio Code install path.
https://code.visualstudio.com/docs/editor/extension-gallery
code --extensions-dir 'new_directory_to_set'
Set the root path for extensions.
Follow the below steps for changing the extension path in VS.
Set "code" path in environment variable.
path = VS_CODE_INSTALL_DIRECTORY/bin;
Open VS , in VS terminal execute the below command.
code --extensions-dir "new_directory_path"
Install the required extension.
All Done.
Note:Dont forget to vote the answer
According to this page, after installing VS Code we should make a language profilers folder like this:
mkdir code_profiles
cd code_profiles
mkdir code-ruby
cd code-ruby
mkdir exts
mkdir data
For Windows, I prepared a batch file (.bat) for each language I work on, it contains this line:
Start "" "D:\programs\VSCode\code.exe" --extensions-dir D:\programs\VSCode\code_profiles\code-python\exts --user-data-dir D:\programs\VSCode\code_profiles\code-python\data .
This is for Python. If I work on PHP, I will make code-php folder, then make exts and data folders in it and prepare another batch file for PHP, just like the one I made for python.
I put this batch file on the main project folder then double click on it to run VS Code with the preferred profile.

can't build old VS2010 project with VS2013. (build tool for VS2010 cannot be found.)

I have installed VS2013 on my computer about 2 years ago(and removed VS2010 I guess) and today I tried to open my old VS2010 project (MV1.sln) that I used to work with about 5 years ago.
When I tried to open it, it just says "more than one project in the solution was not loaded correctly. refer to the output window"(translated from Korean). The output window says
D:\My_Path\MV1\MV1.vcxproj : error : can't read project file "MV1.vcxproj"
D:\My_Path\MV1\MV1.vcxproj(34,5): can't find imported project "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA 4.0.props". Check if the path specified in <import> declaration is correct and file exists in the disk.
So I checked the MV1.vcxproj file's line 34 which reads
<Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 4.0.props" />
which seems to be correct path because the value $(VCTargetsPath) is being used before line 34 in the same file and I can easily guess it points to C:\Program Files (x86)\MSBuild (I can see Microsoft.Cpp.props folder and BuildCustomizations\CUDA 4.0.props file referred to in the .vcxproj file)
I had CUDA4.0.props file which specifies include path and library path for CUDA4.0 under C:\Program Files (x86)\Microsoft Visual Studio 10.0 (I kept those files there at that time) but copied it to the location specified in vcxproj file to make it appear there.
I found some similar questions and answers but they seem to be different from my case. What can be the most correct method other than making a new project and copying and specifying everything one-by-one?
I found the file name should have a space in 'CUDA 4.0.props' so I changed the file name(MSBuild/Microsoft.Cpp/V120/BuildCustomizations/CUDA 4.0.targets) , then it complained about CUDA 4.0.targets file missing, so I copied MSBuild/Microsoft.Cpp/v4.0/BuildCustomizations/CUDA 4.0.targets (it was there since 5 years ago) to MSBuild/Microsoft.Cpp/v4.0/V120/BuildCustomizations/CUDA 4.0.targets. Now I can see the files in the project browser but when I build the project, it says
error MSB8020: The build tools for Visual Studio 2010 (Platform
Toolset = 'v100') cannot be found. To build using the v100 build
tools, please install Visual Studio 2010 build tools. Alternatively,
you may upgrade to the current Visual Studio tools by selecting the
Project menu or right-click the solution, and then selecting "Upgrade
Solution...". C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets 64 5 MV1
But in my VS2013 I don't see such "Upgrade Solution" or upgrade menu. So I looked for method to change the toolset and found
Visual Studio 2013 error MS8020 Build tools v140 cannot be found and seleted VS2013 and it tries to build now.
(though I have fix some errors cannot link external symbol _CUDAInit.. etc.)

Installing Packages through Nuget - "Central Directory corrupt"

I'm trying to add a package to my project using NuGet (in VS2015). When I click the "Install" button I see
Downloading missing packages...
at the top of the screen with a progress bar.
After a moment the message is replaced with -
An error occurred while trying to restore packages: Central Directory corrupt.
with a "Restore" button at the end which does the same process.
Anyone have any idea how to fix this?
Edit 07/2017
A far easier method of solving this issue is be to just get Visual Studio to re-download the package -
In Visual Studio open Tools -> Options.
Select NuGet Package Manager.
Ensure both Allow NuGet to download missing packages and Automatically check for missing packages during build in Visual Studio are both ticked.
Click OK.
In a file explorer window navigate into the projects' "packages" folder.
Three options -
Figure out which package is at fault as described in the original answer and delete it's folder.
Move all the packages to a temporary location if you're unsure whether they're all still available in NuGet (you'll need to copy the missing ones back afterwards)
Delete all the package folders if you are sure all your packages are still available in NuGet.
Back in Visual Studio build your solution.
Visual Studio should download all your packages.
Original Answer
Ok, the problem here was that the .nupkg file for one package (found in project root/packges/package folder) had been corrupted at some point and had a size of zero.
I figured out which package was corrupt after attempting to manually install a random package using the package manager console -
Install-Package *package name*
which told me that there was a problem with a currently installed package -
Install-Package : An error occurred while retrieving package metadata for 'package name'....
From there I was able to fix it by doing the following -
Navigate to the to the NuGet site
Search for the project using the search facility at the top of the page
Download the .nupkg file using the "Download" link on the left hand side (checking the version number).
Copy the downloaded file over the old one in the "packages" folder.
Remove all nuget packages under \packages\ ( i had multiple corrupted packages)
Go to your solution in Visual Studio and press "Restore Nuget Packages"
Rebuild your solution
Should be fixed :)
1.First of all read the error.
2.Find the Directory listed on error console.
1.File Explorer ==>>
For Example, My Path is.
C:\Code\Ex_Nikesh\20\packages
In Packages Find Microsoft.SqlServer.Types.xx.xxx.xx.xx(xx indicates version number)
3.Inside the folder find Microsoft.SqlServer.Types.xx.xxx.xx.xx.nu(Nuget Package File [In My case file size is 0 KB])
Delete that File.
4.Now Download the File and Paste inside Microsoft.SqlServer.Types.xx.xxx.xx.xx Folder
Click Here for Download Nuget File
My problem was a corrupted zip file in the following folder:
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages
I cleared all these packages (offline repository)

Resources