這是歷史版本頁面 — 看 .NET Framework (4) 最新版本
裝軟體跳出缺.NET Framework 4,它到底在幹嘛
你下載了一個想用的軟體,雙擊安裝檔,結果畫面跳出一串英文,說你的電腦缺少 .NET Framework 4,問你要不要下載安裝。你當下只想快點把軟體裝好,根本不想研究這是什麼東西,但偏偏不裝它,你要的軟體就是開不起來。這種「被系統攔住、卡在安裝第一步」的感覺,很多人都在裝遊戲、繪圖軟體或公司內部工具時遇過。
有些人會直接略過提示,結果軟體打不開;有些人上網亂抓安裝檔,裝了一堆來路不明的東西。其實這類工具扮演的角色很單純:它是一個執行環境,讓用特定程式語言寫出來的軟體能在 Windows 上跑。你不需要懂技術細節,只要知道「當軟體要求它,你就裝它」就夠了。
01裝遊戲或程式一直跳出要裝 .NET Framework 4,不裝會怎樣
不裝的話,那個軟體通常無法啟動,或啟動後立刻閃退。它提供執行環境和共用程式庫,很多 Windows 軟體在開發時就依賴它,少了它,軟體找不到需要的元件就會直接放棄執行。如果你遇到的是安裝檔主動跳出提示,照著安裝通常就能解決;如果裝完還是不能跑,問題可能出在別的地方。
02這套軟體裝了之後到底能幹嘛,我平常只上網看影片需要嗎
它本身沒有操作介面,不是一個你會打開來用的軟體。它是在背景提供執行環境,讓其他軟體能正常運作。一般使用者不會直接感受到它的存在,只有當你安裝的軟體或遊戲需要它時,系統才會跳出安裝提示。如果你沒遇過任何軟體要求它,就不需要主動安裝。
03它跟 .NET Core 差在哪,我該裝哪個
資料裡提到,.NET Framework 主要針對 Windows 平台,.NET Core 和 .NET 5+ 是後繼者,支援跨平台、架構更模組化。如果你只是要跑現有的 Windows 軟體,裝 .NET Framework 就夠了;如果你是開發者、要做跨平台應用,才需要考慮 .NET Core 或 .NET 5+。兩者用途不同,不是取代關係。
04裝了之後電腦會變慢嗎,會不會拖累效能
資料提到這版有效能最佳化和垃圾回收改進,理論上能讓依賴它的軟體跑得更順。但對一般使用者來說,它平常在背景待命,不會持續占用資源,實際影響很難感覺出來。如果你的電腦硬體規格較舊,裝了之後沒有明顯變慢,就不用擔心;如果真的覺得卡,問題通常出在別的地方。
05它支援哪些 Windows 版本,Win 7 或更舊的能裝嗎
資料顯示它支援 Windows 8、Windows 10、Windows 11。更舊的 Windows 版本沒有被列在支援清單裡,如果你還在用 Windows 7 或更早的系統,需要去微軟官網確認有沒有對應的版本可裝。另外,系統版本太舊的話,就算裝了,也可能因為缺少其他元件而無法正常運作。
06我是寫程式的,用這套開發有什麼要注意的
資料說它支援 C#、VB.NET、F# 等語言,提供豐富的類別庫,適合開發 Windows 桌面、Web 和行動應用。但要注意,微軟的重心已經轉到 .NET Core 和 .NET 5+,新專案建議先評估要不要直接用新平台。如果你要維護舊系統或開發 Windows 限定功能,用它還是可行的選擇。
07一般使用者遇到跳出提示,直接按安裝就好嗎
資料說安裝過程很直接,通常會隨 Windows Update 一起提供,也可以從微軟官網下載安裝程式。遇到提示時,照著指示安裝就好,裝完通常就能繼續安裝原本的軟體。要注意的是,下載來源要認明微軟官方管道,不要從不明網站抓安裝檔,以免裝到來路不明的東西。
08新專案還用這套開發適合嗎,會不會走回頭路
資料的結論寫得很清楚:微軟重心已經轉到 .NET Core 和 .NET 5+,.NET Framework 對新專案來說已經不是優先選擇。如果你要開發全新的應用,建議直接學 .NET Core 或 .NET 5+,除非你的專案有特殊需求,例如必須使用 Windows 限定功能,或要維護既有系統,才需要繼續用它。
09我要做跨平台 App,這套能應付嗎
資料明確提到它跨平台支援有限,主要針對 Windows 平台。如果你要開發能在 Windows、macOS、Linux 或手機上跑的應用,它不適合。這種情況應該考慮 .NET Core 或 .NET 5+,或改用 Java、Python、Node.js 等其他替代方案。先確認你的目標平台,再決定要用哪套工具。
10電腦裡已經有 .NET Framework 3.5,還要裝 4 嗎
資料沒有直接說明不同版本能否共存,但版本紀錄顯示它收錄了多個版本,代表不同版本可能同時存在於系統中。一般來說,不同版本的 .NET Framework 可以並存,不會互相覆蓋。建議先確認你要跑的軟體需要哪個版本,再決定要不要裝;如果軟體明確要求 4,就裝 4。
11這套軟體多久沒更新了,放著不管會有安全風險嗎
資料顯示它近兩年沒有更新紀錄,微軟的開發重心已經轉到 .NET Core 和 .NET 5+。雖然它本身算穩定,但長期沒有新版本,代表如果有安全漏洞,可能不會獲得修補。如果你只是為了跑舊軟體而裝它,風險相對低;如果在意安全,可以留意微軟官方的公告和建議。
下載與官方連結
NDP472-KB4054530-x86-x64-AllOS-ENU.exe · 68.29 MB · 連結指向軟體原廠
版本紀錄
- 2022-08-30 .NET Framework 4.8.1
- 2019-04-19 .NET Framework Version 4.8 69.35 MB
- 2018-05-01 .NET Framework Version 4.7.2 68.29 MB
再看 5 筆
- 2017-10-18 .NET Framework Version 4.7.1
- 2017-04-07 .NET Framework Version 4.7 58.73 MB
- 2016-08-02 .NET Framework Version 4.6.2 59.14 MB
- 2015-12-01 .NET Framework Version 4.6.1 64.55 MB
- 2015-07-22 .NET Framework Version 4.6 62.41 MB
這一版改了什麼
What's new in this version:
CORE:
- The .NET Framework 4.7.2 features a large number of cryptographic enhancements, better decompression support for ZIP archives, and additional collection APIs
New overloads of RSA.Create and DSA.Create:
- The DSA.Create(DSAParameters) and RSA.Create(RSAParameters) methods let you supply key parameters when instantiated a new DSA or RSA key
Rfc2898DeriveBytes constructors accept a hash algorithm name:
- The Rfc2898DeriveBytes class has three new constructors with a HashAlgorithmName parameter that identifies the HMAC algorithm to use when deriving keys. Instead of using SHA-1, developers should use a SHA-2-based HMAC like SHA-256
Support for ephemeral keys:
PFX import can optionally load private keys directly from memory, bypassing the hard drive. When the new X509KeyStorageFlags.EphemeralKeySet flag is specified in an X509Certificate2 constructor or one of the overloads of the X509Certificate2.Import method, the private keys will be loaded as ephemeral keys. This prevents the keys from being visible on the disk. However:
- Since the keys are not persisted to disk, certificates loaded with this flag are not good candidates to add to an X509Store.
- Keys loaded in this manner are almost always loaded via Windows CNG. Therefore, callers must access the private key by calling extension methods, such as cert.GetRSAPrivateKey(). The X509Certificate2.PrivateKey property does not function.
- Since the legacy X509Certificate2.PrivateKey property does not work with certificates, developers should perform rigorous testing before switching to ephemeral keys.
Programmatic creation of PKCS#10 certification signing requests and X.509 public key certificates:
- Starting with the .NET Framework 4.7.2, workloads can generate certificate signing requests (CSRs), which allows certificate request generation to be staged into existing tooling. This is frequently useful in test scenarios
New SignerInfo members:
- Starting with the .NET Framework 4.7.2, the SignerInfo class exposes more information about the signature. You can retrieve the value of the System.Security.Cryptography.Pkcs.SignerInfo.SignatureAlgorithm property to determine the signature algorithm used by the signer. SignerInfo.GetSignature can be called to get a copy of the cryptographic signature for this signer
- Leaving a wrapped stream open after CryptoStream is disposed
- Starting with the .NET Framework 4.7.2, the CryptoStream class has an additional constructor that allows Dispose to not close the wrapped stream
Decompression changes in DeflateStream:
- Starting with the .NET Framework 4.7.2, the implementation of decompression operations in the DeflateStream class has changed to use native Windows APIs by default. Typically, this results in a substantial performance improvement.
- Support for decompression by using Windows APIs is enabled by default for applications that target .NET Framework 4.7.2. Applications that target earlier versions of .NET Framework but are running under .NET Framework 4.7.2 can opt into this behavior by adding the following AppContext switch to the application configuration file: <AppContextSwitchOverrides value="Switch.System.IO.Compression.DoNotUseNativeZipLibraryForDecompression=false" />
Additional collection APIs:
- The .NET Framework 4.7.2 adds a number of new APIs to the SortedSet<T> and HashSet<T> types
ASP.NET:
Support for dependency injection in Web Forms:
Dependency injection (DI) decouples objects and their dependencies so that an object's code no longer needs to be changed just because a dependency has changed. When developing ASP.NET applications that target the .NET Framework 4.7.2, you can:
- Use setter-based, interface-based, and constructor-based injection in handlers and modules, Page instances, and user controls of ASP.NET web application projects
- Use setter-based and interface-based injection in handlers and modules, Page instances, and user controls of ASP.NET web site projects
- Plug in different dependency injection frameworks
Support for same-site cookies:
- SameSite prevents a browser from sending a cookie along with a cross-site request. The .NET Framework 4.7.2 adds a HttpCookie.SameSite property whose value is a System.Web.SameSiteMode enumeration member. If its value is SameSiteMode.Strict or SameSiteMode.Lax, ASP.NET adds the SameSite attribute to the set-cookie header. SameSite support applies to HttpCookie objects, as well as to FormsAuthentication and System.Web.SessionState cookies
NETWORKING:
Implementation of HttpClientHandler properties:
The .NET Framework 4.7.1 added eight properties to the System.Net.Http.HttpClientHandler class. However, two threw a PlatformNotSupportedException. The .NET Framework 4.7.2 now provides an implementation for these properties. The properties are:
- CheckCertificateRevocationList
- SslProtocols
SQLCLIENT:
- Support for Azure Active Directory Universal Authentication and Multi-Factor authentication
- Growing compliance and security demands require that many customers use multi-factor authentication (MFA). In addition, current best practices discourage including user passwords directly in connection strings. To support these changes, the .NET Framework 4.7.2 extends SQLClient connection strings by adding a new value, "Active Directory Interactive", for the existing "Authentication" keyword to support MFA and Azure AD Authentication. The new interactive method supports native and federated Azure AD users as well as Azure AD guest users. When this method is used, the MFA authentication imposed by Azure AD is supported for SQL databases. In addition, the authentication process requests a user password to adhere to security best practices.
- In previous versions of the .NET Framework, SQL connectivity supported only the SqlAuthenticationMethod.ActiveDirectoryPassword and SqlAuthenticationMethod.ActiveDirectoryIntegrated options. Both of these are part of the non-interactive ADAL protocol, which does not support MFA. With the new SqlAuthenticationMethod.ActiveDirectoryInteractive option, SQL connectivity supports MFA as well as existing authentication methods (password and integrated authentication), which allows users to enter user passwords interactively without persisting passwords in the connection string.
- Support for Always Encrypted version 2
NET Framework 4.7.2 adds supports for enclave-based Always Encrypted. The original version of Always Encrypted is a client-side encryption technology in which encryption keys never leave the client. In enclave-based Always Encrypted, the client can optionally send the encryption keys to a secure enclave, which is a secure computational entity that can be considered part of SQL Server but that SQL Server code cannot tamper with. To support enclave-based Always Encrypted, the .NET Framework 4.7.2 adds the following types and members to the System.Data.SqlClient namespace:
- SqlConnectionStringBuilder.EnclaveAttestationUrl, which specifies the Uri for enclave-based Always Encrypted
- SqlColumnEncryptionEnclaveProvider, which is an abstract class from which all enclave providers are derived
- SqlEnclaveSession, which encapsulates the state for a given enclave session
- SqlEnclaveAttestationParameters, which provides the attestation parameters used by SQL Server to get information required to execute a particular Attestation Protocol
WINDOWS PRESENTATION FOUNDATION:
Finding ResourceDictionaries by Source:
- Starting with the .NET Framework 4.7.2, a diagnostic assistant can locate the ResourceDictionaries that have been created from a given source Uri. (This feature is for use by diagnostic assistants, not by production applications.) A diagnostic assistant such as Visual Studio’s “Edit-and-Continue” facility lets its user edit a ResourceDictionary with the intent that the changes be applied to the running application. One step in achieving this is finding all the ResourceDictionaries that the running application has created from the dictionary that’s being edited. For example, an application can declare a ResourceDictionary whose content is copied from a given source URI: <ResourceDictionary Source="MyRD.xaml">
- A diagnostic assistant that edits the original markup in MyRD.xaml can use the new feature to locate the dictionary. The feature is implemented by a new static method, ResourceDictionaryDiagnostics.GetResourceDictionariesForSource. The diagnostic assistant calls the new method using an absolute Uri that identifies the original markup, as illustrated by the following code: IEnumerable<ResourceDictionary> dictionaries = ResourceDictionaryDiagnostics.GetResourceDictionariesForSource(new Uri("pack://application:,,,/MyApp;component/MyRD.xaml"));
Finding ResourceDictionary owners:
- Starting with the .NET Framework 4.7.2, a diagnostic assistant can locate the owners of a given ResourceDictionary. (The feature is for use by diagnostic assistants and not by production applications.) Whenever a change is made to a ResourceDictionary, WPF automatically finds all DynamicResource references that might be affected by the change.
- A diagnostic assistant such as Visual Studio’s “Edit-and-Continue” facility may want extend this to handle StaticResource references. The first step in this process is to find the owners of the dictionary; that is, to find all the objects whose Resources property refers to the dictionary (either directly, or indirectly via the ResourceDictionary.MergedDictionaries property). Three new static methods implemented on the System.Windows.Diagnostics.ResourceDictionaryDiagnostics class, one for each of the base types that has a Resources property
Finding StaticResource references:
- A diagnostic assistant can now receive a notification whenever a StaticResource reference is resolved. (The feature is for use by diagnostic assistants, not by production applications.) A diagnostic assistant such as Visual Studio’s “Edit-and-Continue” facility may want to update all uses of a resource when its value in a ResourceDictionary changes. WPF does this automatically for DynamicResource references, but it intentionally does not do so for StaticResource references. Starting with the .NET Framework 4.7.2, the diagnostic assistant can use these notifications to locate those uses of the static resource.
CLICKONCE:
- HDPI-aware applications for Windows Forms, Windows Presentation Foundation (WPF), and Visual Studio Tools for Office (VSTO) can all be deployed by using ClickOnce. If the following entry is found in the application manifest, deployment will succeed under .NET Framework 4.7.2: <windowsSettings> <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware></windowsSettings>
- For Windows Forms application, the previous workaround of setting DPI awareness in the application configuration file rather than the application manifest is no longer necessary for ClickOnce deployment to succeed