tjanczuk / edge

Run .NET and Node.js code in-process on Windows, MacOS, and Linux
http://tjanczuk.github.io/edge
Other
5.41k stars 642 forks source link

MS Build Error: Specify a project or solution file. The current working directory does not contain a project or solution file. #723

Closed avneet-01 closed 1 month ago

avneet-01 commented 2 years ago

I am getting build error : "Specify a project or solution file. The current working directory does not contain a project or solution file in .dll node js" while deploying my node js project in Azure. I've used Edge js for calling .dll in my node js that is causing this error although it runs fine in Visual Studio. This .dll file is used to generate a license for given order details as shown below:

const express = require("express"); const bodyParser = require("body-parser"); var edge = require('edge-js');

const app = express(); const port = process.env.PORT || 3000 app.use(express.json())

app.get("/", function(req, res) { console.log(dirname); res.sendFile(dirname + "/index.html"); });

app.use(express.static("public")); app.use(bodyParser.urlencoded({ extended: true }));

app.listen(port, function(req, res) { console.log(Server is running on port ${port}); });

var GenUnlockCode = edge.func('./public/Vab_dll/VabLib.dll'); var OrderDetails = { stockCode: '337839', expiryDate: '2022-01-01', gwID: '027851153510-000147' }; GenUnlockCode(OrderDetails, function(error, unlockCode) { if (error) throw error; console.log(unlockCode); });

If we see the Azure logs below is displays the error is due to "This is not a published, standalone application and we are unable to locate the .NET Core SDK. Please make sure that it is installed". I'm not sure what that means. Experts please help!

