Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port FxCop rule CA908: AvoidTypesThatRequireJitCompilationInPrecompiledAssemblies #722

Closed
ghost opened this issue Dec 3, 2015 · 0 comments

Comments

@ghost
Copy link

ghost commented Dec 3, 2015

Title: Avoid types that require JIT compilation in precompiled assemblies

Description:

Assemblies that are precompiled (using ngen.exe) should only instantiate generic types that will not cause JIT compilation at runtime. Generic types with value type type parameters (outside of a special set of supported runtime generic types) will always cause JIT compilation, even if the encapsulating assembly has been precompiled. If this is not an precompiled assembly this message should be suppressed or this rule should be disabled.

Dependency: None

Notes:

@ghost ghost closed this as completed Dec 3, 2015
JaynieBai pushed a commit to dotnet/msbuild that referenced this issue Oct 17, 2023
Context
The sole purpose of introducing the type seems to have been silencing a legacy code analyzer rule. The rule does not exist anymore / has not been brought over to Roslyn (dotnet/roslyn-analyzers#722) and it's now hurting performance, if anything. Types like HashSet<int> are part of the mscorlib native image and it's wasteful to duplicate the code in our binaries. The rest is handled by IBC/OptProf.

Changes Made
Deleted NGen and its uses.

Testing
Experimental insertion to confirm no regressions.
MichalPavlik pushed a commit to dotnet/msbuild that referenced this issue Oct 17, 2023
Context
The sole purpose of introducing the type seems to have been silencing a legacy code analyzer rule. The rule does not exist anymore / has not been brought over to Roslyn (dotnet/roslyn-analyzers#722) and it's now hurting performance, if anything. Types like HashSet<int> are part of the mscorlib native image and it's wasteful to duplicate the code in our binaries. The rest is handled by IBC/OptProf.

Changes Made
Deleted NGen and its uses.

Testing
Experimental insertion to confirm no regressions.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants