在Windows 7上构建Visual Studio 2008 c#项目并在Windows XP上运行它们 [英] Built Visual studio 2008 c# projects on Windows 7 and run them on Windows XP

查看:69
本文介绍了在Windows 7上构建Visual Studio 2008 c#项目并在Windows XP上运行它们的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

每当我在Windows 7上构建Visual Studio 2008 c#项目时,尝试在Windows XP上运行该应用程序都会导致错误.但是,如果我在Windows XP上构建相同的项目,它将运行平稳.

这是我得到的错误.

Hello,

whenever I build a visual studio 2008 c# project on Windows 7, an attempt to run the application on Windows xp would result in an error. However, if I build the same project on windows xp, it would run smoothly.

This is the error I''m getting.

System.ArgumentException: Parameter is not valid.<br />
   at System.Drawing.Image.get_FrameDimensionsList()<br />
   at System.Drawing.ImageAnimator.CanAnimate(Image image)<br />
   at System.Drawing.ImageAnimator.ImageInfo..ctor(Image image)<br />
   at System.Drawing.ImageAnimator.Animate(Image image, EventHandler onFrameChangedHandler)<br />
   at System.Windows.Forms.PictureBox.Animate(Boolean animate)<br />
   at System.Windows.Forms.PictureBox.Animate()<br />
   at System.Windows.Forms.PictureBox.InstallNewImage(Image value, ImageInstallationType installationType)<br />
   at System.Windows.Forms.PictureBox.set_Image(Image value)



有人知道这个问题可能是什么吗?

谢谢



Anyone have an idea of what this issue might be?

Thank you

推荐答案

最可能的原因:转到progect(s)属性,检查目标程序集和目标CPU(最好是"any cpu").这些涉及的所有程序集的参数应在一台计算机上编译并运行,然后与另一台计算机上安装的任何程序兼容.您知道CPU架构和.NET Framework的安装版本吗?你应该知道.

如果这样做没有帮助,请完全转储异常(递归输出异常堆栈,所有内部异常).查看异常堆栈,并提供负责异常的代码.发布异常转储文本和代码.如果您不知道如何转储异常,则提出问题将毫无用处,您需要学习它以易于理解的方式报告问题.

—SA
Most likely reason: Go to progect(s) properties, check up target assembly and target CPU (better be "any cpu"). These parameters for all assemblies involved should compile and run on one machine and then compatible with whatever installed on the other one. Do you know CPU architectures and installed versions of .NET Framework? You should know.

If this does not help, dump exception in full (output exception stack, all inner exceptions, recursively). Look at the exception stack and provide codes responsible for exception. Post text of exception dump and the code. If you don''t know how to dump exception, asking questions would be useless, you need to learn it to report problems in comprehensible way.

—SA


问题已解决.我使用内存流加载了图像.但是,仍不清楚为什么仅在Windows 7上构建解决方案时才会出现此问题.

有人知道吗?
Problem is resolved. I loaded the image using a memory stream. However it''s still not clear why this problem was only raised when the solution was built on windows 7.

Anyone have a clue?


这篇关于在Windows 7上构建Visual Studio 2008 c#项目并在Windows XP上运行它们的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