I would like to run the Microsoft Bot Framework Composer on my local machine in Chrome as a web application with debug configuration and attach Visual Studio Code's debugger to it to debug the changes I've made to the code. What is the best way of doing that?
I know that I can run the application locally with these steps (from the official README):
$ git clone https://github.com/microsoft/BotFramework-Composer.git
$ cd BotFramework-Composer
$ cd Composer // switch to Composer folder
$ yarn install // install dependencies
$ yarn build // build extensions and libs
$ yarn startall // start client and server at the same time
But as I see, this is starting the app with production configuration, so attaching a debugger to it wouldn't make too much sense. I think there must be an easy, pre-configured way of doing this (I mean the dev team must be doing this pretty often :)), I just struggle to find it in the official repository.
Related
I've been working with AWS lambdas for a few months. I was working with a lambda and it was fine at the end of the day. I came back to work on it the next day, and I can't get Visual Studio to even start the application using the Mock Lambda Test Tool.
I ended up creating an empty lambda that just returns the input (the standard project code that AWS gives you as a template) and that won't even run. I hit the play button to star the Mock Lambda Test Tool, it looks like it will run for a couple seconds, then it closes down. The command window does not even pop up.
This is the code from the template project.
public string FunctionHandler(string input, ILambdaContext context)
{
return input?.ToUpper();
}
This is all I get in the output window of VS:
The target process exited without raising a CoreCLR started event.
Ensure that the target process is configured to use .NET Core. This
may be expected if the target process did not run on .NET Core. The
program '[16700] dotnet-lambda-test-tool-2.1.exe: Program Trace' has
exited with code 0 (0x0). The program '[16700]
dotnet-lambda-test-tool-2.1.exe' has exited with code -2147450726
(0x8000809a).
I have tried re-installing the AWS toolkit, and also tried re-installing Visual Studio. This is an issue with VS 2017 and VS 2019. I just installed 2019 to see if that would fix the issue. Any help would be appreciated.
I came to this question having the very same issue. After installing AWS Toolkit I found that the lambda test tool was not installed and therefore I got the same error just as the OP. The only difference is that I was targeting .Net Core 3.1 and therefore I needed amazon.lambda.testool-3.1. However this answer should work for both scenarios.
Unfortunately I did not have the same luck as the OP of having a nice co-worker that could give me the files I needed. So, if this is also your case please continue reading.
In the official project site, which can be found here, there are the instructions to install the tools. It also says that installing the latest version of AWS Toolkit should be enough to have the tools installed (it was not in my case and probably in yours).
It says that in order to install the tools you should run the following commands:
dotnet tool install -g Amazon.Lambda.TestTool-3.1
or
dotnet tool install -g Amazon.Lambda.TestTool-2.1
depending on which tool you need.
However, running these commands fails with the following message:
The tool package could not be restored.
Tool 'amazon.lambda.testtool-2.1' failed to install. This failure may have been caused by:
* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET Core tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.
For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool
And since the project is still in preview I just had to find the latest stable version in order to specify it in the command. For .net core 3.1 here is the nuget site, there I found version 0.10 to be the latest, so the command should look like:
dotnet tool install -g --version 0.10 Amazon.Lambda.TestTool-3.1
I have faced the same issue and when i tried to install dotnet-lambda-test-tool-3.1.exe using command prompt I got this issue:
Failed to create shell shim for tool 'amazon.lambda.testtool-3.1': Command 'dotnet-lambda-test-tool-3.1' conflicts with an existing command from another tool.
Tool 'amazon.lambda.testtool-3.1' failed to install.
And I did the following to fix issue
Deleted the dotnet-lamda-test-tool-3.1.exe from the installed folder (C:\Users%USERNAME%.dotnet\tools\dotnet-lambda-test-tool-3.1.exe)
Run dotnet tool install -g --version 0.10 Amazon.Lambda.TestTool-3.1 on cmd.
I have faced the same issue and got errors like "dotnet-lamda-test-tool-2.1.exe has exited with code.."
I did the following to fix the issue
Removed the dotnet-lamda-test-tool-2.1.exe from the installed folder
(C:\Users%USERNAME%.dotnet\tools\dotnet-lambda-test-tool-2.1.exe)
Removed the [amazon.lambda.testtool-2.1] folder as well
(C:\Users%USERNAME%.dotnet\tools\tools.store\amazon.lambda.testtool-2.1)
Installed dotnet tool from Developer command prompt using the command
[install -g Amazon.Lambda.TestTool-2.1]
Run the project. It is working
I have seen this issue many time on my system with dotnet-lambda-test-tool-6.0. Only one fix work for me
Remove dotnet-lambda-test-tool-6.0.exe from C:\Users\username.dotnet\tools
Open Command prompt from C:\Users\username.dotnet\tools
run command dotnet tool install -g Amazon.Lambda.TestTool-6.0
For anyone else that hits this same issue, it had to do with the the AWS toolkit install. I did not modify it, but somehow it was no longer working. I tried un-installing and re-installing, but it was still having issues running it. A co-worker sent me the exe and subdirectory that was setup on his machine under C:\Users\%user%.dotnet\tools. The exe is located in this directory, and there is another folder under .store for amazon.lambda.testtool-2.1. That directory had different folders and files than what I was able to install. So I copied in what he had and it worked. There might be a profile file associated to the tools install that points to these folders and files that might need to be modified. Since I was able to fix it with this, I didnt look any further into that.
I had the same issue with my .NET 6.0 lambda project. I installed the tool by executing dotnet tool install --global Amazon.Lambda.TestTool-6.0 --version 0.12.6 as suggested on https://www.nuget.org/packages/Amazon.Lambda.TestTool-6.0
Just ensure it is installed at %USERPROFILE%\.dotnet\tools\dotnet-lambda-test-tool-6.0.exe
I got the same issue with VS2019 with lambda design in 3.1 version and in Output window getting error
The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core.
Then checked the folder having multiple version of lambda-test-tool in path
C:\Users{username}.dotnet\tools
I removed all the lambda-test-tool and installed the required tool only with version 3.1 by command in developer command prompt:
dotnet tool install -g --version 0.10 Amazon.Lambda.TestTool-3.1
Then I can able to debug the lambda
I am trying to set up Go on my offline Windows computer, using Visual Studio Code. I have successfully installed VS Code, Go, etc., but am running into trouble installing the Go tools. Unfortunately putting my Windows computer online isn't an option.
The most important tool for me is gopls the Go Language Server tool that provides hover, autocomplete, etc., and will really boost productivity.
I have tried various things, including:
Copying the binary file from $GOROOT/bin/gopls from my Internet-connected Mac to Windows.
Cloning the gopls repo from Github and rebuilding gopls for Windows as covered here by running go build -o gopls.exe main.go.
However I get the following error:
Couldn't start client gopls
Copying the cloned repo to my offline computer and running go install does not work as there are other dependencies needed to fully build and install gopls.
Another tool, staticcheck, provides precompiled binaries for all platforms here.
I have two questions:
Is there a publicly available repo/mirror/site that provides ready-made, downloadable binaries for the main set of Go tools for Windows?
Is there a way that the Go tools can be built for a Windows OS?
The bug on this was setting the environment variable correctly.
To give exact steps:
Browse to your Go src directory: $GOPATH/src/golang.org/x/
Clone Go tools repo: git clone https://github.com/golang/tools.git
cd tools/gopls.
Run GOOS=windows GOARCH=386 go build -o gopls.exe main.go to compile a binary file for gopls that is compatible on Windows.
Repeat steps 3 and 4 for each tool you need to install.
Ref: https://github.com/golang/go/wiki/WindowsCrossCompiling
I have installed Visual Studio Code and the Go extension on an offline computer and now I need to install the dependencies on that computer.
How can I do it please?
Note: If both of your online and offline PCs have the same OS and architecture, simply copy the $GOPATH directory and you are good to go.
(Note: Replace all $GOPATH with %GOPATH% for Windows OS)
Online
Go to the Go tools that the Go extension depends on, and follow instructions for your OS:
An example for dlv:
go get -u -v github.com/go-delve/delve/cmd/dlv
An example for The Language Server:
go get -u -v golang.org/x/tools/cmd/gopls
That is all.
Offline
For the offline installation you need first copy these files to the offline computer and just run e.g.:
cd $GOPATH/src/github.com/go-delve/delve/cmd/dlv
go install
Repeat steps 1 and 2 for all the packages you need, or simply have a clean GOPATH/src on first PC then compress all, then copy the compressed file and uncompress it then run go install for all packages you need to install.
Go Tools:
Online
The easiest way to install is to run:
go get -u golang.org/x/tools/...
Offline copy
You can also manually git clone the repository to:
$GOPATH/src/golang.org/x/tools
When we download git project and click build button in VS, it restores nuget packages and then compile. always cool.
Just like that, I'd like to install Redis locally before compile because my project unit test job requires Redis.
I found Redis-64 in nuget but I don't know why it does not install properly. It displays "Redis-64 is already installed" but it's not.
There is Chocolately nuget package and Redis for chocolatey. It looks promising to utilize them.
To achieve my goal, it would be required to (1) check installation of chocolately first, and then (2) download redis-64, and then (3) execute redis-server.exe before compile process (could be placed at the Pre-build event command in .csproj property).
I want to know how to check Redis chocolatey installation and rest of other steps in VS. Would you please teach me how to achieve to do that?
I could be way off the mark here, but the redis package that you are referring to, i.e. from NuGet should only include the assemblies that you could then consume within your application. If you actually want to have the Redis application installed, you would want to install the Redis application from Chocolatey.org, which you can find here.
In terms of getting Chocolatey etc installed as part of your build process, you might want to take a look at the build script for ChocolateGUI. As part of it's build, which is executed on AppVeyor, it checks for Chocolatey, and if it isn't there, installs it, and all required applications.
For what you want, I think you need to include:
choco install redis
Within your build script, and this will give you the redis-server.exe that you are looking for.
I installed the redis-64 NuGet package and it just worked for me. It is an unusual package in that it doesn't associate itself with any Visual Studio project, but rather it is referenced from a solution-level packages.config.
To use the Redis server in my integration test, I start the server with this code:
Process.Start(new ProcessStartInfo(Path.Combine(Directory.GetDirectories(#"..\..\..\packages", "Redis-64.*").Single(), "redis-server.exe"), "--bind 127.0.0.1") {
WindowStyle = ProcessWindowStyle.Hidden
});
All,
Likely a noob question, but being brand new to node.js I'm stuck and going in circles so looking for a little prodding in the right direction (my skills are .NET and browser JS).
My first node.js application will read the Windows serial port, so I want to use the voodootikigod / node-serialport module that seems to be the best one to use with node.js on Windows. I have followed the instructions to build it on windows by cloning the github source locally and use node-gyp to configure and build and that works successfully with no errors.
However, I need to install this into a local npm repository so I can 'require' it in my application. I'm using the new Visual Studio Node.js tools for VS (which are an excellent way for a .net developer to get started with node.js) however the included npm package manager can't install from a local folder.
So not knowing much about NPM I am assuming to install this into the local NPM repository with the following command line "npm install" from the local github folder, and it goes pulling all the dependencies but there is an embedded script that runs the following command "node-gyp rebuild" and it is here it falls over with the error: MSB4036 the "VCBuild" task is not found.
I'm using VS 2013 pro, and I thought VCbuild was replaced by MSbuild a while back. So it looks like I have to edit the script that node-gyp rebuild tries to run but I don't know enough about npm and node-gyp to sort this out.
It's likely a dumb newbie problem - can someone point me in the right direction? Thanks.
Do you have all the requirements in place for node-gyp on Windows (see the readme)? Windows 7 requires Python 2.7 and VS 2010 and Windows 8 requires VS 2012 C++.