vs2008生成的执行文件,为什么在没有vs2008的系统上不能运行?

来源:百度知道 编辑:UC知道 时间:2024/06/04 09:47:19
这是程序所用的同文件。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using System.IO;

提示 System.io.filenotfoundexception

还需要哪些附加文件吗?

必须需要.NET Framework 3.5才可以运行。

目前只有Windows 7和Windwos Server 2008 R2 才默认预装3.5.

如果你在08上建的是Framework 3.5以上版本的网站,首先3.5新加了linq语句,命名空间和工具箱中的ajax系列控件等

VS2005建立的Web Application项目,升级到VS2008后,就无法再用VS2005打开了。

要使WebApplication项目文件兼容VS2005和VS2008,需在.csproj文件中找到如下一行:

<ImportProject="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets"/>

升级之前是:
<ImportProject="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v8.0\WebApplications\Microsoft.WebApplication.targets"/>
如果要同时兼容VS2005和VS2008,必须改为:

<ImportProject="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets"Condition="'$(Solutions.VSVersion)' == '9.0'" />

<Import Project="$(MSBuildExtensionsPath)\Microsoft\