在Windows Server 2012 中安装 .NET 3.5 Framework
2014-08-13 10:56
316 查看
如今,仍然有许多程序和应用需要依靠.NET 3.5 framework 来运行。在Windows Server 2012中,微软提供了.NET 3.5 和.NET 4.5的安装选项以为你的应用程序提供支持。但在安装.NET 3.5 组件时,你要多注意一些细节。
当使用服务器管理器来安装.NET 3.5 时你可能会遇到下面的提示信息,指出源文件无法找到:
![](http://images.cnitblog.com/blog/187718/201212/27163658-c0a4afa1c0d2432a8e48d53d63051807.png)
即使使用PowerShell来安装,你也可能看到类似的提示信息"The source files could not be downloaded"源文件无法下载,还报出一个0x800f0906的错误。在我这个例子中,服务器没有链接到Internet,无法访问Windows Update 服务器。
![](http://images.cnitblog.com/blog/187718/201212/27163701-9fa37c948db949099302567e40456345.png)
回到"添加角色和功能"向导,我再仔细看一下,你会发现这样一条警告信息,在窗口底部还给出了一个链接"Specify an alternate source path",指定一个可备选源路径。
![](http://images.cnitblog.com/blog/187718/201212/27163703-bae778d63e3a4238b993303218780a44.png)
其他的功能在添加时并不需要我们提供源文件,为什么我们安装.NET 3.5时却需要呢?如果你安装的是Full GUI版本,你在PowerShell中运行get-windowsfeature | ? installstate –eq "removed" , 你可看到那些组件的安装状态被设为了"removed"。"Removed"指出了哪些组件文件在本地服务器是没有的。下面是Windows Server 2012(无论哪个版本)的默认设置。
![](http://images.cnitblog.com/blog/187718/201212/27163705-b937518c129941d5ba3eb3b05d578041.png)
对于那些没有WSUS的服务器,或者没有连接到Windows Update的服务器所需要的组件也就无法检索到,我们就需要一个Windows Server 的安装介质(可以是光盘或者镜像),从中到side-by-side store (也就是sxs),作为备选源路径,来完成功能的安装。
我们可以从以下的安装方式中选择一种。
使用"添加角色和功能向导",点击窗口底部的链接,指定一个备选源路径。例如,D:是我的Windows Server DVD光盘。可使用如下路径:
D:\Sources\sxs
![](http://images.cnitblog.com/blog/187718/201212/27163707-6fc14d787a7f443ea006d5890fecd331.png)
使用 PowerShell, 指定源文件路径然后进行安装:
Install-WindowsFeature NET-Framework-Core –Source D:\Sources\sxs
使用命令提示符中的DISM命令,指定源文件路径然后进行安装:
DISM /Online /Enable-Feature /FeatureName:NetFx3 /Source:d:\sources\sxs
使用包含sxs文件夹的文件共享,指定unc共享路径:
Install-WindowsFeature NET-Framework-Core –Source \\ServerName\ShareName\sxs
当使用服务器管理器来安装.NET 3.5 时你可能会遇到下面的提示信息,指出源文件无法找到:
![](http://images.cnitblog.com/blog/187718/201212/27163658-c0a4afa1c0d2432a8e48d53d63051807.png)
即使使用PowerShell来安装,你也可能看到类似的提示信息"The source files could not be downloaded"源文件无法下载,还报出一个0x800f0906的错误。在我这个例子中,服务器没有链接到Internet,无法访问Windows Update 服务器。
![](http://images.cnitblog.com/blog/187718/201212/27163701-9fa37c948db949099302567e40456345.png)
回到"添加角色和功能"向导,我再仔细看一下,你会发现这样一条警告信息,在窗口底部还给出了一个链接"Specify an alternate source path",指定一个可备选源路径。
![](http://images.cnitblog.com/blog/187718/201212/27163703-bae778d63e3a4238b993303218780a44.png)
其他的功能在添加时并不需要我们提供源文件,为什么我们安装.NET 3.5时却需要呢?如果你安装的是Full GUI版本,你在PowerShell中运行get-windowsfeature | ? installstate –eq "removed" , 你可看到那些组件的安装状态被设为了"removed"。"Removed"指出了哪些组件文件在本地服务器是没有的。下面是Windows Server 2012(无论哪个版本)的默认设置。
![](http://images.cnitblog.com/blog/187718/201212/27163705-b937518c129941d5ba3eb3b05d578041.png)
对于那些没有WSUS的服务器,或者没有连接到Windows Update的服务器所需要的组件也就无法检索到,我们就需要一个Windows Server 的安装介质(可以是光盘或者镜像),从中到side-by-side store (也就是sxs),作为备选源路径,来完成功能的安装。
我们可以从以下的安装方式中选择一种。
使用"添加角色和功能向导",点击窗口底部的链接,指定一个备选源路径。例如,D:是我的Windows Server DVD光盘。可使用如下路径:
D:\Sources\sxs
![](http://images.cnitblog.com/blog/187718/201212/27163707-6fc14d787a7f443ea006d5890fecd331.png)
使用 PowerShell, 指定源文件路径然后进行安装:
Install-WindowsFeature NET-Framework-Core –Source D:\Sources\sxs
使用命令提示符中的DISM命令,指定源文件路径然后进行安装:
DISM /Online /Enable-Feature /FeatureName:NetFx3 /Source:d:\sources\sxs
使用包含sxs文件夹的文件共享,指定unc共享路径:
Install-WindowsFeature NET-Framework-Core –Source \\ServerName\ShareName\sxs
相关文章推荐
- 在Windows Server 2012 中安装 .NET 3.5 Framework
- 在Windows Server 2012 中安装 .NET 3.5 Framework
- 在Windows Server 2012 中安装 .NET 3.5 Framework
- Windows Server 2012 R2 或 2016 无法安装 .Net 3.5.1 .NET Framework 3.5
- 在Windows 8 或Windows Server 2012上安装.net framework 3.5
- windows server 2012 安装.net framework 3.5(针对服务器无网络情况,解决SQL server 2012 安装失败)
- Windows 8 & Windows Server 2012本地安装.NET Framework 3.5的方法(命令)
- windows server 2012 安装.NET Framwork 3.5
- Windows Server 2012下安装.NET Framework 3.5
- 在Windows Server 2012下安装.net framework 3.5
- [转]如何在Windows Server 2012中安装.Net Framework 3.5?
- Windows Server 2012 R2 安装.NET Framework 3.5报错
- Windows Server 2012上安装.NET Framework 3.5(不需要安装光盘)
- Windows Server 2012 安装.NET Framework 3.5报错
- Windows Server 2012 R2 安装.NET Framework 3.5报错
- [转]如何在Windows Server 2012中安装.Net Framework 3.5?
- Windows8不联网直接安装.Net 3.5 Framework的方法
- 【转】Windows8不联网直接安装.Net 3.5 Framework的方法
- Win8离线安装.Net-framework3.5