问题场景:

练习在docker下操作netcore,镜像为centos7,安装完netcore sdk 2.2后,执行操作:

dotnet new console
dotnet run

出现报错:

/usr/share/dotnet/sdk/2.2./Microsoft.Common.CurrentVersion.targets(,): error MSB3552: Resource file "**/*.resx" cannot be found. [/ConsoleApp1.csproj]

The build failed. Please fix the build errors and run again.

当时的目录为:

total
-rw-r--r--. root root Feb : ConsoleApp1.csproj
-rw-r--r--. root root Feb : Program.cs
-rw-r--r--. root root Dec : anaconda-post.log
lrwxrwxrwx. root root Dec : bin -> usr/bin
drwxr-xr-x. root root Feb : dev
drwxr-xr-x. root root Feb : etc
drwxr-xr-x. root root Apr home
lrwxrwxrwx. root root Dec : lib -> usr/lib
lrwxrwxrwx. root root Dec : lib64 -> usr/lib64
drwxr-xr-x. root root Apr media
drwxr-xr-x. root root Apr mnt
drwxr-xr-x. root root Feb : obj
drwxr-xr-x. root root Apr opt
dr-xr-xr-x. root root Feb : proc
dr-xr-x---. root root Feb : root
drwxr-xr-x. root root Feb : run
lrwxrwxrwx. root root Dec : sbin -> usr/sbin
drwxr-xr-x. root root Apr srv
dr-xr-xr-x. root root Feb : sys
drwxrwxrwt. root root Feb : tmp
drwxr-xr-x. root root Dec : usr
drwxr-xr-x. root root Dec : var

然后新建了一个文件夹:

mkdir testASPNETCORE
chmod testASPNETCORE
cd testASPNETCORE/
dotnet new console
The template "Console Application" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on /testASPNETCORE/testASPNETCORE.csproj...
Restoring packages for /testASPNETCORE/testASPNETCORE.csproj...
Generating MSBuild file /testASPNETCORE/obj/testASPNETCORE.csproj.nuget.g.props.
Generating MSBuild file /testASPNETCORE/obj/testASPNETCORE.csproj.nuget.g.targets.
Restore completed in 155.46 ms for /testASPNETCORE/testASPNETCORE.csproj. Restore succeeded.
[root@359ed069320e testASPNETCORE]# ll
total
-rw-r--r--. root root Feb : Program.cs
drwxr-xr-x. root root Feb : obj
-rw-r--r--. root root Feb : testASPNETCORE.csproj
[root@359ed069320e testASPNETCORE]# dotnet run
Hello World!

看来好像是路径和权限问题

继续测试

mkdir testAspNetCore2
cd testAspNetCore2/
dotnet new console
The template "Console Application" was created successfully. Processing post-creation actions...
Running 'dotnet restore' on /testAspNetCore2/testAspNetCore2.csproj...
Restoring packages for /testAspNetCore2/testAspNetCore2.csproj...
Generating MSBuild file /testAspNetCore2/obj/testAspNetCore2.csproj.nuget.g.props.
Generating MSBuild file /testAspNetCore2/obj/testAspNetCore2.csproj.nuget.g.targets.
Restore completed in 158.03 ms for /testAspNetCore2/testAspNetCore2.csproj. Restore succeeded. [root@359ed069320e testAspNetCore2]# dotnet run
Hello World!

看来确定是路径问题,权限不设置777也可以.

最新文章

  1. SpringMVC 温故而知新
  2. 初学python第一天
  3. codeforces589J 简单dfs,队列
  4. 使用Python创建简单的HTTP和FTP服务
  5. CSS 子选择器(六)
  6. 15个最好的Bootstrap设计工具推荐
  7. CSS3的position:sticky介绍
  8. (转 飛雲若雪)ADO.NET
  9. 【异构计算】GPU与CPU
  10. 【社交系统ThinkSNS+研发日记三】基于 Laravel Route 的 ThinkSNS+ Component
  11. 【前端】Vue2全家桶案例《看漫画》之五、引入axios
  12. Stanford Local 2016 G "Ground Defense"(线段树)
  13. join查询优化
  14. 走进JDK(十二)------TreeMap
  15. 基于BeautifulSoup库的HTML内容的查找
  16. git bash 下操作文件及文件夹命令
  17. Windows下安装配置爬虫工具Scrapy及爬虫环境
  18. Alpha 冲刺六
  19. 初始pip
  20. mustache语法 转自小花大方

热门文章

  1. PreparedStatement插入values
  2. spring 接收前台ajax传来的参数的几个方法
  3. Android 开发工具类 25_getJSON
  4. Disconf 学习系列之Disconf 的模块架构图
  5. Java的try-catch-finally
  6. filebeat output redis 报错 i/o timeout
  7. 关于gcc编译器中函数不用进行原型声明的解释
  8. Rails 建立一个资源
  9. 订阅 memcached: error while loading shared libraries: libevent-2.0.so.5: cannot o解决
  10. HTML5的新结构标签