vb.net 适用于 .net 3.5 的 Visual Studio 2013 和图表控件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22846401/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Visual Studio 2013 and Chart Control for .net 3.5
提问by JaredS
Good afternoon!
下午好!
So I have developed an application through Visual Studio 2013 using vb.net. It contains the default MS chart control and fills it with data from my database. My application runs beautifully on my Windows 7 .net 4.5 environment. No problems there.
所以我使用 vb.net 通过 Visual Studio 2013 开发了一个应用程序。它包含默认的 MS 图表控件并用我的数据库中的数据填充它。我的应用程序在我的 Windows 7 .net 4.5 环境中运行良好。没有问题。
Now that it's time to publish, I remember that my app needs to run in .net 3.5 for Windows XP users. So, I converted the project to .net 3.5 framework. Apparently, my chart control only works for .net 4.0 and up, giving me all kinds of errors. So, I publish the app regardless of the errors with the wizard and run it on my Windows 7 PC. It works! Now, I try to run the application in my Windows XP virtual machine with .net 3.5. (I have installed the Microsoft .net 3.5 chart control to XP in hopes that it will end up working.)
现在是发布的时候了,我记得我的应用程序需要在 .net 3.5 中为 Windows XP 用户运行。因此,我将项目转换为 .net 3.5 框架。显然,我的图表控件仅适用于 .net 4.0 及更高版本,给我各种错误。因此,我发布了该应用程序,而不管向导中是否存在错误,并在我的 Windows 7 PC 上运行它。有用!现在,我尝试使用 .net 3.5 在我的 Windows XP 虚拟机中运行该应用程序。(我已将 Microsoft .net 3.5 图表控件安装到 XP,希望它最终能正常工作。)
This is the error I'm getting when I run the application on my XP: "Cannot continue. The application is improperly formatted. Contact the application vendor for assistance."
这是我在 XP 上运行应用程序时遇到的错误:“无法继续。应用程序格式不正确。联系应用程序供应商寻求帮助。”
I'm still relatively new to publishing, so I'm not sure exactly what is wrong here. Is there a problem with the chart control, or is something wrong with the published files?
我对出版还是比较陌生,所以我不确定这里到底出了什么问题。是图表控件有问题,还是发布的文件有问题?
I have considered converting the app to .net 4.0, but the users that need the app are still running in 3.5.
我曾考虑将应用程序转换为 .net 4.0,但需要该应用程序的用户仍在 3.5 中运行。
Thanks for the help!
谢谢您的帮助!
回答by JaredS
I have it working now. I ended up installing VS 2010 on my Windows XP virtual machine and recreating the app there, copy/pasting code. With that, I was able to use the .NET 3.5 chart control without any issues. The publish and installation were both successful.
我现在可以工作了。我最终在我的 Windows XP 虚拟机上安装了 VS 2010 并在那里重新创建应用程序,复制/粘贴代码。这样,我就可以毫无问题地使用 .NET 3.5 图表控件。发布和安装都成功。
It looked like using an older version of VS was my best option. I thought it was best not to force users to install .NET 4.0.
看起来使用旧版本的 VS 是我最好的选择。我认为最好不要强迫用户安装 .NET 4.0。
Thank you guys for the help!
谢谢你们的帮助!
回答by HeXanon
If you use the .NET 4.0 version of the Chart Control you will experience issues with running on .NET 3.5
如果您使用 .NET 4.0 版本的图表控件,您将遇到在 .NET 3.5 上运行的问题
It would be better to get hold of the .NET 3.5 version of the control and use that in a .NET 3.5 app. In other words, Change your app to .NET 3.5, remove the existing MS Chart control and use the .NET 3.5 version.
最好掌握 .NET 3.5 版本的控件并在 .NET 3.5 应用程序中使用它。换句话说,将您的应用程序更改为 .NET 3.5,删除现有的 MS Chart 控件并使用 .NET 3.5 版本。
Download: Microsoft Chart Controls for Microsoft .NET Framework 3.5
下载:适用于 Microsoft .NET Framework 3.5 的 Microsoft Chart Controls

