Skip to content

Commit 22accbc

Browse files
author
John Stallo
committed
Merge remote-tracking branch 'upstream/master'
2 parents 2f19f7a + acb0fd5 commit 22accbc

27 files changed

+459
-491
lines changed

.openpublishing.redirection.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@
11591159
},
11601160
{
11611161
"source_path": "docs/install/install-visual-studio-in-offline-environment.md",
1162-
"redirect_url": "/visualstudio/install/install-certificates-for-visual-studio-offline",
1162+
"redirect_url": "/visualstudio/install/create-an-offline-installation-of-visual-studio",
11631163
"redirect_document_id": false
11641164
},
11651165
{

docs/TOC.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@
8383
#### [Manage Assembly and Manifest Signing](ide/managing-assembly-and-manifest-signing.md)
8484
##### [Sign Application and Deployment Manifests](ide/how-to-sign-application-and-deployment-manifests.md)
8585
#### [Specify an Application Icon (Visual Basic, C#)](ide/how-to-specify-an-application-icon-visual-basic-csharp.md)
86-
#### [Target a Specific .NET Framework Version](ide/targeting-a-specific-dotnet-framework-version.md)
87-
##### [Multi-Targeting Overview](ide/visual-studio-multi-targeting-overview.md)
86+
#### [Multi-Targeting Overview](ide/visual-studio-multi-targeting-overview.md)
8887
##### [Target a Version of the .NET Framework](ide/how-to-target-a-version-of-the-dotnet-framework.md)
8988
#### [Create Project and Item Templates](ide/creating-project-and-item-templates.md)
9089
##### [Create Project Templates](ide/how-to-create-project-templates.md)
Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
11
---
2-
title: "Automatic feature suspension | Microsoft Docs"
3-
ms.custom: ""
2+
title: "Automatic feature suspension in Visual Studio | Microsoft Docs"
43
ms.date: "11/04/2016"
5-
ms.reviewer: ""
6-
ms.suite: ""
7-
ms.tgt_pltfrm: ""
84
ms.topic: "article"
9-
helpviewer_keywords:
5+
helpviewer_keywords:
106
- "full solution analysis"
117
- "performance"
128
- "low-memory"
139
ms.assetid: 572c15aa-1fd0-468c-b6be-9fa50e170914
14-
caps.latest.revision: 6
1510
author: "gewarren"
1611
ms.author: "gewarren"
1712
manager: ghogen
18-
ms.technology:
19-
- "vs-ide-code-analysis"
20-
ms.workload:
13+
ms.technology: vs-ide-code-analysis
14+
ms.workload:
2115
- "multiple"
2216
---
2317
# Automatic feature suspension
24-
If your available system memory falls to 200MB or less, Visual Studio displays the following message in the code editor.
25-
26-
![Alert text suspending full solution analysis](../code-quality/media/fsa_alert.png "FSA_Alert")
27-
28-
When Visual Studio detects a low memory condition, it automatically suspends certain advanced features to help it remain stable. When this advanced feature suspension warning appears, Visual Studio will continue to work as before, but its performance will be slightly degraded.
29-
30-
In a low memory condition, the following occurs:
31-
32-
- Full solution analysis for Visual C# and Visual Basic is disabled.
33-
34-
- [Garbage Collection](/dotnet/standard/garbage-collection/index) (GC) low-latency mode for Visual C# and Visual Basic are disabled.
35-
36-
- Visual Studio caches are flushed.
37-
38-
## Improve Visual Studio performance
39-
For tips and tricks on how to improve Visual Studio performance when dealing with large solutions or low-memory conditions, see [Performance considerations for large solutions](https://github.com/dotnet/roslyn/wiki/Performance-considerations-for-large-solutions).
40-
41-
## Full solution analysis suspended
42-
By default, full solution analysis is enabled for Visual Basic and disabled for Visual C#. However, in a low memory condition, full solution analysis is automatically disabled for both Visual Basic and Visual C#, regardless of their settings in the Options dialog box. However, you can re-enable full solution analysis by choosing the **Re-enable** button in the info bar when it appears, by selecting the **Enable full solution analysis** check box in the Options dialog, or by restarting Visual Studio. The Options dialog box always shows the current full solution analysis settings. For more information, see [How to: Enable and Disable Full Solution Analysis](../code-quality/how-to-enable-and-disable-full-solution-analysis-for-managed-code.md).
43-
44-
## GC low-latency disabled
45-
To re-enable GC low-latency mode, restart Visual Studio. By default, Visual Studio enables GC low-latency mode whenever you are typing to ensure that your typing doesn't block any GC operations. However, if a low memory condition causes Visual Studio to display the automatic suspension warning, GC low-latency mode is disabled for that session. Restarting Visual Studio will re-enable the default GC behavior. For more information, see [GCLatencyMode Enumeration](http://msdn.microsoft.com/Library/057757a5-cd62-4d13-8a40-370eb7f47c87).
46-
47-
## Visual Studio caches flushed
48-
All Visual Studio caches are immediately emptied, but will begin to repopulate if you continue your current development session or restart Visual Studio. The caches flushed include caches for the following features.
49-
50-
- Find all references
51-
52-
- Navigate To
53-
54-
- Add Using
55-
56-
In addition, caches used for internal Visual Studio operations are also cleared.
57-
18+
19+
If your available system memory falls to 200 MB or less, Visual Studio displays the following message in the code editor:
20+
21+
![Alert text suspending full solution analysis](../code-quality/media/fsa_alert.png)
22+
23+
When Visual Studio detects a low memory condition, it automatically suspends certain advanced features to help it remain stable. Visual Studio continues to work as before, but its performance is degraded.
24+
25+
In a low memory condition, the following actions take place:
26+
27+
- Full solution analysis for Visual C# and Visual Basic is disabled.
28+
29+
- [Garbage Collection](/dotnet/standard/garbage-collection/index) (GC) low-latency mode for Visual C# and Visual Basic is disabled.
30+
31+
- Visual Studio caches are flushed.
32+
33+
## Improve Visual Studio performance
34+
35+
For tips and tricks on how to improve Visual Studio performance when dealing with large solutions or low-memory conditions, see [Performance considerations for large solutions](https://github.com/dotnet/roslyn/wiki/Performance-considerations-for-large-solutions).
36+
37+
## Full solution analysis suspended
38+
39+
By default, full solution analysis is enabled for Visual Basic and disabled for Visual C#. However, in a low memory condition, full solution analysis is automatically disabled for both Visual Basic and Visual C#, regardless of their settings in the Options dialog box. However, you can re-enable full solution analysis by choosing the **Re-enable** button in the info bar when it appears, by selecting the **Enable full solution analysis** check box in the Options dialog, or by restarting Visual Studio. The Options dialog box always shows the current full solution analysis settings. For more information, see [How to: Enable and Disable Full Solution Analysis](../code-quality/how-to-enable-and-disable-full-solution-analysis-for-managed-code.md).
40+
41+
## GC low-latency disabled
42+
43+
To re-enable GC low-latency mode, restart Visual Studio. By default, Visual Studio enables GC low-latency mode whenever you are typing to ensure that your typing doesn't block any GC operations. However, if a low memory condition causes Visual Studio to display the automatic suspension warning, GC low-latency mode is disabled for that session. Restarting Visual Studio re-enables the default GC behavior. For more information, see <xref:System.Runtime.GCLatencyMode>.
44+
45+
## Visual Studio caches flushed
46+
47+
If you continue your current development session or restart Visual Studio, all Visual Studio caches are immediately emptied, but begin to repopulate. The caches flushed include caches for the following features:
48+
49+
- Find all references
50+
51+
- Navigate To
52+
53+
- Add Using
54+
55+
In addition, caches used for internal Visual Studio operations are also cleared.
56+
5857
> [!NOTE]
59-
> The automatic feature suspension warning occurs only once on a per-solution basis, not on a per-session basis. This means that if you switch from Visual Basic to Visual C# (or vice-versa) and run into another low memory condition, you can possibly get another automatic feature suspension warning.
60-
61-
## See Also
62-
[How to: Enable and Disable Full Solution Analysis](../code-quality/how-to-enable-and-disable-full-solution-analysis-for-managed-code.md)
63-
[Fundamentals of Garbage Collection](/dotnet/standard/garbage-collection/fundamentals)
64-
[Performance considerations for large solutions](https://github.com/dotnet/roslyn/wiki/Performance-considerations-for-large-solutions)
58+
> The automatic feature suspension warning occurs only once on a per-solution basis, not on a per-session basis. This means that if you switch from Visual Basic to Visual C# (or vice-versa) and run into another low memory condition, you can possibly get another automatic feature suspension warning.
59+
60+
## See also
61+
62+
- [How to: Enable and Disable Full Solution Analysis](../code-quality/how-to-enable-and-disable-full-solution-analysis-for-managed-code.md)
63+
- [Fundamentals of Garbage Collection](/dotnet/standard/garbage-collection/fundamentals)
64+
- [Performance considerations for large solutions](https://github.com/dotnet/roslyn/wiki/Performance-considerations-for-large-solutions)
Lines changed: 74 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,89 @@
11
---
22
title: "CA2117: APTCA types should only extend APTCA base types | Microsoft Docs"
3-
ms.custom: ""
43
ms.date: "11/04/2016"
5-
ms.reviewer: ""
6-
ms.suite: ""
7-
ms.technology:
8-
- "vs-ide-code-analysis"
9-
ms.tgt_pltfrm: ""
4+
ms.technology: vs-ide-code-analysis
105
ms.topic: "article"
11-
f1_keywords:
6+
f1_keywords:
127
- "CA2117"
138
- "AptcaTypesShouldOnlyExtendAptcaBaseTypes"
14-
helpviewer_keywords:
9+
helpviewer_keywords:
1510
- "AptcaTypesShouldOnlyExtendAptcaBaseTypes"
1611
- "CA2117"
1712
ms.assetid: c505b586-2f1e-47cb-98ee-a5afcbeda70f
18-
caps.latest.revision: 16
1913
author: "gewarren"
2014
ms.author: "gewarren"
2115
manager: ghogen
22-
ms.workload:
16+
ms.workload:
2317
- "multiple"
2418
---
2519
# CA2117: APTCA types should only extend APTCA base types
26-
|||
27-
|-|-|
28-
|TypeName|AptcaTypesShouldOnlyExtendAptcaBaseTypes|
29-
|CheckId|CA2117|
30-
|Category|Microsoft.Security|
31-
|Breaking Change|Breaking|
32-
33-
## Cause
34-
A public or protected type in an assembly with the <xref:System.Security.AllowPartiallyTrustedCallersAttribute?displayProperty=fullName> attribute inherits from a type declared in an assembly that does not have the attribute.
35-
36-
## Rule Description
37-
By default, public or protected types in assemblies with strong names are implicitly protected by an <xref:System.Security.Permissions.SecurityAction.InheritanceDemand> for full trust. Strong-named assemblies marked with the <xref:System.Security.AllowPartiallyTrustedCallersAttribute> (APTCA) attribute do not have this protection. The attribute disables the inheritance demand. This makes exposed types declared in the assembly inheritable by types that do not have full trust.
38-
39-
When the APTCA attribute is present on a fully trusted assembly, and a type in the assembly inherits from a type that does not allow partially trusted callers, a security exploit is possible. If two types `T1` and `T2` meet the following conditions, malicious callers can use the type `T1` to bypass the implicit full trust inheritance demand that protects `T2`:
40-
41-
- `T1` is a public type declared in a fully trusted assembly that has the APTCA attribute.
42-
43-
- `T1` inherits from a type `T2` outside its assembly.
44-
45-
- `T2`'s assembly does not have the APTCA attribute and, therefore, should not be inheritable by types in partially trusted assemblies.
46-
47-
A partially trusted type `X` can inherit from `T1`, which gives it access to inherited members declared in `T2`. Because `T2` does not have the APTCA attribute, its immediate derived type (`T1`) must satisfy an inheritance demand for full trust; `T1` has full trust and therefore satisfies this check. The security risk is because `X` does not participate in satisfying the inheritance demand that protects `T2` from untrusted subclassing. For this reason, types with the APTCA attribute must not extend types that do not have the attribute.
48-
49-
Another security issue, and perhaps a more common one, is that the derived type (`T1`) can, through programmer error, expose protected members from the type that requires full trust (`T2`). When this occurs, untrusted callers gain access to information that should be available only to fully trusted types.
50-
51-
## How to Fix Violations
52-
If the type reported by the violation is in an assembly that does not require the APTCA attribute, remove it.
53-
54-
If the APTCA attribute is required, add an inheritance demand for full trust to the type. This protects against inheritance by untrusted types.
55-
56-
It is possible to fix a violation by adding the APTCA attribute to the assemblies of the base types reported by the violation. Do not do this without first conducting an intensive security review of all code in the assemblies and all code that depends on the assemblies.
57-
58-
## When to Suppress Warnings
59-
To safely suppress a warning from this rule, you must ensure that protected members exposed by your type do not directly or indirectly allow untrusted callers to access sensitive information, operations, or resources that can be used in a destructive manner.
60-
61-
## Example
62-
The following example uses two assemblies and a test application to illustrate the security vulnerability detected by this rule. The first assembly does not have the APTCA attribute and should not be inheritable by partially trusted types (represented by `T2` in the previous discussion).
63-
64-
[!code-csharp[FxCop.Security.NoAptcaInherit#1](../code-quality/codesnippet/CSharp/ca2117-aptca-types-should-only-extend-aptca-base-types_1.cs)]
65-
66-
## Example
67-
The second assembly, represented by `T1` in the previous discussion, is fully trusted and allows partially trusted callers.
68-
69-
[!code-csharp[FxCop.Security.YesAptcaInherit#1](../code-quality/codesnippet/CSharp/ca2117-aptca-types-should-only-extend-aptca-base-types_2.cs)]
70-
71-
## Example
72-
The test type, represented by `X` in the previous discussion, is in a partially trusted assembly.
73-
74-
[!code-csharp[FxCop.Security.TestAptcaInherit#1](../code-quality/codesnippet/CSharp/ca2117-aptca-types-should-only-extend-aptca-base-types_3.cs)]
75-
76-
This example produces the following output.
77-
78-
**Meet at the shady glen 2/22/2003 12:00:00 AM!**
79-
**From Test: sunny meadow**
80-
**Meet at the sunny meadow 2/22/2003 12:00:00 AM!**
81-
## Related Rules
82-
[CA2116: APTCA methods should only call APTCA methods](../code-quality/ca2116-aptca-methods-should-only-call-aptca-methods.md)
83-
84-
## See Also
85-
[Secure Coding Guidelines](/dotnet/standard/security/secure-coding-guidelines)
86-
[Using Libraries from Partially Trusted Code](/dotnet/framework/misc/using-libraries-from-partially-trusted-code)
20+
21+
|||
22+
|-|-|
23+
|TypeName|AptcaTypesShouldOnlyExtendAptcaBaseTypes|
24+
|CheckId|CA2117|
25+
|Category|Microsoft.Security|
26+
|Breaking Change|Breaking|
27+
28+
## Cause
29+
30+
A public or protected type in an assembly with the <xref:System.Security.AllowPartiallyTrustedCallersAttribute?displayProperty=fullName> attribute inherits from a type declared in an assembly that does not have the attribute.
31+
32+
## Rule Description
33+
34+
By default, public or protected types in assemblies with strong names are implicitly protected by an [InheritanceDemand](xref:System.Security.Permissions.SecurityAction#System_Security_Permissions_SecurityAction_InheritanceDemand) for full trust. Strong-named assemblies marked with the <xref:System.Security.AllowPartiallyTrustedCallersAttribute> (APTCA) attribute do not have this protection. The attribute disables the inheritance demand. Exposed types declared in an assembly without an inheritance demand are inheritable by types that do not have full trust.
35+
36+
When the APTCA attribute is present on a fully trusted assembly, and a type in the assembly inherits from a type that does not allow partially trusted callers, a security exploit is possible. If two types `T1` and `T2` meet the following conditions, malicious callers can use the type `T1` to bypass the implicit full trust inheritance demand that protects `T2`:
37+
38+
- `T1` is a public type declared in a fully trusted assembly that has the APTCA attribute.
39+
40+
- `T1` inherits from a type `T2` outside its assembly.
41+
42+
- `T2`'s assembly does not have the APTCA attribute and, therefore, should not be inheritable by types in partially trusted assemblies.
43+
44+
A partially trusted type `X` can inherit from `T1`, which gives it access to inherited members declared in `T2`. Because `T2` does not have the APTCA attribute, its immediate derived type (`T1`) must satisfy an inheritance demand for full trust; `T1` has full trust and therefore satisfies this check. The security risk is because `X` does not participate in satisfying the inheritance demand that protects `T2` from untrusted subclassing. For this reason, types with the APTCA attribute must not extend types that do not have the attribute.
45+
46+
Another security issue, and perhaps a more common one, is that the derived type (`T1`) can, through programmer error, expose protected members from the type that requires full trust (`T2`). When this exposure occurs, untrusted callers gain access to information that should be available only to fully trusted types.
47+
48+
## How to Fix Violations
49+
50+
If the type reported by the violation is in an assembly that does not require the APTCA attribute, remove it.
51+
52+
If the APTCA attribute is required, add an inheritance demand for full trust to the type. The inheritance demand protects against inheritance by untrusted types.
53+
54+
It is possible to fix a violation by adding the APTCA attribute to the assemblies of the base types reported by the violation. Do not do this without first conducting an intensive security review of all code in the assemblies and all code that depends on the assemblies.
55+
56+
## When to Suppress Warnings
57+
58+
To safely suppress a warning from this rule, you must ensure that protected members exposed by your type do not directly or indirectly allow untrusted callers to access sensitive information, operations, or resources that can be used in a destructive manner.
59+
60+
## Example
61+
62+
The following example uses two assemblies and a test application to illustrate the security vulnerability detected by this rule. The first assembly does not have the APTCA attribute and should not be inheritable by partially trusted types (represented by `T2` in the previous discussion).
63+
64+
[!code-csharp[FxCop.Security.NoAptcaInherit#1](../code-quality/codesnippet/CSharp/ca2117-aptca-types-should-only-extend-aptca-base-types_1.cs)]
65+
66+
The second assembly, represented by `T1` in the previous discussion, is fully trusted and allows partially trusted callers.
67+
68+
[!code-csharp[FxCop.Security.YesAptcaInherit#1](../code-quality/codesnippet/CSharp/ca2117-aptca-types-should-only-extend-aptca-base-types_2.cs)]
69+
70+
The test type, represented by `X` in the previous discussion, is in a partially trusted assembly.
71+
72+
[!code-csharp[FxCop.Security.TestAptcaInherit#1](../code-quality/codesnippet/CSharp/ca2117-aptca-types-should-only-extend-aptca-base-types_3.cs)]
73+
74+
This example produces the following output:
75+
76+
**Meet at the shady glen 2/22/2003 12:00:00 AM!**
77+
78+
**From Test: sunny meadow**
79+
80+
**Meet at the sunny meadow 2/22/2003 12:00:00 AM!**
81+
82+
## Related Rules
83+
84+
[CA2116: APTCA methods should only call APTCA methods](../code-quality/ca2116-aptca-methods-should-only-call-aptca-methods.md)
85+
86+
## See also
87+
88+
- [Secure Coding Guidelines](/dotnet/standard/security/secure-coding-guidelines)
89+
- [Using Libraries from Partially Trusted Code](/dotnet/framework/misc/using-libraries-from-partially-trusted-code)

0 commit comments

Comments
 (0)