无法将类型为“Microsoft.Data.Entity.Build.Tasks.EntityDeploy”的对象强制转换为类型

pxesoft 2023-02-20 09:01:27

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace xx
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("初学C#测试");
        }
    }
}
 

错误    1    The "EntityDeploy" task could not be instantiated from the assembly "C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Data.Entity.Build.Tasks.dll". Please verify the task assembly has been built using the same version of the Microsoft.Build.Framework assembly as the one installed on your computer and that your host application is not missing a binding redirect for Microsoft.Build.Framework. 无法将类型为“Microsoft.Data.Entity.Build.Tasks.EntityDeploy”的对象强制转换为类型“Microsoft.Build.Framework.ITask”。

错误    2    The "EntityDeploy" task has been declared or used incorrectly, or failed during construction. Check the spelling of the task name and the assembly name.   
VS2017中运行正常,但在VS2008就提示这个错误,请大家帮忙看看,这2个错误怎么解决,谢谢!

...全文
402 回复 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

1,979

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 其他语言讨论
社区管理员
  • 其他语言社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