2021-12-11T06:40:52.809517046Z
2021-12-11T06:40:52.809548146Z /
\ __
___ ___
2021-12-11T06:40:52.809552946Z / /
\ _
/ | _ _/ \ 2021-12-11T06:40:52.809556746Z / | \/ /| | /| | \/\ / 2021-12-11T06:40:52.809566646Z __| /__ __/ |_| \ > 2021-12-11T06:40:52.809570546Z \/ \/ \/ 2021-12-11T06:40:52.809574046Z A P P S E R V I C E O N L I N U X 2021-12-11T06:40:52.809577346Z 2021-12-11T06:40:52.809580646Z Documentation: http://aka.ms/webapp-linux 2021-12-11T06:40:52.809583846Z NodeJS quickstart: https://aka.ms/node-qs 2021-12-11T06:40:52.809587146Z NodeJS Version : v14.17.4 2021-12-11T06:40:52.809590446Z Note: Any data outside '/home' is not persisted 2021-12-11T06:40:52.809593846Z 2021-12-11T06:40:53.357900493Z Found build manifest file at '/home/site/wwwroot/oryx-manifest.toml'. Deserializing it... 2021-12-11T06:40:53.425552231Z Build Operation ID: |OefU//3eq74=.3a19627a_ 2021-12-11T06:40:54.235763073Z Environment Variables for Application Insight's IPA Codeless Configuration exists.. 2021-12-11T06:40:54.827860504Z Writing output script to '/opt/startup/startup.sh' 2021-12-11T06:40:55.073904994Z Running #!/bin/sh 2021-12-11T06:40:55.081796548Z 2021-12-11T06:40:55.081817248Z # Enter the source directory to make sure the script runs where the user expects 2021-12-11T06:40:55.081822848Z cd "/home/site/wwwroot" 2021-12-11T06:40:55.081827448Z 2021-12-11T06:40:55.081831448Z export NODE_PATH=/usr/local/lib/node_modules:$NODE_PATH 2021-12-11T06:40:55.081835848Z if [ -z "$PORT" ]; then 2021-12-11T06:40:55.081839948Z export PORT=8080 2021-12-11T06:40:55.081844848Z fi 2021-12-11T06:40:55.081856848Z 2021-12-11T06:40:55.081861148Z echo Found tar.gz based node_modules. 2021-12-11T06:40:55.081865348Z extractionCommand="tar -xzf node_modules.tar.gz -C /node_modules" 2021-12-11T06:40:55.081869448Z echo "Removing existing modules directory from root..." 2021-12-11T06:40:55.081873548Z rm -fr /node_modules 2021-12-11T06:40:55.081877548Z mkdir -p /node_modules 2021-12-11T06:40:55.081881548Z echo Extracting modules... 2021-12-11T06:40:55.081885448Z $extractionCommand 2021-12-11T06:40:55.081889548Z export NODE_PATH="/node_modules":$NODE_PATH 2021-12-11T06:40:55.084909569Z export PATH=/node_modules/.bin:$PATH 2021-12-11T06:40:55.084924669Z if [ -d node_modules ]; then 2021-12-11T06:40:55.084929569Z mv -f node_modules _del_node_modules || true 2021-12-11T06:40:55.084940069Z fi 2021-12-11T06:40:55.091989218Z 2021-12-11T06:40:55.092003318Z if [ -d /node_modules ]; then 2021-12-11T06:40:55.094617136Z ln -sfn /node_modules ./node_modules 2021-12-11T06:40:55.095085339Z fi 2021-12-11T06:40:55.095096839Z 2021-12-11T06:40:55.095101039Z echo "Done." 2021-12-11T06:40:55.095104939Z npm start 2021-12-11T06:40:55.113039862Z Found tar.gz based node_modules. 2021-12-11T06:40:55.113547266Z Removing existing modules directory from root... 2021-12-11T06:40:55.133365302Z Extracting modules... 2021-12-11T06:40:56.349141556Z Done. 2021-12-11T06:40:58.195253142Z npm info it worked if it ends with ok 2021-12-11T06:40:58.195283642Z npm info using npm@6.14.14 2021-12-11T06:40:58.213971671Z npm info using node@v14.17.4 2021-12-11T06:40:59.776312808Z npm info lifecycle lincoln_9.3@1.0.0~prestart: lincoln_9.3@1.0.0 2021-12-11T06:40:59.791235410Z npm info lifecycle lincoln_9.3@1.0.0~start: lincoln_9.3@1.0.0 2021-12-11T06:40:59.805895911Z 2021-12-11T06:40:59.805942311Z > lincoln_9.3@1.0.0 start /home/site/wwwroot 2021-12-11T06:40:59.805949711Z > nodemon expserver.js 2021-12-11T06:40:59.805954211Z 2021-12-11T06:41:03.865016539Z [nodemon] 2.0.15 2021-12-11T06:41:03.866429652Z [nodemon] to restart at any time, enter rs 2021-12-11T06:41:03.867416962Z [nodemon] watching path(s): . 2021-12-11T06:41:03.875001933Z [nodemon] watching extensions: js,mjs,json 2021-12-11T06:41:03.875557839Z [nodemon] starting node expserver.js 2021-12-11T06:41:05.463638445Z Error: assembly specified in the dependencies manifest was not found -- package: 'Microsoft.CSharp', version: '4.5.0', path: 'lib/netstandard1.3/Microsoft.CSharp.dll' 2021-12-11T06:41:05.482515823Z 2021-12-11T06:41:05.482538123Z internal/modules/cjs/loader.js:1131 2021-12-11T06:41:05.482543723Z return process.dlopen(module, path.toNamespacedPath(filename)); 2021-12-11T06:41:05.482548723Z ^ 2021-12-11T06:41:05.492790020Z Error: This is not a published, standalone application and we are unable to locate the .NET Core SDK. Please make sure that it is installed; see http://microsoft.com/net/core for more details. 2021-12-11T06:41:05.492809420Z at Object.Module._extensions..node (internal/modules/cjs/loader.js:1131:18) 2021-12-11T06:41:05.492814920Z at Module.load (internal/modules/cjs/loader.js:937:32) 2021-12-11T06:41:05.492847521Z at Function.Module._load (internal/modules/cjs/loader.js:778:12) 2021-12-11T06:41:05.492852021Z at Module.require (internal/modules/cjs/loader.js:961:19) 2021-12-11T06:41:05.492856221Z at Module.patchedRequire [as require] (/agents/node/node_modules/diagnostic-channel/dist/src/patchRequire.js:15:46) 2021-12-11T06:41:05.492869921Z at require (internal/modules/cjs/helpers.js:92:18) 2021-12-11T06:41:05.492873921Z at Object. (/node_modules/edge-js/lib/edge.js:52:8) 2021-12-11T06:41:05.492878021Z at Module._compile (internal/modules/cjs/loader.js:1072:14) 2021-12-11T06:41:05.492881621Z at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10) 2021-12-11T06:41:05.492885821Z at Module.load (internal/modules/cjs/loader.js:937:32) 2021-12-11T06:41:05.515157231Z [nodemon] app crashed - waiting for file changes before starting... 2021-12-11T06:42:37.770872193Z ApplicationInsights:CorrelationIdManager [ 2021-12-11T06:42:37.770917994Z Error: read ECONNRESET 2021-12-11T06:42:37.770923994Z at TLSWrap.onStreamRead (internal/stream_base_commons.js:209:20) 2021-12-11T06:42:37.770934294Z at TLSWrap.callbackTrampoline (internal/async_hooks.js:131:17) { 2021-12-11T06:42:37.770939994Z errno: -104, 2021-12-11T06:42:37.770944094Z code: 'ECONNRESET', 2021-12-11T06:42:37.770948194Z syscall: 'read' 2021-12-11T06:42:37.770952194Z } 2021-12-11T06:42:37.770956094Z ] 2021-12-11T06:42:39.518026252Z ApplicationInsights:CorrelationIdManager [ 2021-12-11T06:42:39.518060652Z Error: read ECONNRESET 2021-12-11T06:42:39.518067352Z at TLSWrap.onStreamRead (internal/stream_base_commons.js:209:20) 2021-12-11T06:42:39.518072952Z at TLSWrap.callbackTrampoline (internal/async_hooks.js:131:17) { 2021-12-11T06:42:39.518077852Z errno: -104, 2021-12-11T06:42:39.518082452Z code: 'ECONNRESET', 2021-12-11T06:42:39.518087252Z syscall: 'read' 2021-12-11T06:42:39.518098053Z } 2021-12-11T06:42:39.518103153Z ]

