alibaba / serverless-vscode

Aliyun Function Compute extension. Lets you develop your serverless application of Aliyun within VSCode.
GNU General Public License v2.0
290 stars 37 forks source link

win10,serverless本地运行或调试提示FileNotFoundException project.dll #243

Open jefth opened 4 years ago

jefth commented 4 years ago

Describe the bug · Win10 环境 (估计mac没这个问题)

To Reproduce Steps to reproduce the behavior:

  1. 通过vs code插件,在服务下新增netcore2.1函数:testfun03-netcore
  2. 右键Local Run,(期间下载镜像 aliyunfc/runtime-dotnetcore2.1:1.9.5 )
  3. 回到代码目录,通过终端 dotnet build后,再回到serverless重新再Local Run,错误依旧

Expected behavior FunctionCompute dotnetcore2.1 runtime inited. FC Invoke Start RequestId: ba3cd554-a795-4081-9db2-62a858d50baf 2020-07-07T03:41:00.318Z ba3cd554-a795-4081-9db2-62a858d50baf [ERROR] System.IO.FileNotFoundException: project.dll cannot be found.

Screenshots image

Desktop (please complete the following information):

Additional context yml片段参考: testfun03-netcore: Type: 'Aliyun::Serverless::Function' Properties: Handler: 'project::example.App::HandleRequest' Runtime: dotnetcore2.1 Timeout: 60 MemorySize: 512 InstanceConcurrency: 1 EnvironmentVariables: LD_LIBRARY_PATH: >- /code/.fun/root/usr/local/lib:/code/.fun/root/usr/lib:/code/.fun/root/usr/lib/x86_64-linux-gnu:/code/.fun/root/usr/lib64:/code/.fun/root/lib:/code/.fun/root/lib/x86_64-linux-gnu:/code:/code/lib:/usr/local/lib NODE_PATH: '/code/node_modules:/usr/local/lib/node_modules' PATH: >- /code/.fun/root/usr/local/bin:/code/.fun/root/usr/local/sbin:/code/.fun/root/usr/bin:/code/.fun/root/usr/sbin:/code/.fun/root/sbin:/code/.fun/root/bin:/code:/code/node_modules/.bin:/code/.fun/python/bin:/code/.fun/node_modules/.bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/sbin:/bin PYTHONUSERBASE: /code/.fun/python CodeUri: ./service-demo/testfun03-netcore

jefth commented 4 years ago

CodeUri: ./service-demo/testfun03-netcore --> CodeUri: ./service-demo/testfun03-netcore/bin/Debug/netcoreapp2.1

直接改为编译目录就能执行。(就是麻烦点,每次都要文件系统里先dotnet build,然后再到serverless 的local run) nodejs是目录一致的,dotnet是有bin目录的。