In the current version if VS Code it should be possible to run grunt or gulp tasks as written here: Tasks in visual Studio Code
But when i press F1 and enter "Run Task", then i can only run tasks from the tasks.json file. I even used the Gulp file from the Docs.
What am i missing or could this bi a bug?
OK the solution seems to be that the commad property in task.json must be set to grunt or gulp respectively. It is strange that this is mentioned later under another topic in the Docs.
Related
I can build my project successfully using "dotnet build" on the VS Code terminal, but I don't see evidence that my Postbuild event took place. It is crucial to make that event's command happen at build time on VS Code if I am to use it instead of Visual Studio 2022. The Postbuild event does occur if I build the project inside Visual Studio 2022 (where it was originally configured). Can I make the Postbuild event execute when running VS Code's "dotnet build" command--or is there some other procedure I must follow to make this project's Postbuild event execute properly from VS Code?
I want to know if it is possible to run a vscode task outside the current devcontainer, I ask this because I work inside a node 16 container angular project with cordova, and one of my tasks would be to open the cordova project with android studio, like so:
studio ./cordova/platforms/android
But when I try to run it as an npm script it tells me that studio is not a known command because he is running the command inside the conatiner where there's no android studio.
Anybody knows if this is possible? Is there a known workaround to this maybe?
I've a simple project in visual studio code with some defined tasks in tasks.json. Let's say the task are labeled with foo and bar.
Inside of visual studio code I can run CTRL+B and select the wanted task.
But - How can I run the task foo from a command line outside of Visual Studio Code?
There is a python tool that runs the vscode tasks. The last commit was in 2018, but it still might work as it seems that the tasks were last changed in vscode 1.13, released in 2017.
edit:
It works but setup.py:8 needs to be edited to build the wheel on windows, as it tries to run a shell script. My edit was to change the line to log = subprocess.check_output('sh bin/changelog') as I have sh installed.
I am using Visual studio test task to run all my tests as a part of my build definition.
The options that I have enabled are as attached below:
Now, the problem here is that, some of my tests always fail when I run them from the build pipleine , however all of these test seem to pass when I run them via
vstests console.exe command.
ex: "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\VSTest.Console" <path to dll>
Does anyone have any clue what could be wrong in here?
Thanks.
Using the Installed by tools installer selection, I would need to see what your tools installation task is doing to provide additional info. Maybe you're not installing a version that is compatible with the tests?
If you don't have a specific need to call out a different test platform version, maybe try using Latest.
OR
Since you're calling ...\Microsoft Visual Studio 14.0\...\VSTest.Console, you may want to select the Visual Studio 2015 option.
I started down this path of wanting to do code analysis on my solution using msbuild. I was looking at FxCop but it appears to now be part of Visual Studio and from my understanding you need Visual Studio installed on your build agents.
I am calling msbuild from a powershell using the following command;
"$(get-content env:systemroot)\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /tv:4.0 /p:RunCodeAnalysis=Always"
It appears to run the code analysis and output warnings but never fails the build, even after I added <CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
to my .csproj file.
All I want is to run code analysis from msbuild command line and have it fail the build if any warning is found. I understand it can be done in Visual Studio but I need to be able to run this from the command line (with/without VS2013)
Am I missing something? Shouldn't /p:RunCodeAnalysis=Always and setting the CodeAnalysisTreatWarningsAsErrors to true be all that is needed?