Compiling VSTS Extension in VisualStudio 2017 - azure-devops

How to build a VSTS extension in Visual Studio 2017. The post build event configured in package.json doesn't work from Visual Studio.
Only the Command npm run build triggers the build and postbuild events. I want vsix file to be created on building the VisualStudio 2017 project.

We cannot build directly to generate the vsix file in VS. Just as you said we can only trigger the postbuild events to call the command tfx extension create --manifest-globs vss-extension.json to package it.
To create TFS/VSTS extensions, you can refer to this article for detials :Create your first extension with Visual Studio
To package as the vsix file, please see Packaging and publishing - Package
If you mean create Visual Studio VSIX Package, then you can reference below articles:
Creating Your First Visual Studio VSIX Package
Visual Studio Extensibility: Creating Visual Studio VSIX package
extension

Related

unreal engine development using vscode without vs2019, 2017

I'm wondering if I can make a C++ project in unreal engine without visual studio 2019, 2017 etc.
Currently I just use vscode. Is it necessary to install visual studio?
You can use visual studio code but you would need some compiler to compile your C++ project. For that the MSVC compiler that visual studio supports is often used. You can download the MSVC compiler and use visual studio code with it. when you create your project with visual studio code will generate a .vscode folder. In this folder you will have a
task.json [ for generating the build scripts you need to compile your program and create the exe files]
Launch.json [ for debugging your C++ classes]
Properties.json [ for finding the MSVC compiler ]
Unreal engine has a button in the editor that will compile your code. This equivalent to running
cd " Where you have your engine installed"
"Engine\\Build\\BatchFiles\\Build.bat" YourProjectNameEditor Win64 Development "C:\ThePathToYourProject\YourProjectName.uproject" -waitmutex
Visual studio provides other build task such as a DebugBuildGame and ShippingBuild
Visual studio code also provides these build task through task.json file, but it does not work out of the box
I ended up making a video about this and timestamped important events
https://youtu.be/fydvKedIxKk
You want to consider fixing the task.json if your want to run any build other than the editor one.

Azure Devops Pipeline - Use Microsoft Visual Studio Installer Projects

I'm using Azure devops with the VM = vmImage: 'windows-2019' and I would like to know how to generate an MSI file from my vdproj.
In my local visual studio I have the extension "Microsoft Visual Studio Installer Projects" installed and it works fine. But in the VS2019 of the hosted agent from Azure pipeline I dont have, and I can't generate the msi as an artifact.
I've tried to run by devenv.exe cmd but as I dont have the extension it didnt work.
Is there any way to generate msi files from azure pipeline? I've tried different ways, some custom tasks but it didnt work.
Or can I change my setups to another type of project that the MsBuild reconigze?
My error:
The project file "xxx.vdproj" is not supported by MSBuild and cannot be built.
Cheers.
Component.VSInstallerProjects v: 0.9.9 is now installed on the Microsoft-hosted agent 2019.
The project file "xxx.vdproj" is not supported by MSBuild and cannot
be built.
For this issue ,that because Visual Studio Installer Projects extension is not installed on the Hosted agent. You can view this link for a list of software installed on Microsoft-hosted agent2019.
As a work around , you have to configure your own build agent to run the build.
Make sure the VS Installer Projects extension is installed on your own build agent and then you can build the setup project either use command line task with "devenv" or use the "Build VS Installer" task.
To Build .msi file by VS installer project, you can use Build VS Installer task in marketplace.
You can specify to build .sln or .vdproj to generate .msi file(s) in Task-mode option.
Here are the similar cases:1,2 , you can refer to .

New Project, Old Nuget

Every time I start a new MVC project in Visual Studio, I have to update my Nuget packages. Things are several versions behind. I'm regularly updating my Visual Studio to stay current there, but how do I make sure my packages are up to date in new framework?
If needed, running Visual Studio 2017 Enterprise
What update of Visual Studio 2017 are you on?
How about modifying the inbuilt templates?
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ItemTemplates\Web\CSharp\1033

How to package Visual Studio extensions into a Nuget package

I would like to create a Visual Studio Nuget package for work. I also want to develop a Visual Studio extension to allow right-click deploy functionality for me and my co-workers. My question is: can I accomplish both of my requirements using the Nuget package alone, or do I have to develop a Nuget package and extension separately? If I have to do them separately, how can I roll the extension into the Nuget package so it can all be delivered together?

Where is Nuget 4 installed

Visual Studio 2017 comes with Nuget 4.0.0. However, it's not placed on the path. Where can I find the nuget executable to use the CLI?
Visual Studio 2017 doesn't use NuGet.exe but instead uses an extension of NuGet to achieve this. You should be able to find the extension in this path:
C:\Program Files (x86)\Microsoft Visual Studio\2017\<VSEdition>\Common7\IDE\CommonExtensions\Microsoft\NuGet
... where <VSEdition> is the version of Visual Studio being used, for example Community or Enterprise.
If you want to use the CLI, you'll have to download it separately. Here is a link explaining the same.