简体   繁体   English

.Net 项目给出许多错误 'Microsoft.VisualBasic.PowerPacks.OvalShape' 未定义,在完全 Win10 重新安装后

[英].Net Project gives Many Errors 'Microsoft.VisualBasic.PowerPacks.OvalShape' is not defined, after Full Win10 Reinstall

(Apologies- I originally posted this under another case that had the same type of error message: Microsoft.VisualBasic.Powerpacks.ShapeContainer not found ) (抱歉-我最初是在另一个具有相同类型错误消息的情况下发布的: Microsoft.VisualBasic.Powerpacks.ShapeContainer not found

My VS2019 project loads with 53 errors now, after reinstalling everything on a new HDD, after the Dec 2022 MS update killed my old Win 10 system.在 2022 年 12 月 MS 更新杀死我的旧 Win 10 系统后,在新硬盘上重新安装所有内容后,我的 VS2019 项目现在加载有 53 个错误。 Opening the project in VS2019 gives lots of errors like: 'Microsoft.VisualBasic.PowerPacks.ShapeContainer' is not defined 'Microsoft.VisualBasic.PowerPacks.Shape' is not defined 'Microsoft.VisualBasic.PowerPacks.OvalShape' is not defined or 'FillGradientStyle' is not a member of 'PowerPacks'.在 VS2019 中打开项目会出现很多错误,例如: 'Microsoft.VisualBasic.PowerPacks.ShapeContainer' is not defined 'Microsoft.VisualBasic.PowerPacks.Shape' is not defined 'Microsoft.VisualBasic.PowerPacks.OvalShape' is not defined 或 'FillGradientStyle ' 不是 'PowerPacks' 的成员。

On the old win 10 system all my projects worked fine.在旧的 win 10 系统上,我所有的项目都运行良好。 I had migrated one of the projects from VS2008 to VS2019 and got it working in both versions.我已将其中一个项目从 VS2008 迁移到 VS2019,并使其在两个版本中都能正常工作。

Now in the new Win 10 install I installed VS2008 again and VS2019 then copied my project folders over to my C drive.现在在新的 Win 10 安装中,我再次安装了 VS2008 和 VS2019,然后将我的项目文件夹复制到我的 C 驱动器。

My old Win 10 system and my old Win 7 system had a directory in Program Files x86 called 'Microsoft Visual Basic 2005 Power Packs', and inside is a folder named '3.0';我的旧Win 10系统和我的旧Win 7系统在Program Files x86中有一个名为'Microsoft Visual Basic 2005 Power Packs'的目录,里面有一个名为'3.0'的文件夹; but I cannot find this anywhere (the download link provided in the other case does not exist now), so I simply copied that old directory over to my new Win 10 C:\Program Files (x86).但我无法在任何地方找到它(另一种情况下提供的下载链接现在不存在),所以我只是将该旧目录复制到我的新 Win 10 C:\Program Files (x86)。

Opening the project in VS2019 gives lots of errors as shown above.在VS2019中打开项目出现如上所示的大量错误。 I also tried copying my old VS2008 version project folder over, and even opening that in VS2008 it gives these errors now.我还尝试将我的旧 VS2008 版本项目文件夹复制过来,甚至在 VS2008 中打开它现在也会出现这些错误。

The project references in both versions of the project already have C:\Program Files (x86)\Common Files\microsoft shared\Visual Basic Power Packs\1.1\Microsoft.VisualBasic.PowerPacks.Vs.dll and when I select this in the references window, the properties window populates and shows it is Version 9.0.0 (but RunTime Version v2.0.50727).项目的两个版本中的项目引用已经有 C:\Program Files (x86)\Common Files\microsoft shared\Visual Basic Power Packs\1.1\Microsoft.VisualBasic.PowerPacks.Vs.dll 并且当我在引用中使用 select window,属性 window 填充并显示它是版本 9.0.0(但运行时版本 v2.0.50727)。 The actual dll file referenced shows File and Product version 9.0.30729 and says the Product Name is Microsoft (R) Visual Studio (R) 2008. So it seems like both the VS2008 and the VS2019 project already was referencing the powerpacks.Vs installed by VS2008 and they should work.(They worked in the old Win 10 system, before MS ruined it).引用的实际 dll 文件显示文件和产品版本 9.0.30729,并表示产品名称为 Microsoft (R) Visual Studio (R) 2008。因此,VS2008 和 VS2019 项目似乎已经引用了由安装的 powerpacks.Vs VS2008,他们应该工作。(他们在旧的 Win 10 系统中工作,在 MS 破坏它之前)。

The Visual Basic 2005 Power Packs folder was only copied, not installed (possible problem?) but that may be a red herring, because the project has a reference to the VisualBasic.PowerPacks.Vs.dll. Visual Basic 2005 Power Packs 文件夹仅被复制,未被安装(可能是问题?)但这可能是一个转移注意力的问题,因为该项目引用了 VisualBasic.PowerPacks.Vs.dll。

What has happened?发生了什么? How do I fix it?我如何解决它?

More Info: The Toolbox is empty, but maybe that's because it only populates once a form is open.更多信息:工具箱是空的,但这可能是因为它只在表单打开后才会填充。 The main form will not open because it has components from the Powerpacks, like oval shapes and containers, so I understand the toolbox not populating there.主窗体不会打开,因为它有来自 Powerpacks 的组件,如椭圆形和容器,所以我知道工具箱没有填充在那里。 When I open my 'About' form, the toolbox populates, but the VisualBasicPowerpacks section has only a Pointer and PrintForm icon!当我打开我的“关于”表单时,工具箱会填充,但 VisualBasicPowerpacks 部分只有一个 Pointer 和 PrintForm 图标! No other shapes/components!没有其他形状/组件!

Just tried 'Choose Items' context menu option for the toolbox, but there are no powerpack entries there, even though the project references includes the powerpacks.Vs.刚刚尝试了工具箱的“选择项目”上下文菜单选项,但那里没有 powerpack 条目,即使项目引用包括 powerpacks.Vs。

OK, I have finally stumbled upon a solution myself.好的,我终于自己偶然发现了一个解决方案。 (Been working on this for a few days). (已经为此工作了几天)。

I believe there may be some incompatibility/confusion in how Visual Studio references powerpack versions.我认为 Visual Studio 引用 powerpack 版本的方式可能存在一些不兼容性/混淆。 Although my project had powerpacks.Vs referenced, and the Vs dll was there at the path, it clearly wasn't working.尽管我的项目引用了 powerpacks.Vs,并且 Vs dll 在路径中,但它显然无法正常工作。

Just now I opened the references window and clicked Add, then browsed to the C:\Program Files (x86)\Microsoft Visual Basic 2005 Power Packs\3.0 directory that I had copied from my old drive, selected the Microsoft.VisualBasic.PowerPacks.dll there (file version 3.0.30214.0) and clicked OK.刚才我打开引用 window 并单击添加,然后浏览到我从旧驱动器复制的 C:\Program Files (x86)\Microsoft Visual Basic 2005 Power Packs\3.0 目录,选择 Microsoft.VisualBasic.PowerPacks。 dll 那里(文件版本 3.0.30214.0)并单击确定。

Now both powerpack dlls are listed.现在列出了两个 powerpack dll。

Then I opened the main form -bingo- it loaded.然后我打开主窗体 -bingo- 它加载了。 The errors seemed to vanish.错误似乎消失了。 I opened the toolbox and had to select the main form then another tab a few times before it loaded.我打开了工具箱,在加载之前必须先 select 主窗体然后是另一个选项卡几次。 I right-clicked in the toolbox and added a new tab, named it Visual Basic Powerpacks 3.0 then right-clicked and selected 'Choose Items". I found all the shapes (rectangle, oval, line) and selected them and clicked oK. They now are in the toolbox.我在工具箱中右键单击并添加了一个新选项卡,将其命名为 Visual Basic Powerpacks 3.0,然后右键单击并选择“选择项目”。我找到了所有形状(矩形、椭圆形、直线)并选择它们并单击确定。他们现在在工具箱中。

So I don't know why it didn't just work when I copied the project files over to my new install, but maybe when I opened the project it couldn't find the 3.0 and so changed the reference to the Vs version?所以我不知道为什么当我将项目文件复制到我的新安装时它不能正常工作,但也许当我打开项目时它找不到 3.0 并因此更改了对 Vs 版本的引用?

Maybe someone knows what actually happened.也许有人知道实际发生了什么。 At least if anyone is caught by this problem this is quite likely what they need to do.I was lucky that I still have access to that old Powerpacks 3.0 directory, because it seems Microsoft has taken the old download page away.至少如果有人遇到这个问题,这很可能是他们需要做的。我很幸运,我仍然可以访问那个旧的 Powerpacks 3.0 目录,因为微软似乎已经拿走了旧的下载页面。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 引用 VB.NET 项目的 C# 项目:找不到程序集“Microsoft.VisualBasic,版本 10.0.0.0” - C# project referring to VB.NET project: Could not find assembly 'Microsoft.VisualBasic, Version 10.0.0.0' win10上开发Xamarin不再需要Visual Studio 2019? - Developing Xamarin no longer requires Visual Studio 2019 on win10? 无法附加到进程VS2019 / Win10 - Unable to attach to the process VS2019 / Win10 即使我添加了对项目的引用并包含 Microsoft.VisualBasic,Interaction.InputBox 也不存在 - Interaction.InputBox does not exist even though I add reference to project and include Microsoft.VisualBasic “Microsoft.VisualBasic.FileIO 不存在”。 如何在我的项目中包含这个库? - “Microsoft.VisualBasic.FileIO does not exist”. How to include this library in my project? 错误 BC30456:“VisualBasic”不是“Microsoft”的成员 - error BC30456: 'VisualBasic' is not a member of 'Microsoft' InvalidProjectFileException:升级到 VS2019 后来自 Microsoft.Build.Evaluation.Project 的“未找到 SDK 'Microsoft.NET.Sdk.Web'” - InvalidProjectFileException: "The SDK 'Microsoft.NET.Sdk.Web' not found" from Microsoft.Build.Evaluation.Project after upgrading to VS2019 如何在不重新安装完整 NuGet 的情况下在 Visual Studio 中恢复 NuGet 包 - How to restore NuGet packages in Visual Studio without a full NuGet reinstall ORA-01460: 未实现或不合理的转换(将 docx 转换为 pdf 并上传到 db 后)VisualBasic (VB) - ORA-01460: unimplemented or unreasonable conversion (after conversion of a docx to pdf and uploading to db) VisualBasic (VB) 使用 Visual Studio 在 Unreal 中创建新的 class c++ 给了我太多错误 - Creating a new class c++ in Unreal with Visual Studio gives me too many errors
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM