Azure Functions TypeScript调试发布报错:无法加载System.Net.Http.Formatting
TypeScript Azure Functions 调试/发布时出现 System.Net.Http.Formatting 找不到的错误
我在Visual Studio Code中创建了TypeScript版本的Azure Functions项目,已安装对应扩展。尝试调试或发布到Azure Function应用时,出现以下错误:
"Could not load file or assembly 'System.Net.Http.Formatting, Version=5.2.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified."
项目配置文件
tsconfig.json
{ "compilerOptions": { "module": "commonjs", "allowJs": true, "target": "es6", "outDir": "dist", "rootDir": ".", "sourceMap": true, "strict": false }, "include": ["src/**/*.ts", "src/**/*.js"], }
launch.json
{ "version": "0.2.0", "configurations": [ { "name": "Attach to Node Functions", "type": "node", "request": "attach", "port": 9229, "preLaunchTask": "func: host start" } ] }
package.json
{ "name": "", "version": "1.0.0", "description": "", "main": "dist/src/functions/*.js", "files": [ "dist/", "src/image-target" ], "scripts": { "build": "tsc", "watch": "tsc -w", "clean": "rimraf dist", "prestart": "npm run clean && npm run build", "start": "func start", "test": "echo \"No tests yet...\"" }, "dependencies": { "@azure/functions": "^4.0.0-alpha.9", "@azure/storage-blob": "^12.16.0", "@mediapipe/face_mesh": "^0.4.1633559619", "@msgpack/msgpack": "^3.0.0-beta2", "@tensorflow/tfjs": "^4.11.0", "canvas": "^2.11.2", "mathjs": "^11.11.0", "ml-matrix": "^6.10.4", "svd-js": "^1.1.1", "tinyqueue": "^2.0.3" }, "devDependencies": { "@types/node": "18.x", "azure-functions-core-tools": "^4.x", "rimraf": "^5.0.0", "typescript": "^4.0.0" } }
错误截图


内容的提问来源于stack exchange,提问作者Reza Shirazi
相关产品推荐
相关产品推荐

