【发布时间】:2023-03-16 18:25:01
【问题描述】:
我在我的项目中使用 postsharp。当我尝试构建解决方案时,出现以下错误。
"The "PostSharp.MSBuild.PostSharp30DetectNativeFrameworkVersion" task could not be loaded from the assembly C:\ProgramData\PostSharp\3.1.49\bin.Release\PostSharp.MSBuild.v3.1.49.Release.dll. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask."
如何解决?
谢谢
【问题讨论】:
-
PostSharp 可能没有正确添加到项目中。您可以尝试重新安装 PostSharp NuGet 包。还要在 *.csproj 文件中检查程序集引用和“import”元素是否引用相同版本的 PostSharp。
标签: postsharp