将.NET SDK更新到6.0.200之后"部署到功能应用程序"Azure函数VS代码扩展的功能失败,原因是:
C:Program Filesdotnetsdk6.0.200Microsoft.Common.CurrentVersion.targets(4650,5): error MSB3883: Unexpected exception: [C:gitxproject1project1.csproj]
C:Program Filesdotnetsdk6.0.200Microsoft.Common.CurrentVersion.targets(4650,5): error : DirectoryNotFoundException: Could not find a part of the path 'C:gitxproject1binReleasenet6.0refproject1.dll'. [C:gitxproject1project1.csproj]
文件在中
C:gitxproject1binReleasenet6.0
但不在中
C:gitxproject1binReleasenet6.0ref
该怎么办来解决这个问题?
我相信这是因为这次制动变化:
将参考组件写入中间输出
工作组/解决方案
我认为,在发布新版本的Azure函数扩展之前,解决方法是按照将引用程序集写入中间输出并在项目文件中设置ProduceReferenceAssemblyInOutDir
。
<PropertyGroup>
<ProduceReferenceAssemblyInOutDir>true</ProduceReferenceAssemblyInOutDir>
</PropertyGroup>