Unable to install Dotnet Stryker - mutation-testing

I have tried the below commands to install dotnet stryker to my project to improve the mutation testing but getting below error message and it does not allow me to install the tool.
Could you please help on this.
Thanks in advance
PS C:\Users> dotnet tool install -g dotnet-stryker
C:\Program Files\dotnet\sdk\6.0.101\NuGet.targets(130,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [C:\Users\AppData\Local\Temp\evv2az1v.kwa\restore.csproj]
C:\Program Files\dotnet\sdk\6.0.101\NuGet.targets(130,5): error : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (api.nuget.org:443) [C:\Users\AppData\Local\Temp\evv2az1v.kwa\restore.csproj]
C:\Program Files\dotnet\sdk\6.0.101\NuGet.targets(130,5): error : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. [C:\Users\AppData\Local\Temp\evv2az1v.kwa\restore.csproj]
The tool package could not be restored.
Tool 'dotnet-stryker' 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 tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.
Below commands are also getting the same error message
PS C:\Users> dotnet tool install -g dotnet-stryker dotnet tool install --global dotnet-stryker --version 1.0.0

This is most probably not related to Stryker but to some weird NuGet situation. You can check it by installing some common tool, e.g dotnet-reportgenerator-globaltool. I think I have seen this kind of error when setting up local feeds for dev purposes.
So try this:
dotnet nuget list source - list feeds
dotnet nuget remove source <feed_name> - remove everything you don't need or understand
And then try installing Stryker once again.

Related

How to connect npm with NuGet packages?

I've started a Fable project using a starter template. In order to run it, I was previous successfully using npm run build.
Using Visual Studio, I installed some NuGet packages (Serilog, Dapper) but now when I call npm start, the terminal complains that the NuGet packages calls cannot be resolved:
ERROR in ./src/Project.App/App.fs
Module Error (from ./node_modules/fable-loader/index.js):
C:/Users/markr/git-repos/SampleProject/src/SampleProject.App/App.fs(95,12): (95,47) error FABLE: Cannot resolve Serilog.Log.Error
# ./src/SampleProject.App/SampleProject.App.fsproj 1:0-25 1:0-25
It makes this same complaint for all NuGet package calls. How do I make it so that I can run npm run build while using NuGet packages?
It turns out what I'm trying to do is impossible. Using SAFE architecture now to be able to properly implement a NuGet side (server) and an npm side (client)

cant Install [.net core] packages using visual studio code(dotnet cli)

I using the latest asp core 3.1 framework. I am trying to setup my database but there is an issue. I can't seem to install the following packages
dotnet tool install --global dotnet-ef
dotnet tool install --global dotnet-aspnet-codegenerator
dotnet add package Microsoft.EntityFrameworkCore.SQLite
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design
dotnet add package Microsoft.EntityFrameworkCore.Design
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
I get the following errors. will appreciate it if any one can help with
a solution.
error NU1100: Unable to resolve 'dotnet-aspnet-codegenerator ' for '.NETCoreApp,Version=v3.1'.
error NU1100: Unable to resolve 'dotnet-aspnet-codegenerator ' for '.NETCoreApp,Version=v3.1/any'.
The tool package could not be restored.
Tool 'dotnet-aspnet-codegenerator' 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.
This happens when I try to install any of the packages.

Yeoman, npm install errors registry

When trying the Excel Addin Tutorial (https://learn.microsoft.com/en-us/office/dev/add-ins/quickstarts/excel-quickstart-jquery?tabs=yeomangenerator) I get an error when running npm start :
> office-addin-taskpane-js#0.0.1 start D:\sheet_organizer
> office-addin-debugging start manifest.xml
Debugging is being started...
App type: desktop
Enabled debugging for add-in sheet_organizer. Debug method: 0
Starting the dev server... (webpack-dev-server --mode development)
The dev server is running on port 3000. Process id: 8456
Sideloading the Office Add-in...
Error: Unable to start debugging.
Error: Unable to sideload the Office Add-in.
Error: Unable to delete registry value "D:\sheet_organizer\manifest.xml" in key "HKCU\SOFTWARE\Microsoft\Office\16.0\Wef\Developer".
ProcessUncleanExitError: DELETE command exited with code 1:
Error: can't find the key or the value
I check manually the key. There is a Developper>05c2e1c9-3e1d-406e-9a91-e9ac64854143 folder
With UseDirectDebugger, UseLiveReload and UseWebDebugger
So the key exist. Don't understand why it is not working.
Yes, this issue was fixed. OfficeDev/Office-Addin-Scripts#215
Please get the latest version of office-addin-debugging.
There are a couple of ways to do this.
1- npm update --dev can update all packages according to semver. (You can see outdated packages using npm outdated --long.)
2- You could update office-addin-debugging package using npm install -D office-addin-debugging.
Ref:https://github.com/OfficeDev/office-js-docs-pr/issues/1321

Building Autodesk Forge RCDB on Windows 10 fails with node-gyp errors

While attempting to get the Forge Responsive Connected Database to build. I am unable to build this application on my Windows 10 machine. I am unable to succesffuly run “npm install”. I get the following errors as listed below. I ended up trying to use a pre-configured “canvas” and it still didn’t let the node app run.
https://github.com/Autodesk-Forge/forge-rcdb.nodejs
I have tried these solutions to no success:
https://github.com/npm/npm/issues/14543
https://github.com/nodejs/node-gyp#on-windows
https://github.com/Automattic/node-canvas/wiki/Installation---Windows
https://github.com/substack/dnode/issues/181
https://github.com/nodejs/node-gyp/issues/629#issuecomment-153196245
https://www.npmjs.com/package/canvas-prebuilt
> canvas#1.6.10 install D:\DEVELOPMENT\Autodesk\forge-rcdb.nodejs3\node_modules\canvas
> node-gyp rebuild
D:\DEVELOPMENT\Autodesk\forge-rcdb.nodejs3\node_modules\canvas>if not defined npm_config_node_gyp (node "C:\Users\steck\AppData\Roaming\nvm\v7.7.1\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "node C:\Users\me\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
module.js:472
throw err;
^
Error: Cannot find module 'D:\DEVELOPMENT\Autodesk\forge-rcdb.nodejs3\node_modules\canvas\node C:\Users\me\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:425:7)
at startup (bootstrap_node.js:146:9)
at bootstrap_node.js:540:3
Here are the full installation and setup steps I tested on two different 2 different computers with Windows10 installed.
Pre-Installations:
Node.js - used v.6.x and v8.x
Node.js global packages:
npm-windows-upgrade(link):
This tool will move and install npm into Windows' spectial folder %appdata%.
Installation steps:
Open Powershell as Administrator and execute Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force.
Install tool by npm install --global --production npm-windows-upgrade
npm-windows-upgrade
Execute cmd npm-windows-upgrade --npm-version 5.6.0 in the Powershell (note. you can choose any version what you want, e.g. 6.0.1)
windows-build-tools(link):
This tool will install build tools required by the package node-gyp.
The installation will take some time to wait for the build tools to be downloaded and installed. If you might see a message Successfully installed Python 2.7 firstly, but you have to wait for the message Successfully installed Visual Studio Build Tools. shows up.
Open Powershell as Administrator and install tool by npm install --global --production windows-build-tools
node-gyp(link):
This tool is required by the package node-canvas while running npm install.
Open Powershell normally(say current user) and install tool by npm install -g node-gyp
Visual Studio 2017 (link):
This might be optional, I just installed it with VS C++ features in my cases.
Chocolatey (link):
This tool will make your life easier to install dependencies for package node-canvas on Windows.
Open Powershell as Administrator and execute Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')).
After installing Chocolatey, install node-canvas dependencies by choco install -y python2 gtk-runtime microsoft-build-tools libjpeg-turbo (You might see a warning message visuallstudiotool-vs2017 installation failed and you can ignore it. In my cases, it didn't affect the result)
GTK with cairo library (link):
This tool the required dependency for package node-canvas.
Installation steps:
Download precompiled X64 GTK package here.
Unzip all contents into C:\GTK.
Mongochef (link):
This tool will make your life easier to restore dummy database of the forge-rcdb.
MongoDB:
You can follow the instructions here to install MongoDB on your compture , or use MongoDB PaaS mlab instead.
Main Installations:
Download source codes of the forge-rcdb and unzip into somewhere you like. In my cases, I put it into my desktop.
Open Powershell normally(say current user) and change directory into the unzipped folder of the source code. For instance, execute cd Desktop\forge-rcdb-nodejs-master in the Powershell.
Run cmd npm install in the root of the source code folder. (You may see some error message while compiling the package node-canvas, but can see 'copied xxx.c', 'copied xxx.cpp', and so on in the same time, then you can ignore the errors. In my cases, it didn't be a problem to run forge-rcdb.)
Configurations:
Open config\development.config.js with your editor and change values of viewer section into:
viewer: {
viewer3D: 'https://developer.api.autodesk.com/derivativeservice/v2/viewers/viewer3D.js?v=4.0.1',
threeJS: 'https://developer.api.autodesk.com/derivativeservice/v2/viewers/three.js?v=4.0.1',
style: 'https://developer.api.autodesk.com/derivativeservice/v2/viewers/style.css?v=4.0.1'
}
Change the database section in the config\development.config.js with you MongoDB connection settings.
Restore dummy database data in the resources/db/dev or resources/db/prod via Mongochef's Import function.
Open Powershell normally(say current user) and set following environment variables:
$env:NODE_ENV="development"
$env:HOT_RELOADING="true"
$env:FORGE_DEV_CLIENT_ID="YOUR_CLINET_ID"
$env:FORGE_DEV_CLIENT_SECRET="YOUR_CLINET_SECRET"
Run the project
Change current directory of the Powershell into the source code folder of the forge-rcdb and type npm start
open http://localhost:3000 in your favorite browser.
Trouble Shooting
You might be not able to load any models in the browser. If you to test the functionality, please copy resources\models\prod\robot into resources\models\dev\robot. Afterward, navigate to http://localhost:3000/configurator in the web browser and mouse-click on Kinematics project, then you will see the model loaded on your screen.
If you see the response of http://localhost:3000/api/forge/user showing HTTP EORROR CODE 404 from the browser dev console, then you must have to check whether the CallBack URL of your Forge App used to host forge-rcdb in Forge Dev Protal is http://localhost:3000/api/forge/callback/oauth. (note. This config can be changed in config\development.config.js)
Afterward, you or your users must have to log into the website with Autodesk account to obtain 3 legged token from the Forge OAuth service to upload models in the gallery page.
If you get an empty array from the response of http://localhost:3000/api/models/configurator?limit=100&offset=0&search=, it means there is nothing in your MongoDB collection configurator.models. To fix this issue, you can import db content resources\db\dev\configurator.models.json into your MongoDB via Mongochef. (note. Please refer the step 3 of the configuration section)
If you cannot load any listed models from the web pages, it means there is not downloaded viewable bubbles in your resources\models\prod or resources\models\dev as well as your Forge OSS bucket. So, please check the urn value in your database whether you have those models in these positions previously mentioned.
If you found the main reason for item 3 of Trouble Shooting is that you didn't own models listed in the forge-rcdb, that's because these models are Autodesk's private models or uploaded by other users themselves before, that might not be shared to the public, unfortunately. To fix this issue, you have to change the example data of MongoDB Collections mentioned in step 3 of the configuration section to your own models.
Hope it helps.

why i got an error script after enable rabbitmq_management

i was try to install and running rabbitmq in my windows and following the tutorial from the official web.
but i got an error script after run
rabbitmq-plugins enable rabbitmq_management
in my command prompt
this is an error i have
error script in rabbitmq_management
i was run rabbitmq service but it's no effect
and i cannot run http://localhost:15672
i think it's because management plugin error, how to fix the error script. ?
The error undef crypto module means that you don't have the erlang crypo module installed.
The Management UI requires this module.
You are maybe running an old erlang version.
Try to remove the the current version and download this version:
http://erlang.org/download/otp_win64_18.3.exe