How to locally debug a Queue triggered Azure Function wirtten in PowerShell with Visual Studio Code? - powershell

I would like to have some information about how to do such a thing.
I've installed the plugins for Visual Studio Code, I've imported the modules at the beginning of my PowerShell script, I've fill the requirements.psd1 with the appropriate module names.
Still, when I launch the command, nothing happen.
My goal is to create a team in Microsoft Teams using PowerShell.
I put a breakpoint and it is never reached.
What am I doing wrong ?
Thank you.

Summarize the comments above as below for other communities reference:
Just wait for some minutes until the powershell terminal displays some relevent information. Otherwise that means it is importing/installing modules. We can also refer to the post provided by Mathias in the comments.

Related

Removing references from renamed VSTS project (not TFS)

I had deleted a project from VSTS and would like to use the same name again for my project but when I try to create the project, I get this error:
All of the desktops that this message is referring to are gone e.g. old employees, virtual desktops, etc.
How do I get past this error? I'd hate to retire a project name because of old desktops or ex-employees that will never access this project again.
UPDATE:
When you know what you're doing, everything is easy and questions like mine are frowned upon, so much so that someone suggested this post should be closed. Very nice!
So, I'm told both TFS and VSTS work the same way and I should go learn what I need to learn from the other post. According to the linked post, I need to go run TF command which according to the answers is located in Visual Studio 20xx/Common7/IDE folder. I go there and TF.exe is NOT there. I then start searching my computer to locate this executable and my computer can't find it. I then Google it and here's what I see on Microsoft's documentation. What gives?????
Regarding VS2017, the Tf.exe is in C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer, you also can call TF command in Developer Command Prompt for VS 2017.
On the other hand, you also can remove workspaces through Visual Studio directly (Manage workspaces and check Show remote workspaces option)

Opening an existing TFS query via powershell/nuget console

How would one go about opening an existing TFS query using powershell, more specifically the nuget console in VS (2013)?
I have to open several queries each time I open VS, and it would make life much easier to do so via a simple powershell cmdlet.
Thanks!
-k
Please check the post here which uses tfpt.exe inside powershell scripts to run the TFS queries.

Setting up 1-click Install for custom Powershell provider

I've created a custom Powershell provider. However, currently there are a few steps people have to do to get it working on a user's computer:
configure Powershell to run against .Net 4 (add a config file in c:\Windows\System32\WindowsPowerShell\v1.0)
add a custom formatter (to the System32 for c:\Windows\System32\WindowsPowerShell\v1.0).
register the snap-in.
The remainder setup steps are completed by a custom powershell script.
I was wondering if anyone could share their experiences on simplifying the process. Ideally I'd like people to run from a single command (ideally a CommandLet that's completes all the above steps.
Has anyone got any Links or Suggestions or Best Practise they could share?
I've found the following snippets that may help.
VS Command prompt variables
For the Visual Studio Command you could try Lee Holmes' http://poshcode.org/2176 or the Powershell Communit extensions (PSCVX). Both from https://superuser.com/questions/104868/run-visual-studio-command-line-tools-in-windows-powershell.
After that it's just the formatter and/or registering the snap-in.
Configure Powershell to use .Net4
How can I run PowerShell with the .NET 4 runtime?

The process cannot access the file because it is being used by another process

I ask this Question because it is Moles specific.
Running VS2010 on Windows 7 64bit the VsHost of moles stays in the task manager, causing this message:
Unable to copy file
The process cannot access the file because it is being used by another process
Solution: Kill the Process Microsoft.Moles.VsHost.x86.exe in the Task-Manager
To do this very often is very very annoying. I read in the msdn social forum that this issue shall be fixe sometime (i recall the post was from 2010 but cant find the post).
This happens nearly every time I stop the Debugging of the Test or if there is an Error while Debugging.
Anything new about this Issue?
I very much hope that Moles will be a standard part of Visual Studio someday, because I like this Typemocking very much!

Command line builds for VC 6?

I have been used to working with VS2005 and 2008 - using msbuild, etc, but I have inherited a set of projects that have to remain in vc6.0 for now. I don't like opening each project in the developer studio and building. I prefer to build form command line (I am automating the builds). Is this possible?
I have tried the nmake utility, but I still need to open up the projects and save/export the make file. This is tedious if the project changes - each time I have to save the make file. nmake seems to work, but it had a problem when I changed the location of the project in my directory tree (I checked out of svn into a new clean dir to try the build). It seemed to have hard coded paths in it, but I will have to check on that - it might have been a different problem.
Any alternatives out there?
Eventually I will migrate these to 2008, but for now that is not an option.
I'm recording the most important part of your link here - Microsoft has a bad habit of moving stuff around and leaving dead links. Not only is this the most important bit, but it gives enough information to do a search if/when they move it.
Building a Project from the Command Line
You can build a Visual C++ project from the command line without first exporting a makefile (MAKEFILE, or filename.mak) and using the NMAKE utility.
The basic command syntax is
msdev FileName [/MAKE "ProjectName – ConfigName | ALL"] [/REBUILD /CLEAN /NORECURSE /OUT LogFile /USEENV]
where FileName is the name of your project (.dsp) or workspace (.dsw) file.
I think I found m answer here:
http://msdn.microsoft.com/en-us/library/aa699274.aspx
thanks all
of course you can automate. I haven't used vc in years, but I think the compiler is called c8.exe or wow, I can't remember silly little tidbits like that anymore, but look in your vc\bin directory at all the exes and it will be obvious by name.
you can write a batch file worst case. But I also remember the UI having a "create makefile" function. So you do that once, and then just run make from the command line and voila. or maybe it's nmake. Again, been a long long time.
Microsoft provides a command line driver for building Visual Studio projects. In VC6 it's called "msdev" (do msdev /? for a list of options).
At some point (probably VS.NET/VS 2002) they started calling the command line build driver "devenv" for some reason. It has a somewhat different syntax, but for driving builds the options are the same or similar.
We use automated builds at my work place. Essentially just a batch file i fire off from the command line. Let me make sure i am allowed to post some sample code before i go ahead and post it. But yes, it IS possible to automate the build.
Sample Code:
:::::::: CompileSolution :::::::::::::::::::::::::
call X:\BuildTools\bin\BuildVbProj.bat
%COMPONENTNAME% %SOLUTIONDIR%
%PROJFILE% %BUILDOUTPUTFILE%
%PREBUILDFILE% if %ERRORLEVEL% NEQ 0
goto BuildErrors
goto Cleanup
EDIT: The BuildVbProj.bat file ultimately calls VB6.exe in the Program Files\MS Visual Studio\VB98\ folder. Try calling it with "VB6.exe /?" or "VB6.exe -?" and it will show you a list of options. You can basically automate your process using those options.
There should be a similar exe for VC in the VC98 folder as well.
Another option which is less labor intensive is
Pulldown Menu (BUILD)
Select (BATCHBUILD)
Push Button (REBUILDALL)