首页 新闻 会员 周边

VS2015 编译.NET Core项目时出错:"error CS0006: Metadata file could not be found"

0
悬赏园豆:20 [已解决问题] 解决于 2016-12-26 11:01

在用 Visual Studio 编译一个 .NET Core 项目时出错如下的错误:

error CS0006: Metadata file '...' could not be found
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets

而在命令行下用 dotnet build 命令可以正常编译。

dudu的主页 dudu | 高人七级 | 园豆:31007
提问于:2016-12-26 10:49
< >
分享
最佳答案
0

是.xproj中的OutputPath路径设置引起的,将 ..\bin\ 改为 .\bin\ 问题就解决了。

<OutputPath Condition="'$(OutputPath)'=='' ">..\bin\</OutputPath>

改为

<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
dudu | 高人七级 |园豆:31007 | 2016-12-26 11:01
其他回答(1)
0

路径带空格,没有加引号?

收获园豆:20
Supper_litt | 园豆:827 (小虾三级) | 2016-12-26 10:51
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册