2021-12-11T06:48:18.768943986Z
2021-12-11T06:48:18.768983986Z /
\ __
___ ___
2021-12-11T06:48:18.768989686Z / /
\ _
/ | _ _/ \ 2021-12-11T06:48:18.768993486Z / | \/ /| | /| | \/\ / 2021-12-11T06:48:18.768997086Z __| /__ __/ |_| \ > 2021-12-11T06:48:18.769001286Z \/ \/ \/ 2021-12-11T06:48:18.769004886Z A P P S E R V I C E O N L I N U X 2021-12-11T06:48:18.769008386Z 2021-12-11T06:48:18.769011486Z Documentation: http://aka.ms/webapp-linux 2021-12-11T06:48:18.769014886Z NodeJS quickstart: https://aka.ms/node-qs 2021-12-11T06:48:18.769018186Z NodeJS Version : v14.17.4 2021-12-11T06:48:18.769021386Z Note: Any data outside '/home' is not persisted 2021-12-11T06:48:18.769024786Z 2021-12-11T06:48:19.221926151Z Found build manifest file at '/home/site/wwwroot/oryx-manifest.toml'. Deserializing it... 2021-12-11T06:48:19.239983406Z Build Operation ID: |OefU//3eq74=.3a19627a_ 2021-12-11T06:48:20.390094678Z Environment Variables for Application Insight's IPA Codeless Configuration exists.. 2021-12-11T06:48:20.749663166Z Writing output script to '/opt/startup/startup.sh' 2021-12-11T06:48:21.389539103Z Running #!/bin/sh 2021-12-11T06:48:21.389579003Z 2021-12-11T06:48:21.389585303Z # Enter the source directory to make sure the script runs where the user expects 2021-12-11T06:48:21.389589803Z cd "/home/site/wwwroot" 2021-12-11T06:48:21.389594003Z 2021-12-11T06:48:21.389598303Z export NODE_PATH=/usr/local/lib/node_modules:$NODE_PATH 2021-12-11T06:48:21.389602403Z if [ -z "$PORT" ]; then 2021-12-11T06:48:21.389606603Z export PORT=8080 2021-12-11T06:48:21.389611003Z fi 2021-12-11T06:48:21.389614803Z 2021-12-11T06:48:21.389618703Z echo Found tar.gz based node_modules. 2021-12-11T06:48:21.389622703Z extractionCommand="tar -xzf node_modules.tar.gz -C /node_modules" 2021-12-11T06:48:21.389626903Z echo "Removing existing modules directory from root..." 2021-12-11T06:48:21.389631003Z rm -fr /node_modules 2021-12-11T06:48:21.389635003Z mkdir -p /node_modules 2021-12-11T06:48:21.389639603Z echo Extracting modules... 2021-12-11T06:48:21.389643603Z $extractionCommand 2021-12-11T06:48:21.389647504Z export NODE_PATH="/node_modules":$NODE_PATH 2021-12-11T06:48:21.389651604Z export PATH=/node_modules/.bin:$PATH 2021-12-11T06:48:21.389655504Z if [ -d node_modules ]; then 2021-12-11T06:48:21.389659604Z mv -f node_modules _del_node_modules || true 2021-12-11T06:48:21.389663504Z fi 2021-12-11T06:48:21.389680304Z 2021-12-11T06:48:21.389684004Z if [ -d /node_modules ]; then 2021-12-11T06:48:21.389687704Z ln -sfn /node_modules ./node_modules 2021-12-11T06:48:21.389691404Z fi 2021-12-11T06:48:21.389694804Z 2021-12-11T06:48:21.389698304Z echo "Done." 2021-12-11T06:48:21.392477312Z npm start 2021-12-11T06:48:21.415701282Z Found tar.gz based node_modules. 2021-12-11T06:48:21.415721583Z Removing existing modules directory from root... 2021-12-11T06:48:21.432192032Z Extracting modules... 2021-12-11T06:48:22.719601839Z Done. 2021-12-11T06:48:24.856771165Z npm info it worked if it ends with ok 2021-12-11T06:48:24.858485870Z npm info using npm@6.14.14 2021-12-11T06:48:24.858502570Z npm info using node@v14.17.4 2021-12-11T06:48:27.395197882Z npm info lifecycle lincoln_9.3@1.0.0~prestart: lincoln_9.3@1.0.0 2021-12-11T06:48:27.428169277Z npm info lifecycle lincoln_9.3@1.0.0~start: lincoln_9.3@1.0.0 2021-12-11T06:48:27.447886734Z 2021-12-11T06:48:27.447934234Z > lincoln_9.3@1.0.0 start /home/site/wwwroot 2021-12-11T06:48:27.447941234Z > nodemon expserver.js 2021-12-11T06:48:27.447945734Z 2021-12-11T06:48:29.881821389Z [nodemon] 2.0.15 2021-12-11T06:48:29.890333614Z [nodemon] to restart at any time, enter rs 2021-12-11T06:48:29.892783521Z [nodemon] watching path(s): . 2021-12-11T06:48:29.892808321Z [nodemon] watching extensions: js,mjs,json 2021-12-11T06:48:29.892814121Z [nodemon] starting node expserver.js 2021-12-11T06:48:31.450890659Z Error: assembly specified in the dependencies manifest was not found -- package: 'Microsoft.CSharp', version: '4.5.0', path: 'lib/netstandard1.3/Microsoft.CSharp.dll' 2021-12-11T06:48:31.471303619Z 2021-12-11T06:48:31.471336819Z internal/modules/cjs/loader.js:1131 2021-12-11T06:48:31.471342419Z return process.dlopen(module, path.toNamespacedPath(filename)); 2021-12-11T06:48:31.471346819Z ^ 2021-12-11T06:48:31.481192347Z Error: This is not a published, standalone application and we are unable to locate the .NET Core SDK. Please make sure that it is installed; see http://microsoft.com/net/core for more details. 2021-12-11T06:48:31.481238948Z at Object.Module._extensions..node (internal/modules/cjs/loader.js:1131:18) 2021-12-11T06:48:31.481245548Z at Module.load (internal/modules/cjs/loader.js:937:32) 2021-12-11T06:48:31.481250348Z at Function.Module._load (internal/modules/cjs/loader.js:778:12) 2021-12-11T06:48:31.481254548Z at Module.require (internal/modules/cjs/loader.js:961:19) 2021-12-11T06:48:31.481258748Z at Module.patchedRequire [as require] (/agents/node/node_modules/diagnostic-channel/dist/src/patchRequire.js:15:46) 2021-12-11T06:48:31.481277148Z at require (internal/modules/cjs/helpers.js:92:18) 2021-12-11T06:48:31.481281048Z at Object. (/node_modules/edge-js/lib/edge.js:52:8) 2021-12-11T06:48:31.481285148Z at Module._compile (internal/modules/cjs/loader.js:1072:14) 2021-12-11T06:48:31.481295348Z at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10) 2021-12-11T06:48:31.481299248Z at Module.load (internal/modules/cjs/loader.js:937:32) 2021-12-11T06:48:31.503689413Z [nodemon] app crashed - waiting for file changes before starting... 2021-12-11T06:49:59.592524675Z ApplicationInsights:CorrelationIdManager [ 2021-12-11T06:49:59.592569976Z Error: read ECONNRESET 2021-12-11T06:49:59.592577176Z at TLSWrap.onStreamRead (internal/stream_base_commons.js:209:20) 2021-12-11T06:49:59.592582476Z at TLSWrap.callbackTrampoline (internal/async_hooks.js:131:17) { 2021-12-11T06:49:59.592587276Z errno: -104, 2021-12-11T06:49:59.592591976Z code: 'ECONNRESET', 2021-12-11T06:49:59.592596676Z syscall: 'read' 2021-12-11T06:49:59.592601376Z } 2021-12-11T06:49:59.592605976Z ] 2021-12-11T06:50:05.051388088Z ApplicationInsights:CorrelationIdManager [ 2021-12-11T06:50:05.051425588Z Error: read ECONNRESET 2021-12-11T06:50:05.051431188Z at TLSWrap.onStreamRead (internal/stream_base_commons.js:209:20) 2021-12-11T06:50:05.051435988Z at TLSWrap.callbackTrampoline (internal/async_hooks.js:131:17) { 2021-12-11T06:50:05.051440188Z errno: -104, 2021-12-11T06:50:05.051444188Z code: 'ECONNRESET', 2021-12-11T06:50:05.051448188Z syscall: 'read' 2021-12-11T06:50:05.051458388Z } 2021-12-11T06:50:05.051462388Z ]

agracio commented 1 month ago

You need to use https://github.com/agracio/edge-js