大神,您好!
通过VS工具能正常编译,使用命令msbuild /t:Rebuild /p:Configuration=Release /p:DeployOnBuild=true 也能正常编译通过,但是增加了输出路径参数(/p:OutDir=c:\test20200824) 出现以下报错:
Extensions\IDependencyScopeExtension.cs(36,46): error CS0246: 未能找到类型或命名空间名“IDependencyScope”(是否缺少 usi
g 指令或程序集引用?)[C:\SVN\XX\XXXX.Framework.Web.csproj]
已完成生成项目“C:\SVN\XX\XXXX.Framework.Web.csproj”(Rebuid 个目标)的操作 - 失败。
经查看test20200824目录下已生成了部分dll,IDependencyScope所在(System.Web.Http)的dll未在OutDir指定的目录,通过手动复制System.Web.Http.dll到OutDir目录,再使用msbuild /t:Rebuild /p:Configuration=Release /p:OutDir=c:\test20200824 /p:DeployOnBuild=true 编译正常。问题是msbuild为什么不能自动把System.Web.Http.dll复制到outDir里?