diff --git a/README.md b/README.md index 1d3328b81b2..5f42a80256c 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,11 @@ all supported platforms, as well as the sources to .NET runtime and libraries. Official Starting Page: -* [How to use .NET](https://docs.microsoft.com/dotnet/core/get-started) (with VS, VS Code, command-line CLI) +* [How to use .NET](https://learn.microsoft.com/dotnet/core/get-started) (with VS, VS Code, command-line CLI) * [Install official releases](https://dotnet.microsoft.com/download) * [Install daily builds](docs/project/dogfooding.md) - * [Documentation](https://docs.microsoft.com/dotnet/core) (Get Started, Tutorials, Porting from .NET Framework, API reference, ...) - * [Deploying apps](https://docs.microsoft.com/dotnet/core/deploying) + * [Documentation](https://learn.microsoft.com/dotnet/core) (Get Started, Tutorials, Porting from .NET Framework, API reference, ...) + * [Deploying apps](https://learn.microsoft.com/dotnet/core/deploying) * [Supported OS versions](https://github.com/dotnet/core/blob/main/os-lifecycle-policy.md) * [Roadmap](https://github.com/dotnet/core/blob/main/roadmap.md) * [Releases](https://github.com/dotnet/core/tree/main/release-notes) @@ -53,7 +53,7 @@ For other issues, please file them to their appropriate sibling repos. We have l ## Useful Links * [.NET source index](https://source.dot.net) / [.NET Framework source index](https://referencesource.microsoft.com) -* [API Reference docs](https://docs.microsoft.com/dotnet/api) +* [API Reference docs](https://learn.microsoft.com/dotnet/api) * [.NET API Catalog](https://apisof.net) (incl. APIs from daily builds and API usage info) * [API docs writing guidelines](https://github.com/dotnet/dotnet-api-docs/wiki) - useful when writing /// comments * [.NET Discord Server](https://aka.ms/dotnet-discord) - a place to discuss the development of .NET and its ecosystem @@ -65,7 +65,7 @@ For other issues, please file them to their appropriate sibling repos. We have l There are many .NET related projects on GitHub. * [.NET home repo](https://github.com/Microsoft/dotnet) - links to 100s of .NET projects, from Microsoft and the community. -* [ASP.NET Core home](https://docs.microsoft.com/aspnet/core) - the best place to start learning about ASP.NET Core. +* [ASP.NET Core home](https://learn.microsoft.com/aspnet/core) - the best place to start learning about ASP.NET Core. This project has adopted the code of conduct defined by the [Contributor Covenant](https://contributor-covenant.org) to clarify expected behavior in our community. For more information, see the [.NET Foundation Code of Conduct](https://www.dotnetfoundation.org/code-of-conduct). diff --git a/docs/README.md b/docs/README.md index 46e859f945c..debc23ef00d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -12,7 +12,7 @@ Getting Started =============== - [Installing the .NET SDK](https://dotnet.microsoft.com/download) -- [Official .NET Docs](https://docs.microsoft.com/dotnet/core/) +- [Official .NET Docs](https://learn.microsoft.com/dotnet/core/) Workflow (Building, testing, benchmarking, profiling, etc.) =============== @@ -69,8 +69,8 @@ Other Information - [.NET Glossary](project/glossary.md) - [.NET Filename Encyclopedia](project/dotnet-filenames.md) -- [Porting to .NET Core](https://docs.microsoft.com/en-us/dotnet/standard/analyzers/portability-analyzer) +- [Porting to .NET Core](https://learn.microsoft.com/dotnet/standard/analyzers/portability-analyzer) - [.NET Standards (Ecma)](project/dotnet-standards.md) - [CLR Configuration Knobs](../src/coreclr/inc/clrconfigvalues.h) -- [CLR overview](https://docs.microsoft.com/dotnet/standard/clr) +- [CLR overview](https://learn.microsoft.com/dotnet/standard/clr) - [Wikipedia Entry for the CLR](https://en.wikipedia.org/wiki/Common_Language_Runtime) diff --git a/docs/coding-guidelines/adding-api-guidelines.md b/docs/coding-guidelines/adding-api-guidelines.md index 2db8da8cc1f..f405468bac7 100644 --- a/docs/coding-guidelines/adding-api-guidelines.md +++ b/docs/coding-guidelines/adding-api-guidelines.md @@ -25,7 +25,7 @@ the implementation without compat concerns in future releases. ### Determine target framework `net8.0` is the target framework version currently under development and the new apis -should be added to `net8.0`. [More Information on TargetFrameworks](https://docs.microsoft.com/en-us/dotnet/standard/frameworks) +should be added to `net8.0`. [More Information on TargetFrameworks](https://learn.microsoft.com/dotnet/standard/frameworks) ## Making the changes in repo @@ -42,7 +42,7 @@ If your new API or the APIs it calls throw any exceptions, those need to be manu After your change is merged, we will eventually port them to the dotnet-api-docs repo, where we will review them for language and proper style (For more information, see the [API writing guidelines](https://github.com/dotnet/dotnet-api-docs/wiki)). -Once the dotnet-api-docs change is merged, your comments will start showing up in the official API documentation at http://docs.microsoft.com/, and later they'll appear in IntelliSense in Visual Studio and Visual Studio Code. +Once the dotnet-api-docs change is merged, your comments will start showing up in the official API documentation at https://learn.microsoft.com, and later they'll appear in IntelliSense in Visual Studio and Visual Studio Code. Once the documentation is official, any subsequent updates to it must be made directly in https://github.com/dotnet/dotnet-api-docs/. It's fine to make updates to the triple slash comments later, they just won't automatically flow into the official docs. ## FAQ diff --git a/docs/coding-guidelines/api-guidelines/README.md b/docs/coding-guidelines/api-guidelines/README.md index 31dd7181785..e2025c13cee 100644 --- a/docs/coding-guidelines/api-guidelines/README.md +++ b/docs/coding-guidelines/api-guidelines/README.md @@ -9,5 +9,5 @@ actual [book][FDG]. To submit new proposals for design guidelines, simply create a PR adding or modifying an existing file. -[docs]: https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/ +[docs]: https://learn.microsoft.com/dotnet/standard/design-guidelines/ [FDG]: https://amazon.com/dp/0135896460 diff --git a/docs/coding-guidelines/clr-code-guide.md b/docs/coding-guidelines/clr-code-guide.md index ef6f7a555d6..a5b90d7e237 100644 --- a/docs/coding-guidelines/clr-code-guide.md +++ b/docs/coding-guidelines/clr-code-guide.md @@ -1028,14 +1028,14 @@ Here are some immediate tips for working well with the managed-debugging service - Do not change behavior when under the debugger. An app should behave identically when run outside or under the debugger. This is absolutely necessary else we get complaints like "my program only crashes when run under the debugger". This is also necessary because somebody may attach a debugger to an app after the fact. Specific examples of this: - Don't assume that just because an app is under the debugger that somebody is trying to debug it. - Don't add additional run-time error checks when under the debugger. For example, avoid code like: if ((IsDebuggerPresent() && (argument == null)) { throw MyException(); } - - Avoid massive perf changes when under the debugger. For example, don't use an interpreted stub just because you're under the debugger. We then get bugs like [my app is 100x slower when under a debugger](https://docs.microsoft.com/en-us/archive/blogs/jmstall/psa-pinvokes-may-be-100x-slower-under-the-debugger). + - Avoid massive perf changes when under the debugger. For example, don't use an interpreted stub just because you're under the debugger. We then get bugs like [my app is 100x slower when under a debugger](https://learn.microsoft.com/archive/blogs/jmstall/psa-pinvokes-may-be-100x-slower-under-the-debugger). - Avoid algorithmic changes. For example, do not make the JIT generate non-optimized code just because an app is under the debugger. Do not make the loader policy resolve to a debuggable-ngen image just because an app is under the debugger. - Separate your code into a) side-effect-free (non-mutating) read-only accessors and b) functions that change state. The motivation is that the debugger needs to be able to read-state in a non-invasive way. For example, don't just have GetFoo() that will lazily create a Foo if it's not available. Instead, split it out like so: - GetFoo() - fails if a Foo does not exist. Being non-mutating, this should also be GC_NOTRIGGER. Non-mutating will also make it much easier to DAC-ize. This is what the debugger will call. - and GetOrCreateFoo() that is built around GetFoo(). The rest of the runtime can call this. - The debugger can then just call GetFoo(), and deal with the failure accordingly. - If you add a new stub (or way to call managed code), make sure that you can source-level step-in (F11) it under the debugger. The debugger is not psychic. A source-level step-in needs to be able to go from the source-line before a call to the source-line after the call, or managed code developers will be very confused. If you make that call transition be a giant 500 line stub, you must cooperate with the debugger for it to know how to step-through it. (This is what StubManagers are all about. See [src\vm\stubmgr.h](https://github.com/dotnet/runtime/blob/main/src/coreclr/vm/stubmgr.h)). Try doing a step-in through your new codepath under the debugger. -- **Beware of timeouts** : The debugger may completely suspend your process at arbitrary points. In most cases, the debugger will do the right thing (and suspend your timeout too), but not always. For example, if you have some other process waiting for info from the debuggee, it [may hit a timeout](https://docs.microsoft.com/en-us/archive/blogs/jmstall/why-you-sometimes-get-a-bogus-contextswitchdeadlock-mda-under-the-debugger). +- **Beware of timeouts** : The debugger may completely suspend your process at arbitrary points. In most cases, the debugger will do the right thing (and suspend your timeout too), but not always. For example, if you have some other process waiting for info from the debuggee, it [may hit a timeout](https://learn.microsoft.com/archive/blogs/jmstall/why-you-sometimes-get-a-bogus-contextswitchdeadlock-mda-under-the-debugger). - **Use CLR synchronization primitives (like Crst)**. In addition to all the reasons listed in the synchronization section, the CLR-aware primitives can cooperate with the debugging services. For example: - The debugger needs to know when threads are modifying sensitive data (which correlates to when the threads lock that data). - Timeouts for CLR synchronization primitives may operate better in the face of being debugged. diff --git a/docs/coding-guidelines/framework-design-guidelines-digest.md b/docs/coding-guidelines/framework-design-guidelines-digest.md index ff2ce139977..d48ecc60727 100644 --- a/docs/coding-guidelines/framework-design-guidelines-digest.md +++ b/docs/coding-guidelines/framework-design-guidelines-digest.md @@ -308,5 +308,5 @@ conformance to the [Framework Design Guidelines][FDG] (also see [MSDN](https://m ## Presentations -* [Overview of the Framework Design Guidelines](https://docs.microsoft.com/en-us/archive/blogs/kcwalina/online-lecture-on-api-design) -* [TechEd 2007 Presentation about framework engineering](https://docs.microsoft.com/en-us/archive/blogs/kcwalina/video-recording-of-framework-engineering-architecting-designing-and-developing-reusable-libraries) +* [Overview of the Framework Design Guidelines](https://learn.microsoft.com/archive/blogs/kcwalina/online-lecture-on-api-design) +* [TechEd 2007 Presentation about framework engineering](https://learn.microsoft.com/archive/blogs/kcwalina/video-recording-of-framework-engineering-architecting-designing-and-developing-reusable-libraries) diff --git a/docs/coding-guidelines/interop-guidelines.md b/docs/coding-guidelines/interop-guidelines.md index b755f3cd74e..8338f4c1d04 100644 --- a/docs/coding-guidelines/interop-guidelines.md +++ b/docs/coding-guidelines/interop-guidelines.md @@ -1,7 +1,7 @@ Interop Guidelines ================== -We follow the [best practices for native interop](https://learn.microsoft.com/en-us/dotnet/standard/native-interop/best-practices) with the additional guidelines below that are specific to this repo. +We follow the [best practices for native interop](https://learn.microsoft.com/dotnet/standard/native-interop/best-practices) with the additional guidelines below that are specific to this repo. ## Goals We have the following goals related to interop code being used in dotnet/runtime: @@ -166,7 +166,7 @@ Using enums instead of partial, static classes can lead to needing lots of casts ## P/Invoke Definitions -When defining the P/Invoke signatures and structs, we follow the guidelines in the [interop best practices documentation](https://docs.microsoft.com/en-us/dotnet/standard/native-interop/best-practices). +When defining the P/Invoke signatures and structs, we follow the guidelines in the [interop best practices documentation](https://learn.microsoft.com/dotnet/standard/native-interop/best-practices). The runtime repo makes use of [source-generated p/invokes](../design/features/source-generator-pinvokes.md) whenever possible (see [the compatibility doc](../design/libraries/LibraryImportGenerator/Compatibility.md) for unsupported scenarios). Methods should be marked `LibraryImport` and be `static` and `partial`. diff --git a/docs/coding-guidelines/libraries-packaging.md b/docs/coding-guidelines/libraries-packaging.md index f7c926890bf..61829fe5459 100644 --- a/docs/coding-guidelines/libraries-packaging.md +++ b/docs/coding-guidelines/libraries-packaging.md @@ -46,7 +46,7 @@ Most metadata for packages is controlled centrally in the repository and individ Logging abstractions for Microsoft.Extensions.Logging. ``` -Package content can be defined using any of the publicly defined Pack inputs: https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets +Package content can be defined using any of the publicly defined Pack inputs: https://learn.microsoft.com/nuget/reference/msbuild-targets ### Package Readme diff --git a/docs/design/coreclr/botr/clr-abi.md b/docs/design/coreclr/botr/clr-abi.md index 417f6fdec53..1347b2c0c6b 100644 --- a/docs/design/coreclr/botr/clr-abi.md +++ b/docs/design/coreclr/botr/clr-abi.md @@ -14,11 +14,11 @@ Read everything in the documented Windows and non-Windows ABI documentation. The ## Windows ABI documentation -AMD64: See [x64 Software Conventions](https://docs.microsoft.com/en-us/cpp/build/x64-software-conventions). +AMD64: See [x64 Software Conventions](https://learn.microsoft.com/cpp/build/x64-software-conventions). -ARM: See [Overview of ARM32 ABI Conventions](https://docs.microsoft.com/en-us/cpp/build/overview-of-arm-abi-conventions). +ARM: See [Overview of ARM32 ABI Conventions](https://learn.microsoft.com/cpp/build/overview-of-arm-abi-conventions). -ARM64: See [Overview of ARM64 ABI conventions](https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions). +ARM64: See [Overview of ARM64 ABI conventions](https://learn.microsoft.com/cpp/build/arm64-windows-abi-conventions). ## Non-Windows ABI documentation diff --git a/docs/design/coreclr/botr/corelib.md b/docs/design/coreclr/botr/corelib.md index c5ff7f387e8..9662dc3f4e2 100644 --- a/docs/design/coreclr/botr/corelib.md +++ b/docs/design/coreclr/botr/corelib.md @@ -40,7 +40,7 @@ The CLR provides a [`mscorlib` binder](https://github.com/dotnet/runtime/blob/ma # Calling from managed to native code -Two techniques exist for calling into the CLR from managed code. FCall allows you to call directly into the CLR code, and provides a lot of flexibility in terms of manipulating objects, though it is easy to cause GC holes by not tracking object references correctly. QCall also allows you to call into the CLR via the P/Invoke, but is much harder to accidentally mis-use. FCalls are identified in managed code as extern methods with the [`MethodImplOptions.InternalCall`](https://docs.microsoft.com/dotnet/api/system.runtime.compilerservices.methodimploptions) bit set. QCalls are marked `static extern` methods similar to regular P/Invokes, but are directed toward a library called `"QCall"`. +Two techniques exist for calling into the CLR from managed code. FCall allows you to call directly into the CLR code, and provides a lot of flexibility in terms of manipulating objects, though it is easy to cause GC holes by not tracking object references correctly. QCall also allows you to call into the CLR via the P/Invoke, but is much harder to accidentally mis-use. FCalls are identified in managed code as extern methods with the [`MethodImplOptions.InternalCall`](https://learn.microsoft.com/dotnet/api/system.runtime.compilerservices.methodimploptions) bit set. QCalls are marked `static extern` methods similar to regular P/Invokes, but are directed toward a library called `"QCall"`. There is a small variant of FCall called HCall (for Helper call) for implementing JIT helpers. The HCall is intended for doing things like accessing multi-dimensional array elements, range checks, etc. The only difference between HCall and FCall is that HCall methods won't show up in an exception stack trace. @@ -50,13 +50,13 @@ First, remember that you should be writing as much as possible in managed code. Reasons to write FCalls in the past generally fell into three camps: missing language features, better performance, or implementing unique interactions with the runtime. C# now has almost every useful language feature that you could get from C++, including unsafe code and stack-allocated buffers, and this eliminates the first two reasons for FCalls. We have ported some parts of the CLR that were heavily reliant on FCalls to managed code in the past (such as Reflection, some Encoding, and String operations) and we intend to continue this momentum. -If the only reason you're defining a FCall method is to call a native method, you should be using P/Invoke to call the method directly. [P/Invoke](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute) is the public native method interface and should be doing everything you need in a correct manner. +If the only reason you're defining a FCall method is to call a native method, you should be using P/Invoke to call the method directly. [P/Invoke](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute) is the public native method interface and should be doing everything you need in a correct manner. If you still need to implement a feature inside the runtime, consider if there is a way to reduce the frequency of transitioning to native code. Can you write the common case in managed and only call into native for some rare corner cases? You're usually best off keeping as much as possible in managed code. QCalls are the preferred mechanism going forward. You should only use FCalls when you are "forced" to. This happens when there is common "short path" through the code that is important to optimize. This short path should not be more than a few hundred instructions, cannot allocate GC memory, take locks or throw exceptions (`GC_NOTRIGGER`, `NOTHROWS`). In all other circumstances (and especially when you enter a FCall and then simply erect HelperMethodFrame), you should be using QCall. -FCalls were specifically designed for short paths of code that must be optimized. They allowed explicit control over when erecting a frame was done. However, it is error prone and not worth the complexity for many APIs. QCalls are essentially P/Invokes into the CLR. In the event the performance of an FCall is required consider creating a QCall and marking it with [`SuppressGCTransitionAttribute`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.suppressgctransitionattribute). +FCalls were specifically designed for short paths of code that must be optimized. They allowed explicit control over when erecting a frame was done. However, it is error prone and not worth the complexity for many APIs. QCalls are essentially P/Invokes into the CLR. In the event the performance of an FCall is required consider creating a QCall and marking it with [`SuppressGCTransitionAttribute`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.suppressgctransitionattribute). As a result, QCalls give you some advantageous marshaling for `SafeHandle`s automatically – your native method just takes a `HANDLE` type, and can be used without worrying whether someone will free the handle while in that method body. The resulting FCall method would need to use a `SafeHandleHolder` and may need to protect the `SafeHandle`, etc. Leveraging the P/Invoke marshaler can avoid this additional plumbing code. diff --git a/docs/design/coreclr/botr/guide-for-porting.md b/docs/design/coreclr/botr/guide-for-porting.md index f7ca105bf16..25c0aae0e06 100644 --- a/docs/design/coreclr/botr/guide-for-porting.md +++ b/docs/design/coreclr/botr/guide-for-porting.md @@ -181,7 +181,7 @@ both the JIT and VM. 2. Architecture specific relocation information (to represent generation of relocations for use by load, store, jmp and call instructions) See - + for the sort of details that need to be defined. 3. Behavior and accessibility of processor single step features from within a diff --git a/docs/design/coreclr/jit/viewing-jit-dumps.md b/docs/design/coreclr/jit/viewing-jit-dumps.md index d24611be402..7d459895f9a 100644 --- a/docs/design/coreclr/jit/viewing-jit-dumps.md +++ b/docs/design/coreclr/jit/viewing-jit-dumps.md @@ -115,7 +115,7 @@ For example, for Windows x64 machine, the project file is: ``` - You can find a list of RIDs and their corresponding OSes [here](https://docs.microsoft.com/en-us/dotnet/articles/core/rid-catalog). + You can find a list of RIDs and their corresponding OSes [here](https://learn.microsoft.com/dotnet/articles/core/rid-catalog). * After you've finished editing the code, run `dotnet restore` and `dotnet publish -c Release`. This should drop all of the binaries needed to run your app in `bin/Release///publish`. * Overwrite the CLR dlls with the ones you've built locally. If you're a fan of the command line, here are some shell commands for doing this: diff --git a/docs/design/coreclr/profiling/davbr-blog-archive/Debugging - Activation.md b/docs/design/coreclr/profiling/davbr-blog-archive/Debugging - Activation.md index 327c90451b9..6a3e3b01572 100644 --- a/docs/design/coreclr/profiling/davbr-blog-archive/Debugging - Activation.md +++ b/docs/design/coreclr/profiling/davbr-blog-archive/Debugging - Activation.md @@ -1,7 +1,7 @@ *This blog post originally appeared on David Broman's blog on 12/11/2007* -This is the first of some tips to help you debug your profiler. Note that these tips assume you're using CLR 2.x (see [this entry](https://docs.microsoft.com/en-us/archive/blogs/davbr/versions-of-microsoft-net-framework-clr-and-your-profiler) for info on how CLR version numbers map to .NET Framework version numbers). In today's post, I address a frequent question from profiler developers and users: "Why didn't my profiler load?". +This is the first of some tips to help you debug your profiler. Note that these tips assume you're using CLR 2.x (see [this entry](https://learn.microsoft.com/archive/blogs/davbr/versions-of-microsoft-net-framework-clr-and-your-profiler) for info on how CLR version numbers map to .NET Framework version numbers). In today's post, I address a frequent question from profiler developers and users: "Why didn't my profiler load?". ## Event log (Windows only) diff --git a/docs/design/coreclr/profiling/davbr-blog-archive/ELT Hooks - tail calls.md b/docs/design/coreclr/profiling/davbr-blog-archive/ELT Hooks - tail calls.md index d00ceba195e..7518db43102 100644 --- a/docs/design/coreclr/profiling/davbr-blog-archive/ELT Hooks - tail calls.md +++ b/docs/design/coreclr/profiling/davbr-blog-archive/ELT Hooks - tail calls.md @@ -55,7 +55,7 @@ When you're dealing with languages managed by the CLR, there are two kinds of co ### When does the JIT make tail calls? -I asked Fei Chen and [Grant Richins](https://docs.microsoft.com/en-us/archive/blogs/grantri/), neighbors down the hall from me who happen to work on the JIT, under what conditions the various JITs will employ the tail call optimization. The full answer is rather detailed. The quick summary is that the JITs try to use the tail call optimization whenever they can, but there are lots of reasons why the tail call optimization can't be used. Some reasons why tail calling is a non-option: +I asked Fei Chen and [Grant Richins](https://learn.microsoft.com/archive/blogs/grantri/), neighbors down the hall from me who happen to work on the JIT, under what conditions the various JITs will employ the tail call optimization. The full answer is rather detailed. The quick summary is that the JITs try to use the tail call optimization whenever they can, but there are lots of reasons why the tail call optimization can't be used. Some reasons why tail calling is a non-option: - Caller doesn't return immediately after the call (duh :-)) - Stack arguments between caller and callee are incompatible in a way that would require shifting things around in the caller's frame before the callee could execute diff --git a/docs/design/coreclr/profiling/davbr-blog-archive/Generics and Your Profiler.md b/docs/design/coreclr/profiling/davbr-blog-archive/Generics and Your Profiler.md index 856290fd993..fce6538b6eb 100644 --- a/docs/design/coreclr/profiling/davbr-blog-archive/Generics and Your Profiler.md +++ b/docs/design/coreclr/profiling/davbr-blog-archive/Generics and Your Profiler.md @@ -83,7 +83,7 @@ typeArgs: This is the array of type arguments used to instantiate classId, which You may have noticed I ignored this parameter in my description of GetFunctionInfo2. You can pass NULL if you want, and nothing really bad will happen to you, but you’ll often get some incomplete results: you won’t get very useful typeArgs coming back, and you’ll often see NULL returned in \*pClassId. -To understand why, it’s necessary to understand an internal optimization the CLR uses around sharing code for generics: If two instantiations of the same generic function would result in identical JITted code, then why not have them share one copy of that code? The CLR chooses to share code if all of the type parameters are instantiated with reference types. If you want to read more about this, [here’s](https://docs.microsoft.com/en-us/archive/blogs/carlos/net-generics-and-code-bloat-or-its-lack-thereof) a place to go. +To understand why, it’s necessary to understand an internal optimization the CLR uses around sharing code for generics: If two instantiations of the same generic function would result in identical JITted code, then why not have them share one copy of that code? The CLR chooses to share code if all of the type parameters are instantiated with reference types. If you want to read more about this, [here’s](https://learn.microsoft.com/archive/blogs/carlos/net-generics-and-code-bloat-or-its-lack-thereof) a place to go. For now, the important point is that, once we’re inside JITted code that is shared across different generic instantiations, how can one know which instantiation is the actual one that caused the current invocation? Well, in many cases, the CLR may not have that data readily lying around. However, as a profiler, you can capture this information and pass it back to the CLR when it needs it. This is done through a COR\_PRF\_FRAME\_INFO. There are two ways your profiler can get a COR\_PRF\_FRAME\_INFO: @@ -110,7 +110,7 @@ CLR’s generics sharing optimization complicates this somewhat. You’ll reall So that covers JIT notifications—what about ClassLoad\* notifications in the same example? Although the CLR shares _JITted code_ across reference-type instantiations, the CLR still maintains separate loaded _types_ for each generic instantiation of a generic class. So in the example from the paragraph above you will see separate ClassLoad\* notifications with different ClassIDs for MyClass\ and MyClass\. In fact, you will also see a separate ClassLoad\* notification (with yet another ClassID) for MyClass\. -If you got curious, and ran such a profiler under the debugger, you could use the SOS !dumpmt command with those different ClassIDs to see what you get. By doing so, you’ll notice something interesting. !dumpmt shows many values, including “Name”, which will correctly be the specific, fully-instantiated name of the type (different for all three ClassIDs). !dumpmt also shows a thing called “EEClass”. And you’ll notice this “EEClass” value is actually the _same_ for all 3 types. (Remember from this [post](https://docs.microsoft.com/en-us/archive/blogs/davbr/debugging-your-profiler-ii-sos-and-ids) that EEClass is NOT the same thing as ClassID!) That gives you a little window into some additional data sharing optimizations the CLR uses. Stuff that remains the same across different generic instantiations of a class can be stored in a single place (the EEClass) and that single place can be referenced by the different generic instantiations of the class. Note that if you also use a value type as the type argument when instantiating MyClass\ (e.g., MyClass\), and then run !dumpmt on that ClassID, you’ll see an entirely different EEClass value in the output, as the CLR will not be sharing that subset of type data across generic instantiations that use type arguments that are value types. +If you got curious, and ran such a profiler under the debugger, you could use the SOS !dumpmt command with those different ClassIDs to see what you get. By doing so, you’ll notice something interesting. !dumpmt shows many values, including “Name”, which will correctly be the specific, fully-instantiated name of the type (different for all three ClassIDs). !dumpmt also shows a thing called “EEClass”. And you’ll notice this “EEClass” value is actually the _same_ for all 3 types. (Remember from this [post](https://learn.microsoft.com/archive/blogs/davbr/debugging-your-profiler-ii-sos-and-ids) that EEClass is NOT the same thing as ClassID!) That gives you a little window into some additional data sharing optimizations the CLR uses. Stuff that remains the same across different generic instantiations of a class can be stored in a single place (the EEClass) and that single place can be referenced by the different generic instantiations of the class. Note that if you also use a value type as the type argument when instantiating MyClass\ (e.g., MyClass\), and then run !dumpmt on that ClassID, you’ll see an entirely different EEClass value in the output, as the CLR will not be sharing that subset of type data across generic instantiations that use type arguments that are value types. ## Instrumenting Generic Functions diff --git a/docs/design/coreclr/profiling/davbr-blog-archive/Sample A Signature Blob Parser for your Profiler.md b/docs/design/coreclr/profiling/davbr-blog-archive/Sample A Signature Blob Parser for your Profiler.md index 88ab78844b3..5d9215222f5 100644 --- a/docs/design/coreclr/profiling/davbr-blog-archive/Sample A Signature Blob Parser for your Profiler.md +++ b/docs/design/coreclr/profiling/davbr-blog-archive/Sample A Signature Blob Parser for your Profiler.md @@ -1,7 +1,7 @@ *This blog post originally appeared on David Broman's blog on 10/13/2005* -If your profiler plays with metadata, you've undoubtedly come across signature blobs. They’re used to encode type information for method definitions & references, local variables, and a whole lot more. They’re wonderfully compact, recursively versatile, and sometimes, well, challenging to parse. Fortunately, [Rico Mariani](https://docs.microsoft.com/en-us/archive/blogs/ricom/) was feeling generous one day, and churned out a simple parser that can read these types of signatures: +If your profiler plays with metadata, you've undoubtedly come across signature blobs. They’re used to encode type information for method definitions & references, local variables, and a whole lot more. They’re wonderfully compact, recursively versatile, and sometimes, well, challenging to parse. Fortunately, [Rico Mariani](https://learn.microsoft.com/archive/blogs/ricom/) was feeling generous one day, and churned out a simple parser that can read these types of signatures: - MethodDefSig - MethodRefSig diff --git a/docs/design/features/COM-activation.md b/docs/design/features/COM-activation.md index 866359ab180..d7f6a71cc70 100644 --- a/docs/design/features/COM-activation.md +++ b/docs/design/features/COM-activation.md @@ -2,7 +2,7 @@ ## Purpose -In order to more fully support the vast number of existing .NET Framework users in their transition to .NET Core, support of the COM activation scenario in .NET Core is required. Without this support it is not possible for many .NET Framework consumers to even consider transitioning to .NET Core. The intent of this document is to describe aspects of COM activation for a .NET class written for .NET Core. This support includes but is not limited to activation scenarios such as the [`CoCreateInstance()`](https://docs.microsoft.com/windows/desktop/api/combaseapi/nf-combaseapi-cocreateinstance) API in C/C++ or from within a [Windows Script Host](https://docs.microsoft.com/windows/desktop/com/using-com-objects-in-windows-script-host) instance. +In order to more fully support the vast number of existing .NET Framework users in their transition to .NET Core, support of the COM activation scenario in .NET Core is required. Without this support it is not possible for many .NET Framework consumers to even consider transitioning to .NET Core. The intent of this document is to describe aspects of COM activation for a .NET class written for .NET Core. This support includes but is not limited to activation scenarios such as the [`CoCreateInstance()`](https://learn.microsoft.com/windows/desktop/api/combaseapi/nf-combaseapi-cocreateinstance) API in C/C++ or from within a [Windows Script Host](https://learn.microsoft.com/windows/desktop/com/using-com-objects-in-windows-script-host) instance. COM activation in this document is currently limited to in-proc scenarios. Scenarios involving out-of-proc COM activation are deferred. @@ -10,7 +10,7 @@ COM activation in this document is currently limited to in-proc scenarios. Scena * Discover all installed versions of .NET Core. * Load the appropriate version of .NET Core for the class if a .NET Core instance is not running, or validate the currently existing .NET Core instance can satisfy the class requirement. -* Return an [`IClassFactory`](https://docs.microsoft.com/windows/desktop/api/unknwnbase/nn-unknwnbase-iclassfactory) implementation that will construct an instance of the .NET class. +* Return an [`IClassFactory`](https://learn.microsoft.com/windows/desktop/api/unknwnbase/nn-unknwnbase-iclassfactory) implementation that will construct an instance of the .NET class. * Support the discrimination of concurrently loaded CLR versions. ### Environment matrix @@ -35,7 +35,7 @@ One of the basic issues with the activation of a .NET class within a COM environ The .NET Framework uses a shim library (`mscoree.dll`) to facilitate the loading of the CLR into a process performing activation - one of the many uses of `mscoree.dll`. When .NET Framework 4.0 was released, `mscoreei.dll` was introduced to provide a level of indirection between the system installed shim (`mscoree.dll`) and a specific framework shim as well as to enable side-by-side CLR scenarios. An important consideration of the system wide shim is that of servicing. Servicing `mscoree.dll` is difficult since any process with a loaded .NET Framework instance will have the shim loaded, thus requiring a system reboot in order to service the shim. -During .NET class registration, the shim is identified as the in-proc server for the class. Additional metadata is inserted into the registry to indicate what .NET assembly to load and what type to activate. For example, in addition to the typical [in-proc server](https://docs.microsoft.com/windows/desktop/com/inprocserver32) registry values the following values are added to the registry for the `TypeLoadException` class. +During .NET class registration, the shim is identified as the in-proc server for the class. Additional metadata is inserted into the registry to indicate what .NET assembly to load and what type to activate. For example, in addition to the typical [in-proc server](https://learn.microsoft.com/windows/desktop/com/inprocserver32) registry values the following values are added to the registry for the `TypeLoadException` class. ``` "Assembly"="mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" @@ -43,7 +43,7 @@ During .NET class registration, the shim is identified as the in-proc server for "RuntimeVersion"="v1.1.4322" ``` -The above registration is typically done with the [`RegAsm.exe`](https://docs.microsoft.com/dotnet/framework/tools/regasm-exe-assembly-registration-tool) tool. Alternatively, registry scripts can be generated by `RegAsm.exe`. +The above registration is typically done with the [`RegAsm.exe`](https://learn.microsoft.com/dotnet/framework/tools/regasm-exe-assembly-registration-tool) tool. Alternatively, registry scripts can be generated by `RegAsm.exe`. ### .NET Core class COM activation @@ -51,9 +51,9 @@ In .NET Core, our intent will be to avoid a system wide shim library. This decis The current .NET Core hosting solutions are described in detail at [Documentation/design-docs/host-components.md](https://github.com/dotnet/runtime/tree/main/docs/design/features/host-components.md). Along with the existing hosts an additional customizable COM activation host library (`comhost.dll`) will be added. This library (henceforth identified as 'shim') will export the required functions for COM class activation and registration and act in a way similar to .NET Framework's `mscoree.dll`. ->[`HRESULT DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv);`](https://docs.microsoft.com/windows/desktop/api/combaseapi/nf-combaseapi-dllgetclassobject) +>[`HRESULT DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv);`](https://learn.microsoft.com/windows/desktop/api/combaseapi/nf-combaseapi-dllgetclassobject) ->[`HRESULT DllCanUnloadNow();`](https://docs.microsoft.com/windows/desktop/api/combaseapi/nf-combaseapi-dllcanunloadnow) +>[`HRESULT DllCanUnloadNow();`](https://learn.microsoft.com/windows/desktop/api/combaseapi/nf-combaseapi-dllcanunloadnow) >[`HRESULT DllRegisterServer();`](https://msdn.microsoft.com/library/windows/desktop/ms682162(v=vs.85).aspx) @@ -63,7 +63,7 @@ When `DllGetClassObject()` is called in a COM activation scenario, the following 1) Determine additional registration information needed for activation. * The shim will check for an embedded manifest. If the shim does not contain an embedded manifest, the shim will check if a file with the `.clsidmap` naming format exists adjacent to it. Build tooling handles shim customization, including renaming the shim to be based on the managed assembly's name (e.g. `NetComServer.dll` will have a custom shim called `NetComServer.comhost.dll`). If the shim is signed the shim will **not** attempt to discover the manifest on disk. - * The manifest will contain a mapping from [`CLSID`](https://docs.microsoft.com/windows/desktop/com/com-class-objects-and-clsids) to managed assembly name and the [Fully-Qualified Name](https://docs.microsoft.com/dotnet/framework/reflection-and-codedom/specifying-fully-qualified-type-names) for the type. The format of this manifest is defined below. The shim's embedded mapping always takes precedence and in the case an embedded mapping is found, a `.clsidmap` file on disk will never be used. + * The manifest will contain a mapping from [`CLSID`](https://learn.microsoft.com/windows/desktop/com/com-class-objects-and-clsids) to managed assembly name and the [Fully-Qualified Name](https://learn.microsoft.com/dotnet/framework/reflection-and-codedom/specifying-fully-qualified-type-names) for the type. The format of this manifest is defined below. The shim's embedded mapping always takes precedence and in the case an embedded mapping is found, a `.clsidmap` file on disk will never be used. * The manifest will define an exhaustive list of .NET classes the shim is permitted to provide. * If a [`.runtimeconfig.json`](https://github.com/dotnet/cli/blob/master/Documentation/specs/runtime-configuration-file.md) file exists adjacent to the target managed assembly (`.runtimeconfig.json`), that file is used to describe the target framework and CLR configuration. The documentation for the `.runtimeconfig.json` format defines under what circumstances this file may be optional. 1) The `DllGetClassObject()` function verifies the `CLSID` mapping has a mapping for the `CLSID`. @@ -71,7 +71,7 @@ When `DllGetClassObject()` is called in a COM activation scenario, the following 1) The shim attempts to load the latest version of the `hostfxr` library and retrieves the `hostfxr_initialize_for_runtime_config()` and `hostfxr_get_runtime_delegate()` exports. 1) The target assembly name is computed by stripping off the `.comhost.dll` prefix and replacing it with `.dll`. Using the name of the target assembly, the path to the `.runtimeconfig.json` file is then computed. 1) The `hostfxr_initialize_for_runtime_config()` export is called. -1) Based on the `.runtimeconfig.json` the [framework](https://docs.microsoft.com/dotnet/core/packages#frameworks) to use can be determined and the appropriate `hostpolicy` library path is computed. +1) Based on the `.runtimeconfig.json` the [framework](https://learn.microsoft.com/dotnet/core/packages#frameworks) to use can be determined and the appropriate `hostpolicy` library path is computed. 1) The `hostpolicy` library is loaded and various exports are retrieved. * If a `hostpolicy` instance is already loaded, the one presently loaded is re-used. * If a CLR is active within the process, the requested CLR version will be validated against that CLR. If version satisfiability fails, activation will fail. @@ -104,17 +104,17 @@ When `DllGetClassObject()` is called in a COM activation scenario, the following } ``` Note this API is not exposed outside of `System.Private.CoreLib` and is subject to change at any time. - * The loading of the assembly will take place in a new [`AssemblyLoadContext`](https://docs.microsoft.com/dotnet/api/system.runtime.loader.assemblyloadcontext) for dependency isolation. Each assembly path will get a separate `AssemblyLoadContext`. This means that if an assembly provides multiple COM servers all of the servers from that assembly will reside in the same `AssemblyLoadContext`. + * The loading of the assembly will take place in a new [`AssemblyLoadContext`](https://learn.microsoft.com/dotnet/api/system.runtime.loader.assemblyloadcontext) for dependency isolation. Each assembly path will get a separate `AssemblyLoadContext`. This means that if an assembly provides multiple COM servers all of the servers from that assembly will reside in the same `AssemblyLoadContext`. * The created `AssemblyLoadContext` will use an [`AssemblyDependencyResolver`](https://github.com/dotnet/runtime/issues/27787) that was supplied with the path to the assembly to load assemblies. 1) The `IClassFactory` instance is returned to the caller of `DllGetClassObject()` to attempt class activation. The `DllCanUnloadNow()` function will always return `S_FALSE` indicating the shim is never able to be unloaded. This matches .NET Framework semantics but may be adjusted in the future if needed. -The `DllRegisterServer()` and `DllUnregisterServer()` functions adhere to the [COM registration contract](https://docs.microsoft.com/windows/desktop/com/classes-and-servers) and enable registration and unregistration of the classes defined in the `CLSID` mapping manifest. Discovery of the mapping manifest is identical to that which occurs during a call to `DllGetClassObject()`. +The `DllRegisterServer()` and `DllUnregisterServer()` functions adhere to the [COM registration contract](https://learn.microsoft.com/windows/desktop/com/classes-and-servers) and enable registration and unregistration of the classes defined in the `CLSID` mapping manifest. Discovery of the mapping manifest is identical to that which occurs during a call to `DllGetClassObject()`. ##### CLSID map format -The `CLSID` mapping manifest is a JSON format (`.clsidmap` extension when on disk) that defines a mapping from `CLSID` to an assembly name and type name tuple as well as an optional [ProgID](https://docs.microsoft.com/windows/win32/com/-progid--key). Each `CLSID` mapping is a key in the outer JSON object. +The `CLSID` mapping manifest is a JSON format (`.clsidmap` extension when on disk) that defines a mapping from `CLSID` to an assembly name and type name tuple as well as an optional [ProgID](https://learn.microsoft.com/windows/win32/com/-progid--key). Each `CLSID` mapping is a key in the outer JSON object. ``` json { @@ -129,9 +129,9 @@ The `CLSID` mapping manifest is a JSON format (`.clsidmap` extension when on dis ### .NET Core COM server creation 1) A new .NET Core class library project is created using [`dotnet.exe`][dotnet_link]. -1) A class is defined that has the [`GuidAttribute("")`][guid_link] and the [`ComVisibleAttribute(true)`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.comvisibleattribute). +1) A class is defined that has the [`GuidAttribute("")`][guid_link] and the [`ComVisibleAttribute(true)`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.comvisibleattribute). - In .NET Core, unlike .NET Framework, there is no generated class interface generation (i.e. `IClassX`). This means it is advantageous for users to have the class implement a marshalable interface. - - A ProgID for the class can be defined using the [`ProgIdAttribute`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.progidattribute). If a ProgID is not explicitly specified, the namespace and class name will be used as the ProgID. This follows the same semantics as .NET Framework COM servers. + - A ProgID for the class can be defined using the [`ProgIdAttribute`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.progidattribute). If a ProgID is not explicitly specified, the namespace and class name will be used as the ProgID. This follows the same semantics as .NET Framework COM servers. 1) The `EnableComHosting` property is added to the project file. - i.e. `true` 1) During class project build, the following actions occur if the `EnableComHosting` property is `true`: @@ -147,11 +147,11 @@ Two options exist for registration and are a function of the intent of the class #### Registry -Class registration in the registry for .NET Core classes is greatly simplified and is now identical to that of a non-managed COM class. This is possible due to the presence of the aforementioned `.clsidmap` manifest. The application developer will be able to use the traditional [`regsvr32.exe`](https://docs.microsoft.com/windows-server/administration/windows-commands/regsvr32) tool for class registration. +Class registration in the registry for .NET Core classes is greatly simplified and is now identical to that of a non-managed COM class. This is possible due to the presence of the aforementioned `.clsidmap` manifest. The application developer will be able to use the traditional [`regsvr32.exe`](https://learn.microsoft.com/windows-server/administration/windows-commands/regsvr32) tool for class registration. #### Registration-Free -[RegFree COM for .NET](https://docs.microsoft.com/dotnet/framework/interop/configure-net-framework-based-com-components-for-reg) is another style of registration, but does not require registry access. This approach is complicated by the use of [application manifests](https://docs.microsoft.com/windows/desktop/SbsCs/application-manifests), but does have benefits for limiting environment impact and simplifying deployment. A severe limitation of this approach is that in order to use RegFree COM with a .NET class, the Window OS assumes the use of `mscoree.dll` for the in-proc server. Without a change in the Windows OS, this assumption in the RegFree .NET scenario makes the existing manifest approach a broken scenario for .NET Core. +[RegFree COM for .NET](https://learn.microsoft.com/dotnet/framework/interop/configure-net-framework-based-com-components-for-reg) is another style of registration, but does not require registry access. This approach is complicated by the use of [application manifests](https://learn.microsoft.com/windows/desktop/SbsCs/application-manifests), but does have benefits for limiting environment impact and simplifying deployment. A severe limitation of this approach is that in order to use RegFree COM with a .NET class, the Window OS assumes the use of `mscoree.dll` for the in-proc server. Without a change in the Windows OS, this assumption in the RegFree .NET scenario makes the existing manifest approach a broken scenario for .NET Core. An example of a RegFree manifest for a .NET Framework class is below - note the absence of specifying a hosting server library (i.e. `mscoree.dll` is implied for the `clrClass` element). @@ -196,7 +196,7 @@ The .NET Core steps for RegFree are as follows: ``` -1) The tool chain can optionally generate a [SxS](https://docs.microsoft.com/windows/desktop/sbscs/about-side-by-side-assemblies-) manifest for the shim. Both the SxS manifest _and_ the shim library will need to be app-local for the scenario to work. Note that the application developer is responsible for adding to or merging the generated shim's manifest with one the user may have defined for other scenarios. An example shim manifest is defined below and with it the SxS logic will naturally know to query the shim for the desired class. Note that multiple `comClass` tags can be added. +1) The tool chain can optionally generate a [SxS](https://learn.microsoft.com/windows/desktop/sbscs/about-side-by-side-assemblies-) manifest for the shim. Both the SxS manifest _and_ the shim library will need to be app-local for the scenario to work. Note that the application developer is responsible for adding to or merging the generated shim's manifest with one the user may have defined for other scenarios. An example shim manifest is defined below and with it the SxS logic will naturally know to query the shim for the desired class. Note that multiple `comClass` tags can be added. ``` xml @@ -231,10 +231,10 @@ The .NET Core steps for RegFree are as follows: [Calling a .NET Component from a COM Component](https://msdn.microsoft.com/library/ms973802.aspx) -[Using COM Types in Managed Code](https://docs.microsoft.com/previous-versions/dotnet/netframework-4.0/3y76b69k%28v%3dvs.100%29) +[Using COM Types in Managed Code](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/3y76b69k%28v%3dvs.100%29) -[Exposing .NET Framework Components to COM](https://docs.microsoft.com/dotnet/framework/interop/exposing-dotnet-components-to-com) +[Exposing .NET Framework Components to COM](https://learn.microsoft.com/dotnet/framework/interop/exposing-dotnet-components-to-com) -[guid_link]: https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.guidattribute -[dotnet_link]: https://docs.microsoft.com/dotnet/core/tools/dotnet +[guid_link]: https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.guidattribute +[dotnet_link]: https://learn.microsoft.com/dotnet/core/tools/dotnet diff --git a/docs/design/features/IJW-activation.md b/docs/design/features/IJW-activation.md index d55032e4670..3ae8e64c72e 100644 --- a/docs/design/features/IJW-activation.md +++ b/docs/design/features/IJW-activation.md @@ -44,7 +44,7 @@ Below are the entry-points that the Visual C++ team needs When `_CorExeMain()` is called, the following will occur: 1) If a [`.runtimeconfig.json`](https://github.com/dotnet/cli/blob/master/Documentation/specs/runtime-configuration-file.md) file exists adjacent to the shim assembly (`.runtimeconfig.json`), that file will be used to describe CLR configuration details. The documentation for the `.runtimeconfig.json` format defines under what circumstances this file may be optional. -2) Using the existing `hostfxr` library, attempt to discover the desired CLR and target [framework](https://docs.microsoft.com/en-us/dotnet/core/packages#frameworks). +2) Using the existing `hostfxr` library, attempt to discover the desired CLR and target [framework](https://learn.microsoft.com/dotnet/core/packages#frameworks). * If a CLR is active with the process, the requested CLR version will be validated against that CLR. If version satisfiability fails, activation will fail. * If a CLR is **not** active with the process, an attempt will be made to create a satisfying CLR instance. * Failure to create an instance will result in activation failure. diff --git a/docs/design/features/byreflike-generics.md b/docs/design/features/byreflike-generics.md index dec8c64a42d..d529f18f140 100644 --- a/docs/design/features/byreflike-generics.md +++ b/docs/design/features/byreflike-generics.md @@ -84,13 +84,13 @@ namespace System.Runtime.CompilerServices Current examples of APIs that would need the attribute applied: -- [`Span`](https://docs.microsoft.com/dotnet/api/system.span-1) +- [`Span`](https://learn.microsoft.com/dotnet/api/system.span-1) - `public Span(T[]? array);` - `public Span(T[]? array, int start, int length);` - `public T[] ToArray();` - `public static implicit operator Span(ArraySegment segment);` - `public static implicit operator Span(T[]? array);` -- [`ReadOnlySpan`](https://docs.microsoft.com/dotnet/api/system.readonlyspan-1) +- [`ReadOnlySpan`](https://learn.microsoft.com/dotnet/api/system.readonlyspan-1) - `public ReadOnlySpan(T[]? array);` - `public ReadOnlySpan(T[]? array, int start, int length);` - `public T[] ToArray();` diff --git a/docs/design/features/dllmap.md b/docs/design/features/dllmap.md index b1c710e5bf7..e0e113e762e 100644 --- a/docs/design/features/dllmap.md +++ b/docs/design/features/dllmap.md @@ -21,9 +21,9 @@ Mono also permits mapping of method names within libraries, but with the restric .Net Core 3 provides a rich set of APIs to manage native libraries, as well as callbacks to influence native library resolution. -- [NativeLibrary APIs](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.nativelibrary?view=netcore-3.0): Perform operations on native libraries (such as `Load()`, `Free()`, get the address of an exported symbol, etc.) in a platform-independent way from managed code. -- [DllImport Resolver callback](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.nativelibrary.setdllimportresolver?view=netcore-3.0): Gets a callback for first-chance native library resolution using custom logic. -- [Native Library Resolve event](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.loader.assemblyloadcontext.resolvingunmanageddll?view=netcore-3.0): Get an event for last-chance native library resolution using custom logic. +- [NativeLibrary APIs](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.nativelibrary?view=netcore-3.0): Perform operations on native libraries (such as `Load()`, `Free()`, get the address of an exported symbol, etc.) in a platform-independent way from managed code. +- [DllImport Resolver callback](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.nativelibrary.setdllimportresolver?view=netcore-3.0): Gets a callback for first-chance native library resolution using custom logic. +- [Native Library Resolve event](https://learn.microsoft.com/dotnet/api/system.runtime.loader.assemblyloadcontext.resolvingunmanageddll?view=netcore-3.0): Get an event for last-chance native library resolution using custom logic. These APIs can be used to implement custom native library resolution logic, including Mono-style DllMap. diff --git a/docs/design/features/globalization-hybrid-mode.md b/docs/design/features/globalization-hybrid-mode.md index 001ae20002c..2270fe897c1 100644 --- a/docs/design/features/globalization-hybrid-mode.md +++ b/docs/design/features/globalization-hybrid-mode.md @@ -270,8 +270,8 @@ Dependencies: Web API does not expose locale-sensitive endsWith/startsWith function. As a workaround, both strings get normalized and weightless characters are removed. Resulting strings are cut to the same length and comparison is performed. This approach, beyond having the same compare option limitations as described under **String comparison**, has additional limitations connected with the workaround used. Because we are normalizing strings to be able to cut them, we cannot calculate the match length on the original strings. Methods that calculate this information throw PlatformNotSupported exception: -- [CompareInfo.IsPrefix](https://learn.microsoft.com/en-us/dotnet/api/system.globalization.compareinfo.isprefix?view=net-8.0#system-globalization-compareinfo-isprefix(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-globalization-compareoptions-system-int32@)) -- [CompareInfo.IsSuffix](https://learn.microsoft.com/en-us/dotnet/api/system.globalization.compareinfo.issuffix?view=net-8.0#system-globalization-compareinfo-issuffix(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-globalization-compareoptions-system-int32@)) +- [CompareInfo.IsPrefix](https://learn.microsoft.com/dotnet/api/system.globalization.compareinfo.isprefix?view=net-8.0#system-globalization-compareinfo-isprefix(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-globalization-compareoptions-system-int32@)) +- [CompareInfo.IsSuffix](https://learn.microsoft.com/dotnet/api/system.globalization.compareinfo.issuffix?view=net-8.0#system-globalization-compareinfo-issuffix(system-readonlyspan((system-char))-system-readonlyspan((system-char))-system-globalization-compareoptions-system-int32@)) - `IgnoreSymbols` Only comparisons that do not skip character types are allowed. E.g. `IgnoreSymbols` skips symbol-chars in comparison/indexing. All `CompareOptions` combinations that include `IgnoreSymbols` throw `PlatformNotSupportedException`. diff --git a/docs/design/features/globalization-invariant-mode.md b/docs/design/features/globalization-invariant-mode.md index 62544139522..0b71ffc992d 100644 --- a/docs/design/features/globalization-invariant-mode.md +++ b/docs/design/features/globalization-invariant-mode.md @@ -2,7 +2,7 @@ Author: [Tarek Mahmoud Sayed](https://github.com/tarekgh) -The globalization invariant mode - new in .NET Core 2.0 - enables you to remove application dependencies on globalization data and [globalization behavior](https://docs.microsoft.com/en-us/dotnet/standard/globalization-localization/). This mode is an opt-in feature that provides more flexibility if you care more about reducing dependencies and the size of distribution than globalization functionality or globalization-correctness. +The globalization invariant mode - new in .NET Core 2.0 - enables you to remove application dependencies on globalization data and [globalization behavior](https://learn.microsoft.com/dotnet/standard/globalization-localization/). This mode is an opt-in feature that provides more flexibility if you care more about reducing dependencies and the size of distribution than globalization functionality or globalization-correctness. The drawback of running in the invariant mode is applications will get poor globalization support. This new option is only recommended for developers that understand globalization and the impact of its absence. @@ -54,9 +54,9 @@ Turkish I casing will not be supported when using Turkish cultures. ## String sorting and searching -String operations like [Compare](https://docs.microsoft.com/dotnet/api/?term=string.compare), [IndexOf](https://docs.microsoft.com/dotnet/api/?term=string.indexof) and [LastIndexOf](https://docs.microsoft.com/dotnet/api/?term=string.lastindexof) are always performed as [ordinal](https://en.wikipedia.org/wiki/Ordinal_number) and not linguistic operations regardless of the string comparing options passed to the APIs. +String operations like [Compare](https://learn.microsoft.com/dotnet/api/?term=string.compare), [IndexOf](https://learn.microsoft.com/dotnet/api/?term=string.indexof) and [LastIndexOf](https://learn.microsoft.com/dotnet/api/?term=string.lastindexof) are always performed as [ordinal](https://en.wikipedia.org/wiki/Ordinal_number) and not linguistic operations regardless of the string comparing options passed to the APIs. -The [ignore case](https://docs.microsoft.com/dotnet/api/system.globalization.compareoptions.ignorecase) string sorting option is supported but only for the ASCII range as mentioned previously. +The [ignore case](https://learn.microsoft.com/dotnet/api/system.globalization.compareoptions.ignorecase) string sorting option is supported but only for the ASCII range as mentioned previously. For example, the following comparison will resolve to being unequal: @@ -71,7 +71,7 @@ However, the following comparison will resolve to being equal: * 'I', using * CompareOptions.Ignorecase -It is worth noticing that all other [sort comparison options](https://docs.microsoft.com/dotnet/api/system.globalization.compareoptions) (for example, ignore symbols, ignore space, Katakana, Hiragana) will have no effect in the invariant mode (they are ignored). +It is worth noticing that all other [sort comparison options](https://learn.microsoft.com/dotnet/api/system.globalization.compareoptions) (for example, ignore symbols, ignore space, Katakana, Hiragana) will have no effect in the invariant mode (they are ignored). ## Sort keys diff --git a/docs/design/features/hosting-layer-apis.md b/docs/design/features/hosting-layer-apis.md index 37d26972ae7..0eab1666429 100644 --- a/docs/design/features/hosting-layer-apis.md +++ b/docs/design/features/hosting-layer-apis.md @@ -4,7 +4,7 @@ Functionality for advanced hosting scenarios is exposed on the `hostfxr` and `ho The `char_t` strings in the below API descriptions are defined based on the platform: * Windows - UTF-16 (2-byte `wchar_t`) - * Note that `wchar_t` is defined as a [native type](https://docs.microsoft.com/cpp/build/reference/zc-wchar-t-wchar-t-is-native-type), which is the default in Visual Studio. + * Note that `wchar_t` is defined as a [native type](https://learn.microsoft.com/cpp/build/reference/zc-wchar-t-wchar-t-is-native-type), which is the default in Visual Studio. * Unix - UTF-8 (1-byte `char`) ## Host FXR diff --git a/docs/design/features/localization-options.md b/docs/design/features/localization-options.md index 6b76f525a47..f23fbdcfb90 100644 --- a/docs/design/features/localization-options.md +++ b/docs/design/features/localization-options.md @@ -15,9 +15,9 @@ The goal is to support: ### Windows -On Windows, [resource script (.rc) files](https://docs.microsoft.com/cpp/windows/resource-files-visual-studio) are used to create resources that will be embedded into a binary. These files define [`STRINGTABLE`](https://docs.microsoft.com/windows/win32/menurc/stringtable-resource) resources containing the resource strings. Each string has a resource identifier - a symbol name mapped to an integer value - which can be used to look up the string value. +On Windows, [resource script (.rc) files](https://learn.microsoft.com/cpp/windows/resource-files-visual-studio) are used to create resources that will be embedded into a binary. These files define [`STRINGTABLE`](https://learn.microsoft.com/windows/win32/menurc/stringtable-resource) resources containing the resource strings. Each string has a resource identifier - a symbol name mapped to an integer value - which can be used to look up the string value. -The [`LoadString`](https://docs.microsoft.com/windows/win32/api/winuser/nf-winuser-loadstringw) and [`FormatMessage`](https://docs.microsoft.com/windows/win32/api/winbase/nf-winbase-formatmessage) APIs retrieve a string resources based on a specified identifier (the integer value of the resource identifier) from a specified module. These APIs leave it to their consumer to find and load the appropriate module containing the desired resources. While resources for all languages can be included in the main binary itself, it is common to separate language-specific resources into resource-only libraries. +The [`LoadString`](https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-loadstringw) and [`FormatMessage`](https://learn.microsoft.com/windows/win32/api/winbase/nf-winbase-formatmessage) APIs retrieve a string resources based on a specified identifier (the integer value of the resource identifier) from a specified module. These APIs leave it to their consumer to find and load the appropriate module containing the desired resources. While resources for all languages can be included in the main binary itself, it is common to separate language-specific resources into resource-only libraries. ### Linux @@ -284,7 +284,7 @@ Any automated testing would likely also require some form of language override. ### Single-file -The standard way of doing native localization is based on having separate resources files. On Windows, it is possible to embed resources for multiple languages into one library and use [`FormatMessage`](https://docs.microsoft.com/windows/win32/api/winbase/nf-winbase-formatmessage) or a combination of [`FindResourceEx`](https://docs.microsoft.com/windows/win32/api/winbase/nf-winbase-findresourceexa) and [`LoadResource`](https://docs.microsoft.com/windows/win32/api/libloaderapi/nf-libloaderapi-loadresource) to load the resource for a specific language. On Linux and OSX, no such platform support exists. +The standard way of doing native localization is based on having separate resources files. On Windows, it is possible to embed resources for multiple languages into one library and use [`FormatMessage`](https://learn.microsoft.com/windows/win32/api/winbase/nf-winbase-formatmessage) or a combination of [`FindResourceEx`](https://learn.microsoft.com/windows/win32/api/winbase/nf-winbase-findresourceexa) and [`LoadResource`](https://learn.microsoft.com/windows/win32/api/libloaderapi/nf-libloaderapi-loadresource) to load the resource for a specific language. On Linux and OSX, no such platform support exists. Extracting files to disk has proven to be extremely problematic across all platforms (permissions, anti-virus, clean up). Adding native resources to that extraction would only exacerbate the existing issues. This means that localized resources would need be read from memory. A custom solution would need to be created and maintained: - Format for storing identifiers and their corresponding strings for every language diff --git a/docs/design/features/sharedfx-lookup.md b/docs/design/features/sharedfx-lookup.md index 870bee16cdd..7f5532e45c9 100644 --- a/docs/design/features/sharedfx-lookup.md +++ b/docs/design/features/sharedfx-lookup.md @@ -4,7 +4,7 @@ There are two main ways of running .NET Applications: through `dotnet` or through the `apphost` executables. The executable is in charge of finding and loading `hostfxr`. `hostfxr`, in turn, must find and load `hostpolicy`. It is also responsible for searching for the SDK when running .NET SDK commands. Finally, `hostpolicy` must find and load the runtime (`coreclr`). See [host components](host-components.md) for details. -An application can either be [framework-dependent](https://docs.microsoft.com/dotnet/core/deploying/#publish-framework-dependent) or [self-contained](https://docs.microsoft.com/dotnet/core/deploying/#publish-self-contained). Framework-dependent apps must have the runtime files inside predefined folders. Self-contained apps are expected to have their dependencies in the same location as the executable. +An application can either be [framework-dependent](https://learn.microsoft.com/dotnet/core/deploying/#publish-framework-dependent) or [self-contained](https://learn.microsoft.com/dotnet/core/deploying/#publish-self-contained). Framework-dependent apps must have the runtime files inside predefined folders. Self-contained apps are expected to have their dependencies in the same location as the executable. ## Semantic Versioning @@ -42,7 +42,7 @@ There are two possibilities for a muxer: it can be a framework-dependent app or In the first case the app file path should have been specified as an argument to the dotnet.exe. In the second case the `dotnet.dll` from SDK must be invoked as a framework-dependent app. At first the running program searches for the `global.json` file which may have specified a CLI version. It starts from the current working directory and looks for it inside all parent folder hierarchy. After that, it searches for the dotnet.dll file inside the `sdk\` sub-folder in the executable directory. -The exact algorithm how versions as matched is described (with some history) in the [docs](https://docs.microsoft.com/en-us/dotnet/core/tools/global-json#matching-rules) +The exact algorithm how versions as matched is described (with some history) in the [docs](https://learn.microsoft.com/dotnet/core/tools/global-json#matching-rules) Note: if the SDK lookup is invoked through `hostfxr_resolve_sdk2` the algorithm is the same, expect that the function can disallow pre-release versions via the `hostfxr_resolve_sdk2_flags_t::disallow_prerelease` flag. diff --git a/docs/design/features/source-generator-pinvokes.md b/docs/design/features/source-generator-pinvokes.md index d13581b9353..f9d1a3b9039 100644 --- a/docs/design/features/source-generator-pinvokes.md +++ b/docs/design/features/source-generator-pinvokes.md @@ -2,7 +2,7 @@ ## Purpose -The CLR possesses a rich built-in marshaling mechanism for interoperability with native code that is handled at runtime. This system was designed to free .NET developers from having to author complex and potentially ABI sensitive [type conversion code][typemarshal_link] from a managed to an unmanaged environment. The built-in system works with both [P/Invoke][pinvoke_link] (i.e. `DllImportAttribute`) and [COM interop](https://docs.microsoft.com/dotnet/standard/native-interop/cominterop). The generated portion is typically called an ["IL Stub"][il_stub_link] since the stub is generated by inserting IL instructions into a stream and then passing that stream to the JIT for compilation. +The CLR possesses a rich built-in marshaling mechanism for interoperability with native code that is handled at runtime. This system was designed to free .NET developers from having to author complex and potentially ABI sensitive [type conversion code][typemarshal_link] from a managed to an unmanaged environment. The built-in system works with both [P/Invoke][pinvoke_link] (i.e. `DllImportAttribute`) and [COM interop](https://learn.microsoft.com/dotnet/standard/native-interop/cominterop). The generated portion is typically called an ["IL Stub"][il_stub_link] since the stub is generated by inserting IL instructions into a stream and then passing that stream to the JIT for compilation. A consequence of this approach is that marshaling code is not immediately available post-link for AOT scenarios (e.g. [`crossgen`](../../workflow/building/coreclr/crossgen.md) and [`crossgen2`](crossgen2-compilation-structure-enhancements.md)). The immediate unavailability of this code has been mitigated by a complex mechanism to have marshalling code generated by during AOT compilation. The [IL Linker][ilinker_link] is another tool that struggles with runtime generated code since it is unable to understand all potential used types without seeing what is generated. @@ -10,7 +10,7 @@ The user experience of the built-in generation initially appears ideal, but ther * Bug fixes in the marshaling system require an update to the entire runtime. * New types require enhancements to the marshaling system for efficient marshal behavior. - * [`ICustomMarshaler`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.icustommarshaler) incurs a substantial performance penalty. + * [`ICustomMarshaler`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.icustommarshaler) incurs a substantial performance penalty. * Once a marshaling bug becomes expected behavior the bug is difficult to fix. This is due to user reliance on shipped behavior and since the marshaling system is built into the runtime there aren't ways to select previous or new behavior. * Example involving COM marshaling: https://github.com/dotnet/coreclr/pull/23974. * Debugging the auto-generated marshaling IL Stub is difficult for runtime developers and close to impossible for consumers of P/Invokes. @@ -26,7 +26,7 @@ The [Roslyn Compiler](https://github.com/dotnet/roslyn) team is working on a [So * [Source Generators][source_gen_link] * Branch: https://github.com/dotnet/roslyn/tree/features/source-generators -* Support for non-`void` return types in [`partial`](https://docs.microsoft.com/dotnet/csharp/language-reference/keywords/partial-method) methods. +* Support for non-`void` return types in [`partial`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/partial-method) methods. * https://github.com/dotnet/csharplang/issues/3301 ## Design @@ -61,11 +61,11 @@ At (A) in the above code snippet, the runtime is told to look for an export name 2) The runtime attempts to find a binary with the name supplied in `DllImportAttribute`. - * Discovery of the target binary is complicated and can be influenced by the [`AssemblyLoadContext`](https://docs.microsoft.com/dotnet/api/system.runtime.loader.assemblyloadcontext) and [`NativeLibrary`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.nativelibrary) classes. + * Discovery of the target binary is complicated and can be influenced by the [`AssemblyLoadContext`](https://learn.microsoft.com/dotnet/api/system.runtime.loader.assemblyloadcontext) and [`NativeLibrary`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.nativelibrary) classes. -3) Once the binary is found and loaded into the runtime, it is queried for the expected export name. The name of the attributed function is used by default but this is configurable by the [`DllImportAttribute.EntryPoint`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.entrypoint) property. +3) Once the binary is found and loaded into the runtime, it is queried for the expected export name. The name of the attributed function is used by default but this is configurable by the [`DllImportAttribute.EntryPoint`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.entrypoint) property. - * This process is also influenced by additional `DllImportAttribute` properties as well as by the underlying platform. For example, the [Win32 API ANSI/UNICODE convention](https://docs.microsoft.com/windows/win32/intl/conventions-for-function-prototypes) on Windows is respected and a(n) `A`/`W` suffix may be appended to the function name if it is not immediately found. + * This process is also influenced by additional `DllImportAttribute` properties as well as by the underlying platform. For example, the [Win32 API ANSI/UNICODE convention](https://learn.microsoft.com/windows/win32/intl/conventions-for-function-prototypes) on Windows is respected and a(n) `A`/`W` suffix may be appended to the function name if it is not immediately found. 4) The IL Stub is called like any other .NET method. @@ -111,7 +111,7 @@ During the source generation process the metadata in the `LibraryImportAttribute The Source Generator would generate the implementation of the partial method (D) in a separate translation unit (`Stubs.g.cs`). At point (E) a `DllImportAttribute` declaration is created based on the user's original declaration (A) for a private P/Invoke specifically for the generated code. The P/Invoke signature from the original declaration would be modified to contain only [blittable types][blittable_link] to ensure the JIT could inline the invocation. Finally note that the user's original function signature would remain in to avoid impacting existing callsites. -In this system it is not defined how marshaling of specific types would be performed. The built-in runtime has complex rules for some types, and it is these rules that once shipped become the de facto standard - often times regardless if the behavior is a bug or not. The design here is not concerned with how the arguments go from a managed to unmanaged environment. With the IL Stub generation extracted from the runtime new type marshaling (e.g. [`Span`](https://docs.microsoft.com/dotnet/api/system.span-1)) could be introduced without requiring an corresponding update to the runtime itself. The `Span` type is good example of a type that at present has no support for marshaling, but with this proposal users could update to the latest generator and have support without changing the runtime. +In this system it is not defined how marshaling of specific types would be performed. The built-in runtime has complex rules for some types, and it is these rules that once shipped become the de facto standard - often times regardless if the behavior is a bug or not. The design here is not concerned with how the arguments go from a managed to unmanaged environment. With the IL Stub generation extracted from the runtime new type marshaling (e.g. [`Span`](https://learn.microsoft.com/dotnet/api/system.span-1)) could be introduced without requiring an corresponding update to the runtime itself. The `Span` type is good example of a type that at present has no support for marshaling, but with this proposal users could update to the latest generator and have support without changing the runtime. ### Adoption of Source Generator @@ -199,11 +199,11 @@ namespace System.Runtime.InteropServices * How will users get error messages during source generator? - * The Source Generator API will be permitted to provide warnings and errors through the [Roslyn SDK](https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/). + * The Source Generator API will be permitted to provide warnings and errors through the [Roslyn SDK](https://learn.microsoft.com/dotnet/csharp/roslyn-sdk/). * Will it be possible to completely replicate the marshaling rules in the current built-in system using existing .NET APIs? - * No. There are rules and semantics that would be difficult to replicate with the current .NET API surface. Additional .NET APIs will likely need to be added in order to allow a Source Generator implementation to provide identical semantics with the built-in system (e.g. Respecting the semantics of [`DllImportAttribute.SetLastError`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.setlasterror)). + * No. There are rules and semantics that would be difficult to replicate with the current .NET API surface. Additional .NET APIs will likely need to be added in order to allow a Source Generator implementation to provide identical semantics with the built-in system (e.g. Respecting the semantics of [`DllImportAttribute.SetLastError`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.setlasterror)). ## References @@ -214,10 +214,10 @@ namespace System.Runtime.InteropServices [IL Stubs description][il_stub_link] -[typemarshal_link]: https://docs.microsoft.com/dotnet/standard/native-interop/type-marshaling -[pinvoke_link]: https://docs.microsoft.com/dotnet/standard/native-interop/pinvoke +[typemarshal_link]: https://learn.microsoft.com/dotnet/standard/native-interop/type-marshaling +[pinvoke_link]: https://learn.microsoft.com/dotnet/standard/native-interop/pinvoke [comwrappers_link]: https://github.com/dotnet/runtime/issues/1845 [il_stub_link]: https://mattwarren.org/2019/09/26/Stubs-in-the-.NET-Runtime/ [source_gen_link]: https://github.com/dotnet/roslyn/blob/features/source-generators/docs/features/source-generators.md -[blittable_link]: https://docs.microsoft.com/dotnet/framework/interop/blittable-and-non-blittable-types +[blittable_link]: https://learn.microsoft.com/dotnet/framework/interop/blittable-and-non-blittable-types [il_linker_link]: https://github.com/dotnet/runtime/tree/main/src/tools/illink diff --git a/docs/design/features/unloadability.md b/docs/design/features/unloadability.md index 7ca316e0887..bc2e20b458d 100644 --- a/docs/design/features/unloadability.md +++ b/docs/design/features/unloadability.md @@ -29,7 +29,7 @@ ASP.NET (not Core) originally used AppDomains to support dynamic compiling and r ASP.NET Core moved to a more static model because of the lack of ability to unload stuff. Many of their customers did the same thing too. So, there is no pressing need for unloadability there at the moment. However, they use two tool that could potentially benefit from the unloadability -* Dotnet watch tool that watches a directory with sources and when a source file changes, it triggers recompilation and re-deployment. So, people can edit a source code used for their web page and the web server gets automatically recompiled and restarted. A need to restart the process negatively affects its performance. So, the ability to unload and reload just the modified assemblies without process restart would be very helpful here. See https://docs.microsoft.com/en-us/aspnet/core/tutorials/dotnet-watch?view=aspnetcore-2.1 for more details on the watch tool usage in ASP.NET Core. +* Dotnet watch tool that watches a directory with sources and when a source file changes, it triggers recompilation and re-deployment. So, people can edit a source code used for their web page and the web server gets automatically recompiled and restarted. A need to restart the process negatively affects its performance. So, the ability to unload and reload just the modified assemblies without process restart would be very helpful here. See https://learn.microsoft.com/aspnet/core/tutorials/dotnet-watch?view=aspnetcore-2.1 for more details on the watch tool usage in ASP.NET Core. * Compilation server for Razor pages (on demand .cshtml files compilation to .dll). (https://github.com/aspnet/Razor/blob/master/src/Microsoft.AspNetCore.Razor.Tools/CompilerHost.cs) ### LINQPad LINQPad (https://www.linqpad.net) is a very popular third-party tool for designing LINQ queries against various data sources. It uses AppDomains and their unloading mechanism heavily for the following purposes: diff --git a/docs/design/libraries/LibraryImportGenerator/Compatibility.md b/docs/design/libraries/LibraryImportGenerator/Compatibility.md index 92f0c8e85e6..5105b6cc42e 100644 --- a/docs/design/libraries/LibraryImportGenerator/Compatibility.md +++ b/docs/design/libraries/LibraryImportGenerator/Compatibility.md @@ -51,15 +51,15 @@ In the event a marshaller would generate code that has a specific target framewo ### Semantic changes compared to `DllImportAttribute` -[`CharSet`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.charset) has been replaced with a new `StringMarshalling` enumeration. `Ansi` and `Auto` are no longer supported as first-class options and `Utf8` has been added. +[`CharSet`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.charset) has been replaced with a new `StringMarshalling` enumeration. `Ansi` and `Auto` are no longer supported as first-class options and `Utf8` has been added. -With `DllImportAttribute`, the default value of [`CharSet`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.charset) is runtime/language-defined. In the built-in system, the default value of the `CharSet` property is `CharSet.Ansi`. The P/Invoke source generator makes no assumptions about `StringMarshalling` if it is not explicitly set on `LibraryImportAttribute`. Marshalling of `char` or `string` requires explicitly specifying marshalling information. +With `DllImportAttribute`, the default value of [`CharSet`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.charset) is runtime/language-defined. In the built-in system, the default value of the `CharSet` property is `CharSet.Ansi`. The P/Invoke source generator makes no assumptions about `StringMarshalling` if it is not explicitly set on `LibraryImportAttribute`. Marshalling of `char` or `string` requires explicitly specifying marshalling information. -[`BestFitMapping`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.bestfitmapping) and [`ThrowOnUnmappableChar`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.throwonunmappablechar) will not be supported for `LibraryImportAttribute`. These values only have meaning on Windows when marshalling string data (`char`, `string`, `StringBuilder`) as [ANSI](https://docs.microsoft.com/windows/win32/intl/code-pages). As the general recommendation - including from Windows - is to move away from ANSI, the P/Invoke source generator will not support these fields. +[`BestFitMapping`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.bestfitmapping) and [`ThrowOnUnmappableChar`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.throwonunmappablechar) will not be supported for `LibraryImportAttribute`. These values only have meaning on Windows when marshalling string data (`char`, `string`, `StringBuilder`) as [ANSI](https://learn.microsoft.com/windows/win32/intl/code-pages). As the general recommendation - including from Windows - is to move away from ANSI, the P/Invoke source generator will not support these fields. -[`CallingConvention`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.callingconvention) will not be supported for `LibraryImportAttribute`. Users will be required to use the new `UnmanagedCallConvAttribute` attribute instead. This attribute provides support for extensible calling conventions and provides parity with the `UnmanagedCallersOnlyAttribute` attribute and C# function pointer syntax. We will enable our conversion code-fix to automatically convert explicit and known calling convention usage to use the `UnmanagedCallConvAttribute`. +[`CallingConvention`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.callingconvention) will not be supported for `LibraryImportAttribute`. Users will be required to use the new `UnmanagedCallConvAttribute` attribute instead. This attribute provides support for extensible calling conventions and provides parity with the `UnmanagedCallersOnlyAttribute` attribute and C# function pointer syntax. We will enable our conversion code-fix to automatically convert explicit and known calling convention usage to use the `UnmanagedCallConvAttribute`. -[`ExactSpelling`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.exactspelling) will not be supported for `LibraryImportAttribute`. If `ExactSpelling` is used on an existing `DllImport`, the offered code-fix will provide users with additional options for using `A` or `W` suffixed variants depending on the provided `CharSet` so they can explicitly choose which spelling is correct for their scenario. +[`ExactSpelling`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.exactspelling) will not be supported for `LibraryImportAttribute`. If `ExactSpelling` is used on an existing `DllImport`, the offered code-fix will provide users with additional options for using `A` or `W` suffixed variants depending on the provided `CharSet` so they can explicitly choose which spelling is correct for their scenario. ### Required references @@ -68,30 +68,30 @@ The following framework references are required: - `System.Runtime` - `System.Runtime.InteropServices` -These are all part of `NetCoreApp` and will be referenced by default unless [implicit framework references are disabled](https://docs.microsoft.com/dotnet/core/project-sdk/msbuild-props#disableimplicitframeworkreferences). +These are all part of `NetCoreApp` and will be referenced by default unless [implicit framework references are disabled](https://learn.microsoft.com/dotnet/core/project-sdk/msbuild-props#disableimplicitframeworkreferences). ### `char` marshalling Marshalling of `char` will only be supported with `StringMarshalling.Utf16` or as `UnmanagedType.U2` or `UnmanagedType.I2`. It will not be supported when configured with any of the following: - - [`UnmanagedType.U1` or `UnmanagedType.I1`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.unmanagedtype) + - [`UnmanagedType.U1` or `UnmanagedType.I1`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.unmanagedtype) - `StringMarshalling.Utf8` will not be supported. - - No explicit marshalling information - either `LibraryImportAttribute.StringMarshalling` or [`MarshalAsAttribute`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute) + - No explicit marshalling information - either `LibraryImportAttribute.StringMarshalling` or [`MarshalAsAttribute`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute) -In the built-in system, marshalling with `CharSet.Ansi` and `CharSet.None` used the [system default Windows ANSI code page](https://docs.microsoft.com/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte) when on Windows and took the first byte of the UTF-8 encoding on non-Windows platforms. The above reasoning also applies to marshalling of a `char` as `UnmanagedType.U1` and `UnmanagedType.I1`. All approaches are fundamentally flawed and therefore not supported. If a single-byte character is expected to be marshalled it is left to the caller to convert a .NET `char` into a single `byte` prior to calling the native function. +In the built-in system, marshalling with `CharSet.Ansi` and `CharSet.None` used the [system default Windows ANSI code page](https://learn.microsoft.com/windows/win32/api/stringapiset/nf-stringapiset-widechartomultibyte) when on Windows and took the first byte of the UTF-8 encoding on non-Windows platforms. The above reasoning also applies to marshalling of a `char` as `UnmanagedType.U1` and `UnmanagedType.I1`. All approaches are fundamentally flawed and therefore not supported. If a single-byte character is expected to be marshalled it is left to the caller to convert a .NET `char` into a single `byte` prior to calling the native function. For `CharSet.Auto`, the built-in system relied upon detection at runtime of the platform when determining the targeted encoding. Performing this check in generated code violates the "pay-for-play" principle. Given that there are no scenarios for this feature in `NetCoreApp` it will not be supported. ### `string` marshalling Marshalling of `string` will not be supported when configured with any of the following: - - [`UnmanagedType.VBByRefStr`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.unmanagedtype) - - No explicit marshalling information - either `LibraryImportAttribute.StringMarshalling` or [`MarshalAsAttribute`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute) + - [`UnmanagedType.VBByRefStr`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.unmanagedtype) + - No explicit marshalling information - either `LibraryImportAttribute.StringMarshalling` or [`MarshalAsAttribute`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute) -When converting from native to managed, the built-in system would throw a [`MarshalDirectiveException`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshaldirectiveexception) if the string's length is over 0x7ffffff0. The generated marshalling code will no longer perform this check. +When converting from native to managed, the built-in system would throw a [`MarshalDirectiveException`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.marshaldirectiveexception) if the string's length is over 0x7ffffff0. The generated marshalling code will no longer perform this check. -In the built-in system, marshalling a `string` contains an optimization for parameters passed by value to allocate on the stack (instead of through [`AllocCoTaskMem`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshal.alloccotaskmem)) if the string is below a certain length (MAX_PATH). For UTF-16, this optimization was also applied for parameters passed by read-only reference. The generated marshalling code will include this optimization for read-only reference parameters for non-UTF-16 as well. +In the built-in system, marshalling a `string` contains an optimization for parameters passed by value to allocate on the stack (instead of through [`AllocCoTaskMem`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.marshal.alloccotaskmem)) if the string is below a certain length (MAX_PATH). For UTF-16, this optimization was also applied for parameters passed by read-only reference. The generated marshalling code will include this optimization for read-only reference parameters for non-UTF-16 as well. -When marshalling as [ANSI](https://docs.microsoft.com/windows/win32/intl/code-pages) on Windows (using `UnmanagedType.LPStr`): +When marshalling as [ANSI](https://learn.microsoft.com/windows/win32/intl/code-pages) on Windows (using `UnmanagedType.LPStr`): - Best-fit mapping will be disabled and no exception will be thrown for unmappable characters. In the built-in system, this behaviour was configured through [`DllImportAttribute.BestFitMapping`] and [`DllImportAttribute.ThrowOnUnmappableChar`]. The generated marshalling code will have the equivalent behaviour of `BestFitMapping=false` and `ThrowOnUnmappableChar=false`. The p/invoke source generator does not provide an equivalent to using `CharSet.Auto` in the built-in system. If platform-dependent behaviour is desired, it is left to the user to define different p/invokes with different marshalling configurations. @@ -104,27 +104,27 @@ To aid in conversion from `DllImport` to source-generated marshalling, the code- ### Custom marshaller support -Using a custom marshaller (i.e. [`ICustomMarshaler`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.icustommarshaler)) with the `UnmanagedType.CustomMarshaler` value on `MarshalAsAttribute` is not supported. This also implies `MarshalAsAttribute` fields: [`MarshalTypeRef`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute.marshaltyperef), [`MarshalType`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute.marshaltype), and [`MarshalCookie`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute.marshalcookie) are unsupported. +Using a custom marshaller (i.e. [`ICustomMarshaler`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.icustommarshaler)) with the `UnmanagedType.CustomMarshaler` value on `MarshalAsAttribute` is not supported. This also implies `MarshalAsAttribute` fields: [`MarshalTypeRef`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute.marshaltyperef), [`MarshalType`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute.marshaltype), and [`MarshalCookie`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute.marshalcookie) are unsupported. ### Array marshalling -Marshalling of arrays will not be supported when using [`UnmanagedType.SafeArray`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.unmanagedtype). This implies that the following `MarshalAsAttribute` fields are unsupported: [`SafeArraySubType`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute.safearraysubtype) and [`SafeArrayUserDefinedSubType`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute.safearrayuserdefinedsubtype) +Marshalling of arrays will not be supported when using [`UnmanagedType.SafeArray`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.unmanagedtype). This implies that the following `MarshalAsAttribute` fields are unsupported: [`SafeArraySubType`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute.safearraysubtype) and [`SafeArrayUserDefinedSubType`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute.safearrayuserdefinedsubtype) -Specifying array-specific marshalling members on the `MarshalAsAttribute` such as [`SizeConst`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute.sizeconst), [`ArraySubType`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute.arraysubtype), and [`SizeParamIndex`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute.sizeparamindex) with non-array `UnmanagedType` types is unsupported. +Specifying array-specific marshalling members on the `MarshalAsAttribute` such as [`SizeConst`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute.sizeconst), [`ArraySubType`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute.arraysubtype), and [`SizeParamIndex`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute.sizeparamindex) with non-array `UnmanagedType` types is unsupported. Only single-dimensional arrays are supported for source generated marshalling. -In the source-generated marshalling, arrays will be allocated on the stack (instead of through [`AllocCoTaskMem`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshal.alloccotaskmem)) if they are passed by value or by read-only reference if they contain at most 256 bytes of data. The built-in system does not support this optimization for arrays. +In the source-generated marshalling, arrays will be allocated on the stack (instead of through [`AllocCoTaskMem`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.marshal.alloccotaskmem)) if they are passed by value or by read-only reference if they contain at most 256 bytes of data. The built-in system does not support this optimization for arrays. In the built-in system, marshalling a `char` array by value with `CharSet.Unicode` would default to also marshalling data out. In the source-generated marshalling, the `char` array must be marked with the `[Out]` attribute for data to be marshalled out by value. ### `in` keyword -For some types - blittable or Unicode `char` - passed by read-only reference via the [`in` keyword](https://docs.microsoft.com/dotnet/csharp/language-reference/keywords/in-parameter-modifier), the built-in system simply pins the parameter. The generated marshalling code does the same, such that there is no behavioural difference. A consequence of this behaviour is that any modifications made by the invoked function will be reflected in the caller. It is left to the user to avoid the situation in which `in` is used for a parameter that will actually be modified by the invoked function. +For some types - blittable or Unicode `char` - passed by read-only reference via the [`in` keyword](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/in-parameter-modifier), the built-in system simply pins the parameter. The generated marshalling code does the same, such that there is no behavioural difference. A consequence of this behaviour is that any modifications made by the invoked function will be reflected in the caller. It is left to the user to avoid the situation in which `in` is used for a parameter that will actually be modified by the invoked function. ### `LCIDConversion` support -[`LCIDConversionAttribute`](`https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.lcidconversionattribute`) will not be supported for methods marked with `LibraryImportAttribute`. +[`LCIDConversionAttribute`](`https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.lcidconversionattribute`) will not be supported for methods marked with `LibraryImportAttribute`. ### `[In, Out]` Attributes @@ -137,11 +137,11 @@ Support for struct marshalling in the source-generated marshalling is described ### Unsupported types Unlike the built-in system, the source generator does not support marshalling for the following types: -- [`CriticalHandle`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.criticalhandle) -- [`HandleRef`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.handleref) -- [`StringBuilder`](https://docs.microsoft.com/dotnet/api/system.text.stringbuilder) +- [`CriticalHandle`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.criticalhandle) +- [`HandleRef`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.handleref) +- [`StringBuilder`](https://learn.microsoft.com/dotnet/api/system.text.stringbuilder) -The source generator also does not support marshalling objects using the following [`UnmanagedType`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.unmanagedtype) values: +The source generator also does not support marshalling objects using the following [`UnmanagedType`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.unmanagedtype) values: - `UnmanagedType.Interface` - `UnmanagedType.IDispatch` - `UnmanagedType.IInspectable` diff --git a/docs/design/libraries/LibraryImportGenerator/Pipeline.md b/docs/design/libraries/LibraryImportGenerator/Pipeline.md index bd389539517..9414e8d51b6 100644 --- a/docs/design/libraries/LibraryImportGenerator/Pipeline.md +++ b/docs/design/libraries/LibraryImportGenerator/Pipeline.md @@ -8,11 +8,11 @@ The P/Invoke source generator is responsible for finding all methods marked with 1. [Generate the corresponding P/Invoke](#pinvoke) 1. Add the generated source to the compilation. -The pipeline uses the Roslyn [Syntax APIs](https://docs.microsoft.com/dotnet/api/microsoft.codeanalysis.csharp.syntax) to create the generated code. This imposes some structure for the marshalling generators and allows for easier inspection or modification (if desired) of the generated code. +The pipeline uses the Roslyn [Syntax APIs](https://learn.microsoft.com/dotnet/api/microsoft.codeanalysis.csharp.syntax) to create the generated code. This imposes some structure for the marshalling generators and allows for easier inspection or modification (if desired) of the generated code. ## Symbol and metadata processing -The generator processes the method's `LibraryImportAttribute` data, the method's parameter and return types, and the metadata on them (e.g. [`LCIDConversionAttribute`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.lcidconversionattribute), [`MarshalAsAttribute`][MarshalAsAttribute], [struct marshalling attributes](StructMarshalling.md)). This information is used to determine the corresponding native type for each managed parameter/return type and how they will be marshalled. +The generator processes the method's `LibraryImportAttribute` data, the method's parameter and return types, and the metadata on them (e.g. [`LCIDConversionAttribute`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.lcidconversionattribute), [`MarshalAsAttribute`][MarshalAsAttribute], [struct marshalling attributes](StructMarshalling.md)). This information is used to determine the corresponding native type for each managed parameter/return type and how they will be marshalled. A [`TypePositionInfo`][src-TypePositionInfo] is created for each type that needs to be marshalled. For each parameter and return type, this captures the managed type, managed and native positions (return or index in parameter list), and marshalling information. @@ -154,7 +154,7 @@ To help enable developers to use the full model described in the [Struct Marshal ### `SetLastError=true` -The stub code generation also handles [`SetLastError=true`][SetLastError] behaviour. This configuration indicates that system error code ([`errno`](https://en.wikipedia.org/wiki/Errno.h) on Unix, [`GetLastError`](https://docs.microsoft.com/windows/win32/api/errhandlingapi/nf-errhandlingapi-getlasterror) on Windows) should be stored after the native invocation, such that it can be retrieved using [`Marshal.GetLastWin32Error`](https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshal.getlastwin32error). +The stub code generation also handles [`SetLastError=true`][SetLastError] behaviour. This configuration indicates that system error code ([`errno`](https://en.wikipedia.org/wiki/Errno.h) on Unix, [`GetLastError`](https://learn.microsoft.com/windows/win32/api/errhandlingapi/nf-errhandlingapi-getlasterror) on Windows) should be stored after the native invocation, such that it can be retrieved using [`Marshal.GetLastWin32Error`](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.marshal.getlastwin32error). This means that, rather than simply invoke the native method, the generated stub will: @@ -229,16 +229,16 @@ static partial byte Method__PInvoke__(ushort* s); [src-StubCodeContext]: /src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/StubCodeContext.cs [src-TypePositionInfo]: /src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/TypePositionInfo.cs -[DllImportAttribute]: https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute -[MarshalAsAttribute]: https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute -[InAttribute]: https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.inattribute -[OutAttribute]: https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.outattribute +[DllImportAttribute]: https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute +[MarshalAsAttribute]: https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.marshalasattribute +[InAttribute]: https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.inattribute +[OutAttribute]: https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.outattribute -[BestFitMapping]: https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.bestfitmapping -[CallingConvention]: https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.callingconvention -[CharSet]: https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.charset -[EntryPoint]: https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.entrypoint -[ExactSpelling]: https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.exactspelling -[PreserveSig]: https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.preservesig -[SetLastError]: https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.setlasterror -[ThrowOnUnmappableChar]: https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.throwonunmappablechar +[BestFitMapping]: https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.bestfitmapping +[CallingConvention]: https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.callingconvention +[CharSet]: https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.charset +[EntryPoint]: https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.entrypoint +[ExactSpelling]: https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.exactspelling +[PreserveSig]: https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.preservesig +[SetLastError]: https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.setlasterror +[ThrowOnUnmappableChar]: https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute.throwonunmappablechar diff --git a/docs/design/libraries/LibraryImportGenerator/StructMarshalling.md b/docs/design/libraries/LibraryImportGenerator/StructMarshalling.md index 24bc5dbb4a7..0d285f92870 100644 --- a/docs/design/libraries/LibraryImportGenerator/StructMarshalling.md +++ b/docs/design/libraries/LibraryImportGenerator/StructMarshalling.md @@ -282,7 +282,7 @@ The P/Invoke source generator (as well as the struct source generator when neste If a structure type does not meet the requirements to not require marshalling or does not have the `NativeMarshallingAttribute` applied at the type definition, the user can supply a `MarshalUsingAttribute` at the marshalling location (field, parameter, or return value) with a native type matching the same requirements as `NativeMarshallingAttribute`'s native type. -All generated stubs will be marked with [`SkipLocalsInitAttribute`](https://docs.microsoft.com/dotnet/api/system.runtime.compilerservices.skiplocalsinitattribute) on supported frameworks. This does require attention when performing custom marshalling as the state of stub allocated memory will be in an undefined state. +All generated stubs will be marked with [`SkipLocalsInitAttribute`](https://learn.microsoft.com/dotnet/api/system.runtime.compilerservices.skiplocalsinitattribute) on supported frameworks. This does require attention when performing custom marshalling as the state of stub allocated memory will be in an undefined state. ### Special case: Transparent Structures diff --git a/docs/design/mono/debugger.md b/docs/design/mono/debugger.md index 2268d81bf10..6ad08fc09c8 100644 --- a/docs/design/mono/debugger.md +++ b/docs/design/mono/debugger.md @@ -2,7 +2,7 @@ ## Overview -The details of launching a Debugger session for a Blazor WebAssembly application is described [here](https://docs.microsoft.com/en-us/aspnet/core/blazor/debug?view=aspnetcore-6.0&tabs=visual-studio). +The details of launching a Debugger session for a Blazor WebAssembly application is described [here](https://learn.microsoft.com/aspnet/core/blazor/debug?view=aspnetcore-6.0&tabs=visual-studio). ## Debugger Attributes Web Assembly Debugger supports usage of following attributes: @@ -18,7 +18,7 @@ Web Assembly Debugger supports usage of following attributes: - Stepping In/Over: results in an additional stepping need to proceed to the next line.

- __System.Diagnostics.DebuggerDisplay__ - __System.Diagnostics.DebuggerTypeProxy__ -- __System.Diagnostics.DebuggerBrowsable__ ([doc](https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.debuggerbrowsableattribute?view=net-6.0)) +- __System.Diagnostics.DebuggerBrowsable__ ([doc](https://learn.microsoft.com/dotnet/api/system.diagnostics.debuggerbrowsableattribute?view=net-6.0)) - Collapsed - displayed normally. - RootHidden: - Simple type - not displayed in the debugger window. diff --git a/docs/design/mono/diagnostics-tracing.md b/docs/design/mono/diagnostics-tracing.md index 9d1f668871c..898ea1a3a96 100644 --- a/docs/design/mono/diagnostics-tracing.md +++ b/docs/design/mono/diagnostics-tracing.md @@ -19,13 +19,13 @@ Existing diagnostic tooling only supports `NamedPipes`/`UnixDomainSockets`, so i For more details around diagnostic scenarios, see: -https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-counters +https://learn.microsoft.com/dotnet/core/diagnostics/dotnet-counters -https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-trace +https://learn.microsoft.com/dotnet/core/diagnostics/dotnet-trace -https://docs.microsoft.com/en-us/dotnet/core/diagnostics/event-counter-perf +https://learn.microsoft.com/dotnet/core/diagnostics/event-counter-perf -https://docs.microsoft.com/en-us/dotnet/core/diagnostics/debug-highcpu +https://learn.microsoft.com/dotnet/core/diagnostics/debug-highcpu ## Building an application including diagnostic tracing support @@ -380,7 +380,7 @@ NOTE, iOS only support use of loopback interface when running DiagnosticServer i ### Application running single file based EventPipe session -If application supports controlled runtime shutdown, `mono_jit_cleanup` gets called before terminating process, it is possible to run a single file based EventPipe session using environment variables as described in https://docs.microsoft.com/en-us/dotnet/core/diagnostics/eventpipe#trace-using-environment-variables. In .net6 an additional variable has been added, `DOTNET_EventPipeOutputStreaming`, making sure data is periodically flushed into the output file. +If application supports controlled runtime shutdown, `mono_jit_cleanup` gets called before terminating process, it is possible to run a single file based EventPipe session using environment variables as described in https://learn.microsoft.com/dotnet/core/diagnostics/eventpipe#trace-using-environment-variables. In .net6 an additional variable has been added, `DOTNET_EventPipeOutputStreaming`, making sure data is periodically flushed into the output file. If application doesn't support controlled runtime shutdown, this mode won't work, since it requires rundown events, only emitted when closing session and flushing memory manager. If application doesn't call `mono_jit_cleanup` before terminating, generated nettrace file will lack rundown events needed to produce callstacks including symbols. @@ -493,9 +493,9 @@ Combining different sessions including different GC information opens up ability Collected events retrieved over EventPipe sessions is stored in a nettrace file that can be analyzed using tooling like PerfView, Speedscope, Chronium or Visual Studio: -https://docs.microsoft.com/en-us/dotnet/core/diagnostics/debug-highcpu?tabs=windows#trace-generation +https://learn.microsoft.com/dotnet/core/diagnostics/debug-highcpu?tabs=windows#trace-generation -https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-trace#dotnet-trace-convert +https://learn.microsoft.com/dotnet/core/diagnostics/dotnet-trace#dotnet-trace-convert https://github.com/dotnet/diagnostics/blob/main/documentation/tutorial/app_running_slow_highcpu.md diff --git a/docs/design/mono/mono-library-mode.md b/docs/design/mono/mono-library-mode.md index 42288fa22a4..f6c6a98e5a7 100644 --- a/docs/design/mono/mono-library-mode.md +++ b/docs/design/mono/mono-library-mode.md @@ -3,16 +3,16 @@ Library Mode on Mono # Background -For many native applications, accessibility to bountiful APIs from .NET runtime libraries can save developers from "reinventing the wheel" in the target platform's native language. That is where [interoperability](https://learn.microsoft.com/en-us/dotnet/csharp/advanced-topics/interop/) comes in handy to access modern .NET APIs from the native side. The .NET runtime libraries require the .NET runtime to function properly, and integrating the entire .NET ecosystem may prove cumbersome and unnecessary. Instead, for a smaller footprint and more seamless experience, the runtime and custom managed code invoking .NET APIs can be bundled into a library for direct consumption. In line with [Native code interop with Native AOT](https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/interop), as of .NET 8, the [mono runtime supports a library mode](https://github.com/dotnet/runtime/issues/79377) enabling mobile developers to leverage modern .NET APIs in their mobile applications with a single static or shared library. +For many native applications, accessibility to bountiful APIs from .NET runtime libraries can save developers from "reinventing the wheel" in the target platform's native language. That is where [interoperability](https://learn.microsoft.com/dotnet/csharp/advanced-topics/interop/) comes in handy to access modern .NET APIs from the native side. The .NET runtime libraries require the .NET runtime to function properly, and integrating the entire .NET ecosystem may prove cumbersome and unnecessary. Instead, for a smaller footprint and more seamless experience, the runtime and custom managed code invoking .NET APIs can be bundled into a library for direct consumption. In line with [Native code interop with Native AOT](https://learn.microsoft.com/dotnet/core/deploying/native-aot/interop), as of .NET 8, the [mono runtime supports a library mode](https://github.com/dotnet/runtime/issues/79377) enabling mobile developers to leverage modern .NET APIs in their mobile applications with a single static or shared library. Note: The library generated from Mono's Library Mode containing custom managed code and the mono runtime will, for brevity, be referred to as the mono library. # How it works The core components of mono's library mode that enables interoperability between native and managed code are as follows: -1. [UnmanagedCallersOnlyAttribute](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.unmanagedcallersonlyattribute?view=net-7.0) which allows native code to directly call managed methods. -2. [Direct Platform Invoke (P/Invoke)](https://learn.microsoft.com/en-us/dotnet/standard/native-interop/pinvoke) which allows managed code to directly call native functions. -3. The mono runtime which facilitates the above interop directions among its other responsibilities as a [managed runtime](https://learn.microsoft.com/en-us/dotnet/core/introduction#runtime). +1. [UnmanagedCallersOnlyAttribute](https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.unmanagedcallersonlyattribute?view=net-7.0) which allows native code to directly call managed methods. +2. [Direct Platform Invoke (P/Invoke)](https://learn.microsoft.com/dotnet/standard/native-interop/pinvoke) which allows managed code to directly call native functions. +3. The mono runtime which facilitates the above interop directions among its other responsibilities as a [managed runtime](https://learn.microsoft.com/dotnet/core/introduction#runtime). Being able to call managed .NET APIs from a native application has many usecases, including reducing the need to rewrite logic in the native language when there is no native counterpart. In order to call managed code leveraging these .NET APIs, the native application needs to recognize the corresponding symbols. Once custom managed code is compiled into managed assemblies, the Mono AOT Compiler processes them to generate [native-to-managed wrappers](https://github.com/dotnet/runtime/blob/43d164d8d65d163fef0de185eb11cfa0b1291919/src/mono/mono/mini/aot-compiler.c#L5446-L5498) for all methods decorated with [`UnmanagedCallersOnlyAttribute`](https://github.com/dotnet/runtime/pull/79424). These native-to-managed wrappers have entrypoint symbols specified by the corresponding `UnmanagedCallersOnlyAttribute`, allowing native code to call them directly. So once the mono library is linked/loaded into the native application, the Mono AOT Compiled assemblies should be [preloaded by the mono runtime](https://github.com/dotnet/runtime/blob/43d164d8d65d163fef0de185eb11cfa0b1291919/src/tasks/LibraryBuilder/Templates/preloaded-assemblies.c#L10) once the mono runtime is initialized in order to enable calling managed methods from the native side of the application. diff --git a/docs/design/mono/profiled-aot.md b/docs/design/mono/profiled-aot.md index 80e36b9e9c0..2d88a7c9ea5 100644 --- a/docs/design/mono/profiled-aot.md +++ b/docs/design/mono/profiled-aot.md @@ -9,9 +9,9 @@ Mobile applications built using .NET typically leverage the Mono runtime to load The advantages of Profiled AOT stem from its flexibility to AOT select code paths, leaving the rest to be compiled on the fly by the JIT compiler or Mono Interpreter. With an analysis of an application's trace, a record capturing a sequence of events during the application's execution, profiles can be generated to tailor optimizations for each application and environment. For example, profiles may target frequently executed (hot) code paths, minimizing the amount of runtime compilations and reducing application size, which are especially important in environments where full AOT compilation would strain storage space. Moreover, profiles may target startup code to optimize startup performance. -Within .NET, traces can be collected by [diagnostic tooling](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/eventpipe#tools-that-use-eventpipe) that use the [EventPipe](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/eventpipe) runtime component. [Existing diagnostic tooling only supports `NamedPipes`/`UnixDomainSockets`](https://github.com/dotnet/runtime/blob/main/docs/design/mono/diagnostics-tracing.md), so the [diagnostics tool dotnet-dsrouter](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-dsrouter) is required to bridge the EventPipe-based diagnostic tooling with .NET applications on mobile platforms and other remote sandboxed environments. +Within .NET, traces can be collected by [diagnostic tooling](https://learn.microsoft.com/dotnet/core/diagnostics/eventpipe#tools-that-use-eventpipe) that use the [EventPipe](https://learn.microsoft.com/dotnet/core/diagnostics/eventpipe) runtime component. [Existing diagnostic tooling only supports `NamedPipes`/`UnixDomainSockets`](https://github.com/dotnet/runtime/blob/main/docs/design/mono/diagnostics-tracing.md), so the [diagnostics tool dotnet-dsrouter](https://learn.microsoft.com/dotnet/core/diagnostics/dotnet-dsrouter) is required to bridge the EventPipe-based diagnostic tooling with .NET applications on mobile platforms and other remote sandboxed environments. -Events collected by EventPipe-based diagnostic tooling are emitted with a [`.nettrace` file format](https://github.com/microsoft/perfview/blob/main/src/TraceEvent/EventPipe/EventPipeFormat.md). Among the [various events supported by Mono runtime](https://github.com/dotnet/runtime/blob/main/src/mono/mono/eventpipe/gen-eventing-event-inc.lst), [method jitting and method loading](https://github.com/dotnet/runtime/blob/096b2499fe6939d635c35edaa607a180eb578fbb/src/mono/mono/eventpipe/gen-eventing-event-inc.lst#L39-L41) are crucial to [inform the Mono AOT Compiler what methods to AOT](https://github.com/dotnet/runtime/blob/6b67caaedfbfeaf7707478e50ccc9e8bc929e591/src/mono/mono/mini/aot-compiler.c#L13818-L13880). To collect a trace containing such events, it is imperative that dotnet-trace is provided either the appropriate [event provider](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/well-known-event-providers) with [keyword flags](https://github.com/dotnet/runtime/blob/c59aef7622c9a2499abb1b7d262ed0c90f4b0c7f/src/coreclr/vm/ClrEtwAll.man#L14-L92) through `--providers` or the appropriate list of keywords through `--clrevents`. That way, the [events relevant to the keywords are captured](https://github.com/dotnet/runtime/blob/c59aef7622c9a2499abb1b7d262ed0c90f4b0c7f/src/coreclr/vm/ClrEtwAll.man#L3133). In the example workflows below, `--providers Microsoft-Windows-DotNETRuntime:0x1F000080018:5` is used. +Events collected by EventPipe-based diagnostic tooling are emitted with a [`.nettrace` file format](https://github.com/microsoft/perfview/blob/main/src/TraceEvent/EventPipe/EventPipeFormat.md). Among the [various events supported by Mono runtime](https://github.com/dotnet/runtime/blob/main/src/mono/mono/eventpipe/gen-eventing-event-inc.lst), [method jitting and method loading](https://github.com/dotnet/runtime/blob/096b2499fe6939d635c35edaa607a180eb578fbb/src/mono/mono/eventpipe/gen-eventing-event-inc.lst#L39-L41) are crucial to [inform the Mono AOT Compiler what methods to AOT](https://github.com/dotnet/runtime/blob/6b67caaedfbfeaf7707478e50ccc9e8bc929e591/src/mono/mono/mini/aot-compiler.c#L13818-L13880). To collect a trace containing such events, it is imperative that dotnet-trace is provided either the appropriate [event provider](https://learn.microsoft.com/dotnet/core/diagnostics/well-known-event-providers) with [keyword flags](https://github.com/dotnet/runtime/blob/c59aef7622c9a2499abb1b7d262ed0c90f4b0c7f/src/coreclr/vm/ClrEtwAll.man#L14-L92) through `--providers` or the appropriate list of keywords through `--clrevents`. That way, the [events relevant to the keywords are captured](https://github.com/dotnet/runtime/blob/c59aef7622c9a2499abb1b7d262ed0c90f4b0c7f/src/coreclr/vm/ClrEtwAll.man#L3133). In the example workflows below, `--providers Microsoft-Windows-DotNETRuntime:0x1F000080018:5` is used. Profiles [ingested by the Mono AOT Compiler](https://github.com/dotnet/runtime/blob/6b67caaedfbfeaf7707478e50ccc9e8bc929e591/src/tasks/AotCompilerTask/MonoAOTCompiler.cs#L174) are generated through .NET runtime's [`dotnet-pgo` tool](https://github.com/dotnet/runtime/blob/main/docs/design/features/dotnet-pgo.md). As such, profiles passed to the Mono AOT Compiler are expected to adhere to the [`.mibc` file format](https://github.com/dotnet/runtime/blob/main/src/coreclr/tools/dotnet-pgo/dotnet-pgo-experiment.md#mibc-file-format). The Mono AOT Compiler [reads `.mibc` profiles](https://github.com/dotnet/runtime/blob/c59aef7622c9a2499abb1b7d262ed0c90f4b0c7f/src/mono/mono/mini/aot-compiler.c#L14085-L14162) to determine [which methods to AOT](https://github.com/dotnet/runtime/blob/6b67caaedfbfeaf7707478e50ccc9e8bc929e591/src/mono/mono/mini/aot-compiler.c#L13818-L13880) when compiling CIL assemblies. @@ -34,8 +34,8 @@ As the [`.mibc` profile](https://github.com/dotnet/runtime/blob/main/src/coreclr ### Requirements: - [Prerequisites](https://github.com/dotnet/runtime/blob/main/docs/workflow/testing/libraries/testing-android.md#prerequisites) - [Building mono and libs](https://github.com/dotnet/runtime/blob/main/docs/workflow/testing/libraries/testing-android.md#building-libs-and-tests-for-android) -- [dotnet-dsrouter](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-dsrouter) -- [dotnet-trace](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-trace) +- [dotnet-dsrouter](https://learn.microsoft.com/dotnet/core/diagnostics/dotnet-dsrouter) +- [dotnet-trace](https://learn.microsoft.com/dotnet/core/diagnostics/dotnet-trace) ### Tracing (if not using provided .nettrace/.mibc files) (informational) [Understanding diagnostics_tracing runtime component](https://github.com/dotnet/runtime/blob/main/docs/design/mono/diagnostics-tracing.md) diff --git a/docs/design/specs/Ecma-335-Augments.md b/docs/design/specs/Ecma-335-Augments.md index e9722759ea8..f6b8f9b964e 100644 --- a/docs/design/specs/Ecma-335-Augments.md +++ b/docs/design/specs/Ecma-335-Augments.md @@ -1069,7 +1069,7 @@ Note about creating zero-based, one-dimensional arrays in section III.4.21 "newo ## API documentation -API documentation included in partition IV: Profiles and Libraries is superseded by the actively maintained API documentation in https://github.com/dotnet/dotnet-api-docs repo. The documentation is published at https://docs.microsoft.com/en-us/dotnet/api/. +API documentation included in partition IV: Profiles and Libraries is superseded by the actively maintained API documentation in https://github.com/dotnet/dotnet-api-docs repo. The documentation is published at https://learn.microsoft.com/dotnet/api/. The incorrect description of `System.Array.Initialize` API in section "II.13.2 Initializing value types" is replaced with "The Base Class Library provides the method System.Array.Initialize (see Partition IV) to initialize every element of an array of unboxed value types by calling its parameterless instance constructor." diff --git a/docs/design/tools/illink/trimmed-assemblies.md b/docs/design/tools/illink/trimmed-assemblies.md index bf2b9273d4f..ac8e03fddc2 100644 --- a/docs/design/tools/illink/trimmed-assemblies.md +++ b/docs/design/tools/illink/trimmed-assemblies.md @@ -66,7 +66,7 @@ This shows how Blazor (or a developer) can hook into the build to opt assemblies ### Other options -.NET 5 introduced a host of additional SDK options that map directly to the underlying illink options. The full list is documented at https://docs.microsoft.com/en-us/dotnet/core/deploying/trimming-options. +.NET 5 introduced a host of additional SDK options that map directly to the underlying illink options. The full list is documented at https://learn.microsoft.com/dotnet/core/deploying/trimming-options. ## .NET 6 @@ -100,7 +100,7 @@ This ItemGroup contains assembly names that get opted into trimming via `IsTrimm ``` -The above opts `MyAssembly.dll` into trimming. Note that the ItemGroup should contain assembly names without an extension, similar to [`TrimmerRootAssembly`](https://docs.microsoft.com/en-us/dotnet/core/deploying/trimming-options#root-assemblies). Before .NET 6 this would have been done with a target: +The above opts `MyAssembly.dll` into trimming. Note that the ItemGroup should contain assembly names without an extension, similar to [`TrimmerRootAssembly`](https://learn.microsoft.com/dotnet/core/deploying/trimming-options#root-assemblies). Before .NET 6 this would have been done with a target: ```xml ``` -(Documentation for configuring feeds is [here](https://docs.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior).) +(Documentation for configuring feeds is [here](https://learn.microsoft.com/nuget/consume-packages/configuring-nuget-behavior).) ## Setup the project diff --git a/docs/project/glossary.md b/docs/project/glossary.md index 8e1de1bef96..55d59730bd5 100644 --- a/docs/project/glossary.md +++ b/docs/project/glossary.md @@ -15,25 +15,25 @@ terminology. | BBT | Microsoft internal early version of C/C++ PGO. See https://www.microsoft.com/windows/cse/bit_projects.mspx. | | BOTR | Book Of The Runtime. | | BCL | Base Class Library. A set of `System.*` (and to a limited extent `Microsoft.*`) libraries that make up the lower layer of the .NET library stack. | -| CIL | Common Intermediate Language. Equivalent to IL, also equivalent to [MSIL](https://docs.microsoft.com/dotnet/standard/managed-execution-process#compiling-to-msil). | +| CIL | Common Intermediate Language. Equivalent to IL, also equivalent to [MSIL](https://learn.microsoft.com/dotnet/standard/managed-execution-process#compiling-to-msil). | | CLI | Command Line Interface, or Common Language Infastructure. | -| CLR | [Common Language Runtime](https://docs.microsoft.com/dotnet/standard/clr). | +| CLR | [Common Language Runtime](https://learn.microsoft.com/dotnet/standard/clr). | | COMPlus | An early name for the .NET platform, back when it was envisioned as a successor to the COM platform (hence, "COM+"). Used in various places in the CLR infrastructure, most prominently as a common prefix for the names of internal configuration settings. Note that this is different from the product that eventually ended up being named [COM+](https://msdn.microsoft.com/library/windows/desktop/ms685978.aspx). | | COR | [Common Object Runtime](http://www.danielmoth.com/Blog/mscorlibdll.aspx). The name of .NET before it was named .NET. | | CoreFX | Core Framework. Original project name for open source and cross-platform version of [.NET runtime libraries](https://github.com/dotnet/runtime/tree/main/src/libraries) | | DAC | Data Access Component. An abstraction layer over the internal structures in the runtime. | -| EE | [Execution Engine](https://docs.microsoft.com/dotnet/standard/managed-execution-process#running_code). | +| EE | [Execution Engine](https://learn.microsoft.com/dotnet/standard/managed-execution-process#running_code). | | GC | [Garbage Collector](https://github.com/dotnet/runtime/blob/main/docs/design/coreclr/botr/garbage-collection.md). | | IBC | Instrumented Block Counts - used as extension (`*.ibc`) for old PGO files. | | IJW | "It Just Works" - Codename for [C++/CLI](https://learn.microsoft.com/cpp/dotnet/dotnet-programming-with-cpp-cli-visual-cpp) managed/native interop | | IPC | Inter-Process Communication. | -| IL | Intermediate Language. Equivalent to CIL, also equivalent to [MSIL](https://docs.microsoft.com/dotnet/standard/managed-execution-process#compiling-to-msil). | +| IL | Intermediate Language. Equivalent to CIL, also equivalent to [MSIL](https://learn.microsoft.com/dotnet/standard/managed-execution-process#compiling-to-msil). | | JIT | [Just-in-Time](https://github.com/dotnet/runtime/blob/main/docs/design/coreclr/jit/ryujit-overview.md) compiler. RyuJIT is the code name for the next generation Just-in-Time(aka "JIT") for the .NET runtime. | | LCG | Lightweight Code Generation. An early name for [dynamic methods](https://github.com/dotnet/runtime/blob/main/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.cs). | | MD | MetaData. | -| MDA | Managed Debugging Assistant - see [details](https://docs.microsoft.com/dotnet/framework/debug-trace-profile/diagnosing-errors-with-managed-debugging-assistants) (Note: Not in .NET Core, equivalent diagnostic functionality is made available on a case-by-case basis, e.g. [#9418](https://github.com/dotnet/runtime/issues/9418)) | +| MDA | Managed Debugging Assistant - see [details](https://learn.microsoft.com/dotnet/framework/debug-trace-profile/diagnosing-errors-with-managed-debugging-assistants) (Note: Not in .NET Core, equivalent diagnostic functionality is made available on a case-by-case basis, e.g. [#9418](https://github.com/dotnet/runtime/issues/9418)) | | MIBC | Managed Instrumented Block Counts - used as extension (`*.mibc`) for managed PGO files. | -| MSIL | [Microsoft Intermediate Language](https://docs.microsoft.com/dotnet/standard/managed-execution-process#compiling-to-msil).Common Intermediate Language. Equivalent to IL, also equivalent to CIL. | +| MSIL | [Microsoft Intermediate Language](https://learn.microsoft.com/dotnet/standard/managed-execution-process#compiling-to-msil).Common Intermediate Language. Equivalent to IL, also equivalent to CIL. | | NGen | Native Image Generator. | | NYI | Not Yet Implemented. | | PAL | [Platform Adaptation Layer](http://archive.oreilly.com/pub/a/dotnet/2002/03/04/rotor.html). Provides an abstraction layer between the runtime and the operating system. | @@ -43,17 +43,17 @@ terminology. | ProjectN | Codename for the first version of [.NET Native for UWP](https://msdn.microsoft.com/vstudio/dotnetnative.aspx). | | R2R | Ready-to-Run. A flavor of native images - command line switch of [crossgen](../workflow/building/coreclr/crossgen.md). | | Redhawk | Codename for experimental minimal managed code runtime that evolved into [CoreRT](https://github.com/dotnet/corert/). | -| SDK | Software Development Kit. The [.NET SDK](https://docs.microsoft.com/dotnet/core/sdk) contains the .NET CLI, .NET libraries and runtime, and the dotnet driver. | -| SEH | [Structured Exception Handling](https://docs.microsoft.com/windows/win32/debug/structured-exception-handling). Unified mechanism for handling hardware and software exceptions on Windows. | +| SDK | Software Development Kit. The [.NET SDK](https://learn.microsoft.com/dotnet/core/sdk) contains the .NET CLI, .NET libraries and runtime, and the dotnet driver. | +| SEH | [Structured Exception Handling](https://learn.microsoft.com/windows/win32/debug/structured-exception-handling). Unified mechanism for handling hardware and software exceptions on Windows. | | SOS | [Son of Strike](https://learn.microsoft.com/dotnet/framework/tools/sos-dll-sos-debugging-extension). The debugging extension for DbgEng based debuggers. Uses the DAC as an abstraction layer for its operation. The obscure name derives from the original nickname for the CLR team at Microsoft: "Lightning". The team built a debugging tool humorously named "Strike", and a subset of that dubbed "Son of Strike". | | SPCL | `System.Private.CoreLib` - the lowest managed assembly in the libraries stack that contains `System.Object`, `String`, etc. | | SuperPMI | JIT component test framework (super fast JIT testing - it mocks/replays EE in EE-JIT interface) - see [SuperPMI details](https://github.com/dotnet/runtime/blob/main/src/coreclr/tools/superpmi/readme.md). | | SVR | The CLR used to be built as two variants, with one called "mscorsvr.dll", to mean the "server" version. In particular, it contained the server GC implementation, which was intended for multi-threaded apps capable of taking advantage of multiple processors. In the .NET Framework 2 release, the two variants were merged into "mscorwks.dll". The WKS version was the default, however the SVR version remained available. | -| TFM | [Target Framework Moniker](https://docs.microsoft.com/dotnet/standard/frameworks) such as `net6.0` or `netstandard2.0`. | +| TFM | [Target Framework Moniker](https://learn.microsoft.com/dotnet/standard/frameworks) such as `net6.0` or `netstandard2.0`. | | TPA | Trusted Platform Assemblies used to be a special set of assemblies that comprised the platform assemblies, when it was originally designed. As of today, it is simply the set of assemblies known to constitute the application. | | URT | Universal Runtime. Ancient name for what ended up being .NET, is used in the WinError facility name FACILITY_URT. | | UTC | [Universal Tuple Compiler](https://blogs.msdn.microsoft.com/vcblog/2013/06/12/optimizing-c-code-overview/). The Microsoft C++ optimizer back-end that starts by converting the information from the FrontEnd into tuples – a binary stream of instructions. | -| UWP | [Universal Windows Platform (UWP)](https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide) is a platform-homogeneous application architecture available on every device that runs Windows 10. | +| UWP | [Universal Windows Platform (UWP)](https://learn.microsoft.com/windows/uwp/get-started/universal-application-platform-guide) is a platform-homogeneous application architecture available on every device that runs Windows 10. | | VSD | [Virtual Stub Dispatch](../design/coreclr/botr/virtual-stub-dispatch.md). Technique of using stubs for virtual method invocations instead of the traditional virtual method table. | | VM | Virtual machine. | | WKS | The CLR used to be built as two variants, with one called "mscorwks.dll", to mean the "workstation" version. In particular, it contained the client GC implementation, which was intended for single-threaded apps, independent of how many processors were on the machine. In the .NET Framework 2 release, the two variants were merged into "mscorwks.dll". The WKS version was the default, however the SVR version remained available. | @@ -173,18 +173,18 @@ produces binaries in the ReadyToRun file format. ### NGen -[NGen](https://docs.microsoft.com/en-us/dotnet/framework/tools/ngen-exe-native-image-generator) +[NGen](https://learn.microsoft.com/dotnet/framework/tools/ngen-exe-native-image-generator) is AOT technology included in .NET Framework. It usually compiles code at install time on the machine where the code will be executed. ### Full AOT -[Full AOT](https://docs.microsoft.com/en-us/xamarin/ios/internals/architecture) is used +[Full AOT](https://learn.microsoft.com/xamarin/ios/internals/architecture) is used by Mono runtime in environments that prohibit fallback to JIT. ### Hybrid AOT -[Hybrid AOT](https://docs.microsoft.com/en-us/xamarin/mac/internals/aot#hybrid-aot) is used +[Hybrid AOT](https://learn.microsoft.com/xamarin/mac/internals/aot#hybrid-aot) is used by Mono runtime in environments that allow fallback to JIT or need IL interpreter. ### Native AOT @@ -301,8 +301,8 @@ and enabling support for running WPF on .NET Core (Windows Only). [xunit]: https://github.com/xunit [mc.dot.net]: https://mc.dot.net/ [ECMA-355]: https://www.ecma-international.org/publications-and-standards/standards/ecma-335 -[dotnet-tooling]: https://docs.microsoft.com/en-us/dotnet/core/tools/ -[dlr-architecture]: https://docs.microsoft.com/en-us/dotnet/framework/reflection-and-codedom/dynamic-language-runtime-overview#dlr-architecture +[dotnet-tooling]: https://learn.microsoft.com/dotnet/core/tools/ +[dlr-architecture]: https://learn.microsoft.com/dotnet/framework/reflection-and-codedom/dynamic-language-runtime-overview#dlr-architecture [dlr-source]: https://github.com/IronLanguages/dlr [WinForms]: https://github.com/dotnet/winforms [Wpf]: https://github.com/dotnet/wpf diff --git a/docs/project/list-of-diagnostics.md b/docs/project/list-of-diagnostics.md index 76e734dea86..fa109f57267 100644 --- a/docs/project/list-of-diagnostics.md +++ b/docs/project/list-of-diagnostics.md @@ -35,8 +35,8 @@ The acceptance criteria for adding an obsoletion includes: * A bot will automatically apply the `needs-breaking-change-doc-created` label when the `breaking-change` label is detected * Follow up with the breaking change process to communicate and document the breaking change * In the breaking-change issue filed in [dotnet/docs](https://github.com/dotnet/docs), specifically mention that this breaking change is an obsoletion with a `SYSLIB` diagnostic id - * The documentation team will produce a PR that adds the obsoletion to the [SYSLIB warnings](https://docs.microsoft.com/en-us/dotnet/core/compatibility/syslib-obsoletions) page - * That PR will also add a new URL specific to this diagnostic ID; e.g. [SYSLIB0001](https://docs.microsoft.com/en-us/dotnet/core/compatibility/syslib-warnings/syslib0001) + * The documentation team will produce a PR that adds the obsoletion to the [SYSLIB warnings](https://learn.microsoft.com/dotnet/core/compatibility/syslib-obsoletions) page + * That PR will also add a new URL specific to this diagnostic ID; e.g. [SYSLIB0001](https://learn.microsoft.com/dotnet/core/compatibility/syslib-warnings/syslib0001) * Connect with `@gewarren` or `@BillWagner` with any questions * Register the `SYSLIB0###` URL in `aka.ms` * The vanity name will be `dotnet-warnings/syslib0###` diff --git a/docs/project/strong-name-signing.md b/docs/project/strong-name-signing.md index 269bb102c4a..e7bde0aab68 100644 --- a/docs/project/strong-name-signing.md +++ b/docs/project/strong-name-signing.md @@ -1,26 +1,26 @@ Strong Name Signing =================== -All .NET Core assemblies are [strong-named](https://docs.microsoft.com/en-us/dotnet/framework/app-domains/strong-named-assemblies). We do this for two reasons: +All .NET Core assemblies are [strong-named](https://learn.microsoft.com/dotnet/framework/app-domains/strong-named-assemblies). We do this for two reasons: 1. _Compatibility_. We want to maintain type identity with previous versions of our assemblies that have shipped across various versions of our platforms. Removing a strong-name from an assembly is a breaking change, and would break the ability to consume and run libraries built against the previous identities. -2. _Serviceability_. When running on .NET Framework some of .NET Core assemblies ship locally ("app-local") with the application, this is in contrast to other framework assemblies that are placed in the [GAC](https://docs.microsoft.com/en-us/dotnet/framework/app-domains/gac). To be able to service these libraries for critical security updates, we make use of the [app-local servicing](https://blogs.msdn.microsoft.com/dotnet/2014/01/22/net-4-5-1-supports-microsoft-security-updates-for-net-nuget-libraries/) feature which requires that assemblies have strong-names. +2. _Serviceability_. When running on .NET Framework some of .NET Core assemblies ship locally ("app-local") with the application, this is in contrast to other framework assemblies that are placed in the [GAC](https://learn.microsoft.com/dotnet/framework/app-domains/gac). To be able to service these libraries for critical security updates, we make use of the [app-local servicing](https://blogs.msdn.microsoft.com/dotnet/2014/01/22/net-4-5-1-supports-microsoft-security-updates-for-net-nuget-libraries/) feature which requires that assemblies have strong-names. ## FAQ ### 1. Microsoft strong-names their assemblies, should I? For the most part, the majority of applications do not need strong-names. Strong-names are left over from previous eras of .NET where [sandboxing](https://en.wikipedia.org/wiki/Sandbox_(computer_security)) needed to differentiate between code that was trusted, versus code that was untrusted. However in recent years, sandboxing via AppDomains, especially to [isolate ASP.NET web applications](https://support.microsoft.com/en-us/help/2698981/asp-net-partial-trust-does-not-guarantee-application-isolation), is no longer guaranteed and is not recommended. -However, strong-names are still required in applications in some rare situations, most of which are called out on this page: [Strong-Named Assemblies](https://docs.microsoft.com/en-us/dotnet/framework/app-domains/strong-named-assemblies). +However, strong-names are still required in applications in some rare situations, most of which are called out on this page: [Strong-Named Assemblies](https://learn.microsoft.com/dotnet/framework/app-domains/strong-named-assemblies). -Because of the viral nature of strong-naming, it is recommended that publicly published .NET libraries are strong-named. Not strong-naming a .NET library excludes anyone who does need to strong-name their application or library from using it. Read more about .NET libraries and strong-naming in the [.NET Library Guidance](https://docs.microsoft.com/dotnet/standard/library-guidance/strong-naming). +Because of the viral nature of strong-naming, it is recommended that publicly published .NET libraries are strong-named. Not strong-naming a .NET library excludes anyone who does need to strong-name their application or library from using it. Read more about .NET libraries and strong-naming in the [.NET Library Guidance](https://learn.microsoft.com/dotnet/standard/library-guidance/strong-naming). ### 2. I really, _really_ need to strong-name, what kinds of issues will I run into? There are three major problems that developers run into after strong naming their assemblies: -1. _Binding Policy_. When developers talk about strong-names, they are usually conflating it with the strict binding policy of the .NET Framework that kicks in _when_ you strong-name. This binding policy is problematic because it forces, by default, an exact match between reference and version, and requires developers to author complex [binding redirects](https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/runtime/bindingredirect-element) when they don't. In recent versions of Visual Studio, however, we've added [Automatic Binding Redirection](https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/how-to-enable-and-disable-automatic-binding-redirection) as an attempt to reduce pain of this policy on developers. On top of this, all newer platforms, including _Silverlight_, _WinRT-based platforms_ (Phone and Store), _.NET Native_ and _ASP.NET 5_ this policy has been loosened, allowing later versions of an assembly to satisfy earlier references, thereby completely removing the need to ever write binding redirects on those platforms. +1. _Binding Policy_. When developers talk about strong-names, they are usually conflating it with the strict binding policy of the .NET Framework that kicks in _when_ you strong-name. This binding policy is problematic because it forces, by default, an exact match between reference and version, and requires developers to author complex [binding redirects](https://learn.microsoft.com/dotnet/framework/configure-apps/file-schema/runtime/bindingredirect-element) when they don't. In recent versions of Visual Studio, however, we've added [Automatic Binding Redirection](https://learn.microsoft.com/dotnet/framework/configure-apps/how-to-enable-and-disable-automatic-binding-redirection) as an attempt to reduce pain of this policy on developers. On top of this, all newer platforms, including _Silverlight_, _WinRT-based platforms_ (Phone and Store), _.NET Native_ and _ASP.NET 5_ this policy has been loosened, allowing later versions of an assembly to satisfy earlier references, thereby completely removing the need to ever write binding redirects on those platforms. 2. _Virality_. Once you've strong-named an assembly, you can only statically reference other strong-named assemblies. -3. _No drop-in replacement_. This is a problem for open source libraries where the strong-name private key is not checked into the repository. This means that developers are unable to build to their own version of the library and then use it as a drop-in replacement without recompiling _all_ consuming libraries up stack to pick up the new identity. This is extremely problematic for libraries, such as Json.NET, which have large incoming dependencies. Firstly, we would recommend that these open source projects check-in their private key (remember, [strong-names are used for identity, and not for security](https://docs.microsoft.com/en-us/dotnet/framework/app-domains/strong-named-assemblies)). Failing that, however, we've introduced a new concept called [Public Signing](public-signing.md) that enables developers to build drop-in replacements without needing access to the strong-name private key. This is the mechanism that .NET Core libraries use by default. +3. _No drop-in replacement_. This is a problem for open source libraries where the strong-name private key is not checked into the repository. This means that developers are unable to build to their own version of the library and then use it as a drop-in replacement without recompiling _all_ consuming libraries up stack to pick up the new identity. This is extremely problematic for libraries, such as Json.NET, which have large incoming dependencies. Firstly, we would recommend that these open source projects check-in their private key (remember, [strong-names are used for identity, and not for security](https://learn.microsoft.com/dotnet/framework/app-domains/strong-named-assemblies)). Failing that, however, we've introduced a new concept called [Public Signing](public-signing.md) that enables developers to build drop-in replacements without needing access to the strong-name private key. This is the mechanism that .NET Core libraries use by default. diff --git a/docs/tools/illink/README.md b/docs/tools/illink/README.md index 7aed29d0ea7..c837328dbdd 100644 --- a/docs/tools/illink/README.md +++ b/docs/tools/illink/README.md @@ -3,7 +3,7 @@ This folder includes several documents that explain both high-level and low-level concepts about the IL trimmer and related tools. ## Official Docs -View the official trimming docs at [docs.microsoft.com](https://docs.microsoft.com/en-us/dotnet/core/deploying/trimming/trim-self-contained) +View the official trimming docs at [learn.microsoft.com](https://learn.microsoft.com/dotnet/core/deploying/trimming/trim-self-contained) ## Usage Docs - [MSBuild Integration](illink-tasks.md) diff --git a/docs/tools/illink/illink-options.md b/docs/tools/illink/illink-options.md index 76d8e268376..1ed9928c08f 100644 --- a/docs/tools/illink/illink-options.md +++ b/docs/tools/illink/illink-options.md @@ -110,7 +110,7 @@ Each feature can be controlled independently using `--feature NAME value` option The list of available feature names is framework-dependent and can vary between different framework versions. -The list of controllable features for .NET Core is available at https://docs.microsoft.com/en-us/dotnet/core/run-time-config/. +The list of controllable features for .NET Core is available at https://learn.microsoft.com/dotnet/core/run-time-config/. ### Using custom substitutions diff --git a/docs/tools/illink/serialization.md b/docs/tools/illink/serialization.md index d93f50bd8db..648b9a226cb 100644 --- a/docs/tools/illink/serialization.md +++ b/docs/tools/illink/serialization.md @@ -1,6 +1,6 @@ # Serialization -Trimming tools cannot analyze the patterns typically used by reflection-based serializers. Such serializers should be annotated with `RequiresUnreferencedCodeAttribute`, and using them in a trimmed app will likely not work (or will work unpredictably). Trimming tools will produce static analysis [warnings](https://docs.microsoft.com/dotnet/core/deploying/trimming-options#analysis-warnings) for these patterns. +Trimming tools cannot analyze the patterns typically used by reflection-based serializers. Such serializers should be annotated with `RequiresUnreferencedCodeAttribute`, and using them in a trimmed app will likely not work (or will work unpredictably). Trimming tools will produce static analysis [warnings](https://learn.microsoft.com/dotnet/core/deploying/trimming-options#analysis-warnings) for these patterns. If possible, avoid using reflection-based serializers with trimming, and prefer solutions based on source generators where the serialized types and all required members are statically referenced. @@ -129,12 +129,12 @@ Most features of reflection-based serializers will not work even with these heur - Serializing/deserializing types which are not attributed and don't have attributed members - Passing `typeof(MyType)` (directly or indirectly) into serializer constructors or methods - "Known type" mechanisms, such as: - - [`KnownTypeAttribute`](https://docs.microsoft.com/dotnet/api/system.runtime.serialization.knowntypeattribute?view=net-5.0) - - [`DataContractSerializer.KnownTypes`](https://docs.microsoft.com/dotnet/api/system.runtime.serialization.datacontractserializer.knowntypes?view=net-5.0) - - `extraTypes` argument of the [`XmlSerializer ctor`](https://docs.microsoft.com/dotnet/api/system.xml.serialization.xmlserializer.-ctor?view=net-5.0#System_Xml_Serialization_XmlSerializer__ctor_System_Type_System_Type___) + - [`KnownTypeAttribute`](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.knowntypeattribute?view=net-5.0) + - [`DataContractSerializer.KnownTypes`](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.datacontractserializer.knowntypes?view=net-5.0) + - `extraTypes` argument of the [`XmlSerializer ctor`](https://learn.microsoft.com/dotnet/api/system.xml.serialization.xmlserializer.-ctor?view=net-5.0#System_Xml_Serialization_XmlSerializer__ctor_System_Type_System_Type___) - Serializing types which implement special interfaces - - [`ISerializable`](https://docs.microsoft.com/dotnet/api/system.runtime.serialization.iserializable?view=net-5.0) - - [`IXmlSerializable`](https://docs.microsoft.com/dotnet/api/system.xml.serialization.ixmlserializable?view=net-5.0) + - [`ISerializable`](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.iserializable?view=net-5.0) + - [`IXmlSerializable`](https://learn.microsoft.com/dotnet/api/system.xml.serialization.ixmlserializable?view=net-5.0) - Serializer-specific handling of collection types - - Types which implement [`ICollection`](https://docs.microsoft.com/dotnet/standard/serialization/examples-of-xml-serialization#serializing-a-class-that-implements-the-icollection-interface) - - Deserializing [`collection interfaces`](https://docs.microsoft.com/dotnet/framework/wcf/feature-details/collection-types-in-data-contracts#using-collection-interface-types-and-read-only-collections) into serializer-specific default types + - Types which implement [`ICollection`](https://learn.microsoft.com/dotnet/standard/serialization/examples-of-xml-serialization#serializing-a-class-that-implements-the-icollection-interface) + - Deserializing [`collection interfaces`](https://learn.microsoft.com/dotnet/framework/wcf/feature-details/collection-types-in-data-contracts#using-collection-interface-types-and-read-only-collections) into serializer-specific default types diff --git a/docs/workflow/building/coreclr/cross-building.md b/docs/workflow/building/coreclr/cross-building.md index 7bbe28abb64..d053569cfbc 100644 --- a/docs/workflow/building/coreclr/cross-building.md +++ b/docs/workflow/building/coreclr/cross-building.md @@ -142,7 +142,7 @@ If you're building the cross-components in powershell, you'll need to wrap `"-DC ## Cross-Building using Docker -When it comes to building, Docker offers the most flexibility when it comes to targeting different Linux platforms and other similar Unix-based ones, like FreeBSD. This is thanks to the multiple existing Docker images already configured for doing such cross-platform building, and Docker's ease of use of running out of the box on Windows machines with [WSL](https://docs.microsoft.com/windows/wsl/about) enabled, installed, and up and running, as well as Linux machines. +When it comes to building, Docker offers the most flexibility when it comes to targeting different Linux platforms and other similar Unix-based ones, like FreeBSD. This is thanks to the multiple existing Docker images already configured for doing such cross-platform building, and Docker's ease of use of running out of the box on Windows machines with [WSL](https://learn.microsoft.com/windows/wsl/about) enabled, installed, and up and running, as well as Linux machines. ### Cross-Compiling for ARM32 and ARM64 with Docker diff --git a/docs/workflow/building/coreclr/linux-instructions.md b/docs/workflow/building/coreclr/linux-instructions.md index 3acec5e95ad..f19bcfbd1e7 100644 --- a/docs/workflow/building/coreclr/linux-instructions.md +++ b/docs/workflow/building/coreclr/linux-instructions.md @@ -19,7 +19,7 @@ As mentioned in the [Linux requirements doc](/docs/workflow/requirements/linux-r Building using Docker will require that you choose the correct image for your environment. -Note that the OS is strictly speaking not important. For example if you are on Ubuntu 20.04 and build using the Ubuntu 18.04 x64 image there should be no issues. You can even use Linux images on a Windows OS if you have [WSL](https://docs.microsoft.com/windows/wsl/about) enabled. However, note that you can't run multiple OS's on the same _Docker Daemon_, as it takes resources from the underlying kernel as needed. In other words, you can run either Linux on WSL, or Windows containers. You have to switch between them if you need both, and restart Docker. +Note that the OS is strictly speaking not important. For example if you are on Ubuntu 20.04 and build using the Ubuntu 18.04 x64 image there should be no issues. You can even use Linux images on a Windows OS if you have [WSL](https://learn.microsoft.com/windows/wsl/about) enabled. However, note that you can't run multiple OS's on the same _Docker Daemon_, as it takes resources from the underlying kernel as needed. In other words, you can run either Linux on WSL, or Windows containers. You have to switch between them if you need both, and restart Docker. The target architecture is more important, as building arm32 using the x64 image will not work. There will be missing _rootfs_ components required by the build. See [Docker Images](#docker-images) below, for more information on choosing an image to build with. diff --git a/docs/workflow/ci/coreclr-ci-health.md b/docs/workflow/ci/coreclr-ci-health.md index 79be9ac1bfe..b26bfcab8db 100644 --- a/docs/workflow/ci/coreclr-ci-health.md +++ b/docs/workflow/ci/coreclr-ci-health.md @@ -13,7 +13,7 @@ Note that this document focuses on coreclr testing in `dotnet/runtime`. #### Terminology -In order to follow some of the terminology used, there is an expected familiarity of Azure DevOps required. For an in depth guide with Azure DevOps pipeline definitions, please see: https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema. +In order to follow some of the terminology used, there is an expected familiarity of Azure DevOps required. For an in depth guide with Azure DevOps pipeline definitions, please see: https://learn.microsoft.com/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema. The most common terminology and most important are the different containers work happens in. diff --git a/docs/workflow/debugging/coreclr/debugging-runtime.md b/docs/workflow/debugging/coreclr/debugging-runtime.md index 6edce3c7646..490ce82a416 100644 --- a/docs/workflow/debugging/coreclr/debugging-runtime.md +++ b/docs/workflow/debugging/coreclr/debugging-runtime.md @@ -113,7 +113,7 @@ Visual Studio Code instructions coming soon! Under normal circumstances, SOS usually comes shipped with Windbg, so no additional installation is required. However, if this is not the case for you, you want to use another version, or any other circumstance that requires you to install it separately/additionally, here are two links with useful information on how to get it set up: -* The official [Microsoft docs on SOS](https://docs.microsoft.com/dotnet/core/diagnostics/dotnet-sos). +* The official [Microsoft docs on SOS](https://learn.microsoft.com/dotnet/core/diagnostics/dotnet-sos). * The instructions at the [diagnostics repo](https://github.com/dotnet/diagnostics/blob/master/documentation/installing-sos-windows-instructions.md). For more information on SOS commands click [here](https://github.com/dotnet/diagnostics/blob/master/documentation/sos-debugging-extension-windows.md). @@ -140,7 +140,7 @@ If for some reason `System.Private.CoreLib.dll` is missing, you can rebuild it w For Linux and macOS, you have to install SOS by yourself, as opposed to Windows' Windbg. The instructions are very similar however, and you can find them on these two links: -* The official [Microsoft docs on SOS](https://docs.microsoft.com/dotnet/core/diagnostics/dotnet-sos). +* The official [Microsoft docs on SOS](https://learn.microsoft.com/dotnet/core/diagnostics/dotnet-sos). * The instructions at the [diagnostics repo](https://github.com/dotnet/diagnostics/blob/master/documentation/installing-sos-instructions.md). It might also be the case that you would need the latest changes in SOS, or you're working with a not-officially-supported scenario that actually works. The most common occurrence of this scenario is when using macOS Arm64. In this case, you have to build SOS from the diagnostics repo (linked above). Once you have it done, then simply load it to your `lldb`. More details in the following section. @@ -232,6 +232,6 @@ Starting with Visual Studio 2022 version 17.5, Visual Studio will validate that If the target process is using a .NET Runtime that is either from a daily build, or one that you built on your own computer, this error will show up. **NOTE**: This error should never happen for official builds of the .NET Runtime from Microsoft. So don’t disable the validation if you expect to be using a .NET Runtime supported by Microsoft. There are three ways to configure Visual Studio to disable signature validation: -1. The [`DOTNET_ROOT` environment variable](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-environment-variables#dotnet_root-dotnet_rootx86): if Visual Studio is started from a command prompt where `DOTNET_ROOT` is set, it will ignore unsigned .NET runtime debugger libraries which are under the `DOTNET_ROOT` directory. +1. The [`DOTNET_ROOT` environment variable](https://learn.microsoft.com/dotnet/core/tools/dotnet-environment-variables#dotnet_root-dotnet_rootx86): if Visual Studio is started from a command prompt where `DOTNET_ROOT` is set, it will ignore unsigned .NET runtime debugger libraries which are under the `DOTNET_ROOT` directory. 2. The `VSDebugger_ValidateDotnetDebugLibSignatures` environment variable: If you want to temporarily disable signature validation, run `set VSDebugger_ValidateDotnetDebugLibSignatures=0` in a command prompt, and start Visual Studio (devenv.exe) from this command prompt. 3. Set the `ValidateDotnetDebugLibSignatures` registry key: To disable signature validation on a more permanent basis, you can set the VS registry key to turn it off. To do so, open a Developer Command Prompt, and run `Common7\IDE\VsRegEdit.exe set local HKCU Debugger\EngineSwitches ValidateDotnetDebugLibSignatures dword 0` diff --git a/docs/workflow/debugging/libraries/unix-instructions.md b/docs/workflow/debugging/libraries/unix-instructions.md index 7e6b7700839..5063b1f4147 100644 --- a/docs/workflow/debugging/libraries/unix-instructions.md +++ b/docs/workflow/debugging/libraries/unix-instructions.md @@ -5,7 +5,7 @@ CoreFX can be debugged on unix using both lldb and visual studio code ## Using lldb and SOS -- Install SOS and lldb. See https://github.com/dotnet/diagnostics/blob/main/documentation/sos.md and https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-sos for setup instructions. +- Install SOS and lldb. See https://github.com/dotnet/diagnostics/blob/main/documentation/sos.md and https://learn.microsoft.com/dotnet/core/diagnostics/dotnet-sos for setup instructions. - Run the test using msbuild at least once with `/t:Test`. ## Debugging core dumps with lldb diff --git a/docs/workflow/requirements/windows-requirements.md b/docs/workflow/requirements/windows-requirements.md index 86c1fca3a7f..8c14b7e14b9 100644 --- a/docs/workflow/requirements/windows-requirements.md +++ b/docs/workflow/requirements/windows-requirements.md @@ -20,7 +20,7 @@ Here are the components you will need to install and setup to work with the repo ### Enable Long Paths -The runtime repository requires long paths to be enabled. Follow [the instructions provided here](https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation#enable-long-paths-in-windows-10-version-1607-and-later) to enable that feature. +The runtime repository requires long paths to be enabled. Follow [the instructions provided here](https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation#enable-long-paths-in-windows-10-version-1607-and-later) to enable that feature. If using Git for Windows you might need to also configure long paths there. Using an administrator terminal simply type: @@ -42,7 +42,7 @@ Note that Visual Studio and the development tools described below are required, * To build the tests, you will need some additional components: * **C++/CLI support for v143 build tools (Latest)**. -A `.vsconfig` file is included in the root of the _dotnet/runtime_ repository that includes all components needed to build the _dotnet/runtime_ repository. You can [import `.vsconfig` in your Visual Studio installer](https://docs.microsoft.com/visualstudio/install/import-export-installation-configurations?view=vs-2022#import-a-configuration) to install all necessary components. +A `.vsconfig` file is included in the root of the _dotnet/runtime_ repository that includes all components needed to build the _dotnet/runtime_ repository. You can [import `.vsconfig` in your Visual Studio installer](https://learn.microsoft.com/visualstudio/install/import-export-installation-configurations?view=vs-2022#import-a-configuration) to install all necessary components. ### Build Tools diff --git a/docs/workflow/testing/host/testing.md b/docs/workflow/testing/host/testing.md index a217d1dd0ab..65f2f92b0d8 100644 --- a/docs/workflow/testing/host/testing.md +++ b/docs/workflow/testing/host/testing.md @@ -64,12 +64,12 @@ By default, the above command will also build the tests before running them. To If all tests have not been previously run, make sure the [test context](#test-context) is set up for the test library. -Tests from a specific test project can be run using [`dotnet test`](https://docs.microsoft.com/dotnet/core/tools/dotnet-test) targeting the built test binary. For example: +Tests from a specific test project can be run using [`dotnet test`](https://learn.microsoft.com/dotnet/core/tools/dotnet-test) targeting the built test binary. For example: ``` dotnet test artifacts/bin/HostActivation.Tests/Debug/net6.0/HostActivation.Tests.dll --filter category!=failing ``` -To filter to specific tests within the test library, use the [filter options](https://docs.microsoft.com/dotnet/core/tools/dotnet-test#filter-option-details) available for `dotnet test`. For example: +To filter to specific tests within the test library, use the [filter options](https://learn.microsoft.com/dotnet/core/tools/dotnet-test#filter-option-details) available for `dotnet test`. For example: ``` dotnet test artifacts/bin/HostActivation.Tests/Debug/net6.0/HostActivation.Tests.dll --filter "DependencyResolution&category!=failing" ``` diff --git a/docs/workflow/testing/host/using-apphost.md b/docs/workflow/testing/host/using-apphost.md index 764dc6ad68e..f3a3f5309df 100644 --- a/docs/workflow/testing/host/using-apphost.md +++ b/docs/workflow/testing/host/using-apphost.md @@ -25,6 +25,6 @@ Alternatives to this method include copying the desired apphost to the appropria # Pointing at a local .NET root -For a [framework-dependent application](https://docs.microsoft.com/dotnet/core/deploying/#publish-framework-dependent), you can set the `DOTNET_ROOT` environment variable to point at a local .NET layout. +For a [framework-dependent application](https://learn.microsoft.com/dotnet/core/deploying/#publish-framework-dependent), you can set the `DOTNET_ROOT` environment variable to point at a local .NET layout. The [libraries tests](../libraries/testing.md) construct and use such a layout based on your local runtime, host, and libraries build as part of the `libs.pretest` subset. To use that layout, set `DOTNET_ROOT=/artifacts/bin/testhost/net8.0---` and then run the .NET application. diff --git a/docs/workflow/testing/testing-managed-tools.md b/docs/workflow/testing/testing-managed-tools.md index 6e2fddbdbd7..589e689a180 100644 --- a/docs/workflow/testing/testing-managed-tools.md +++ b/docs/workflow/testing/testing-managed-tools.md @@ -41,5 +41,5 @@ The `dotnet-test` xunit filter mechanisms work to run a single test or a subset ``` The above command runs all tests whose fully-qualified name contains the substring `MyTest`. See -[dotnet test - Run selective unit tests](https://learn.microsoft.com/en-us/dotnet/core/testing/selective-unit-tests?pivots=mstest#syntax) +[dotnet test - Run selective unit tests](https://learn.microsoft.com/dotnet/core/testing/selective-unit-tests?pivots=mstest#syntax) for the full syntax. diff --git a/eng/common/core-templates/job/job.yml b/eng/common/core-templates/job/job.yml index 7df58527978..74872895d51 100644 --- a/eng/common/core-templates/job/job.yml +++ b/eng/common/core-templates/job/job.yml @@ -1,5 +1,5 @@ parameters: -# Job schema parameters - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job +# Job schema parameters - https://learn.microsoft.com/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job cancelTimeoutInMinutes: '' condition: '' container: '' @@ -83,7 +83,7 @@ jobs: - name: EnableRichCodeNavigation value: 'true' # Retry signature validation up to three times, waiting 2 seconds between attempts. - # See https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu3028#retry-untrusted-root-failures + # See https://learn.microsoft.com/nuget/reference/errors-and-warnings/nu3028#retry-untrusted-root-failures - name: NUGET_EXPERIMENTAL_CHAIN_BUILD_RETRY_POLICY value: 3,2000 - ${{ each variable in parameters.variables }}: diff --git a/eng/common/core-templates/job/onelocbuild.yml b/eng/common/core-templates/job/onelocbuild.yml index 00feec8ebbc..84025d0bfe2 100644 --- a/eng/common/core-templates/job/onelocbuild.yml +++ b/eng/common/core-templates/job/onelocbuild.yml @@ -2,7 +2,7 @@ parameters: # Optional: dependencies of the job dependsOn: '' - # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool + # Optional: A defined YAML pool - https://learn.microsoft.com/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool pool: '' CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex diff --git a/eng/common/core-templates/job/publish-build-assets.yml b/eng/common/core-templates/job/publish-build-assets.yml index 8fe9299542c..8b72fc5122b 100644 --- a/eng/common/core-templates/job/publish-build-assets.yml +++ b/eng/common/core-templates/job/publish-build-assets.yml @@ -13,7 +13,7 @@ parameters: # Optional: Include PublishBuildArtifacts task enablePublishBuildArtifacts: false - # Optional: A defined YAML pool - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool + # Optional: A defined YAML pool - https://learn.microsoft.com/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#pool pool: {} # Optional: should run as a public build even in the internal project diff --git a/eng/common/core-templates/jobs/codeql-build.yml b/eng/common/core-templates/jobs/codeql-build.yml index f2144252cc6..0ca1f8019ef 100644 --- a/eng/common/core-templates/jobs/codeql-build.yml +++ b/eng/common/core-templates/jobs/codeql-build.yml @@ -1,7 +1,7 @@ parameters: # See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md continueOnError: false - # Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job + # Required: A collection of jobs to run - https://learn.microsoft.com/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job jobs: [] # Optional: if specified, restore and use this version of Guardian instead of the default. overrideGuardianVersion: '' diff --git a/eng/common/core-templates/jobs/jobs.yml b/eng/common/core-templates/jobs/jobs.yml index ea69be4341c..a7e082b4ff9 100644 --- a/eng/common/core-templates/jobs/jobs.yml +++ b/eng/common/core-templates/jobs/jobs.yml @@ -21,7 +21,7 @@ parameters: # Optional: Include toolset dependencies in the generated graph files includeToolset: false - # Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job + # Required: A collection of jobs to run - https://learn.microsoft.com/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job jobs: [] # Optional: Override automatically derived dependsOn value for "publish build assets" job diff --git a/eng/common/template-guidance.md b/eng/common/template-guidance.md index c114bc28dcb..48954b48b8d 100644 --- a/eng/common/template-guidance.md +++ b/eng/common/template-guidance.md @@ -20,7 +20,7 @@ The `templateIs1ESManaged` is available on most templates and affects which of t ## Multiple outputs -1ES pipeline templates impose a policy where every publish artifact execution results in additional security scans being injected into your pipeline. When using `templates-official/jobs/jobs.yml`, Arcade reduces the number of additional security injections by gathering all publishing outputs into the [Build.ArtifactStagingDirectory](https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services), and utilizing the [outputParentDirectory](https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/outputs#multiple-outputs) feature of 1ES pipeline templates. When implementing your pipeline, if you ensure publish artifacts are located in the `$(Build.ArtifactStagingDirectory)`, and utilize the 1ES provided template context, then you can reduce the number of security scans for your pipeline. +1ES pipeline templates impose a policy where every publish artifact execution results in additional security scans being injected into your pipeline. When using `templates-official/jobs/jobs.yml`, Arcade reduces the number of additional security injections by gathering all publishing outputs into the [Build.ArtifactStagingDirectory](https://learn.microsoft.com/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services), and utilizing the [outputParentDirectory](https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/outputs#multiple-outputs) feature of 1ES pipeline templates. When implementing your pipeline, if you ensure publish artifacts are located in the `$(Build.ArtifactStagingDirectory)`, and utilize the 1ES provided template context, then you can reduce the number of security scans for your pipeline. Example: ``` yaml diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 0febe696dbd..204cb54af05 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -520,7 +520,7 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) { # Two part minimal VS version, e.g. "15.9", "16.0", etc. # "components": ["componentId1", "componentId2", ...] # Array of ids of workload components that must be available in the VS instance. -# See e.g. https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-enterprise?view=vs-2017 +# See e.g. https://learn.microsoft.com/visualstudio/install/workload-component-id-vs-enterprise?view=vs-2017 # # Returns JSON describing the located VS instance (same format as returned by vswhere), # or $null if no instance meeting the requirements is found on the machine. diff --git a/eng/pipelines/common/templates/runtimes/build-test-job.yml b/eng/pipelines/common/templates/runtimes/build-test-job.yml index c86e4e04f11..bbc9f854801 100644 --- a/eng/pipelines/common/templates/runtimes/build-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/build-test-job.yml @@ -44,7 +44,7 @@ jobs: displayName: '${{ parameters.runtimeFlavor }} Common Pri1 Test Build AnyOS AnyCPU ${{ parameters.buildConfig }}' # Since the condition is being altered, merge the default with the additional conditions. - # See https://docs.microsoft.com/azure/devops/pipelines/process/conditions + # See https://learn.microsoft.com/azure/devops/pipelines/process/conditions condition: and(succeeded(), ${{ parameters.condition }}) ${{ if ne(parameters.dependsOn[0], '') }}: diff --git a/eng/testing/debug-dump-template.md b/eng/testing/debug-dump-template.md index c8759600430..daf765c0c29 100644 --- a/eng/testing/debug-dump-template.md +++ b/eng/testing/debug-dump-template.md @@ -41,7 +41,7 @@ You can read the rest of the document for information purposes (there is useful # Install SOS debugging extension -Now use the [dotnet-sos global tool](https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-sos) to install the SOS debugging extension. +Now use the [dotnet-sos global tool](https://learn.microsoft.com/dotnet/core/diagnostics/dotnet-sos) to install the SOS debugging extension. ```cmd dotnet tool install --global dotnet-sos dotnet tool update --global dotnet-sos @@ -61,7 +61,7 @@ dotnet sos install --architecture x64 ## ... and you want to debug with WinDbg -Install or update WinDbg if necessary ([external](https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/debugger-download-tools), [internal](https://osgwiki.com/wiki/Installing_WinDbg)). If you don't have a recent WinDbg you may have to do `.update sos`. +Install or update WinDbg if necessary ([external](https://learn.microsoft.com/windows-hardware/drivers/debugger/debugger-download-tools), [internal](https://osgwiki.com/wiki/Installing_WinDbg)). If you don't have a recent WinDbg you may have to do `.update sos`. Open WinDbg and open the dump with `File>Open Dump`. ``` @@ -81,7 +81,7 @@ Currently this is not possible because mscordbi.dll is not signed. ## ... and you want to debug with dotnet-dump -Install the [dotnet-dump global tool](https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-dump). +Install the [dotnet-dump global tool](https://learn.microsoft.com/dotnet/core/diagnostics/dotnet-dump). ```cmd dotnet tool install --global dotnet-dump dotnet tool update --global dotnet-dump @@ -129,7 +129,7 @@ loadsymbols ## ... and you want to debug with dotnet-dump -Install the [dotnet-dump global tool](https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-dump). +Install the [dotnet-dump global tool](https://learn.microsoft.com/dotnet/core/diagnostics/dotnet-dump). ```sh dotnet tool install --global dotnet-dump dotnet tool update --global dotnet-dump diff --git a/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelper.cs b/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelper.cs index ef0e80bde52..dbeb35b013f 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelper.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ComEventsHelper.cs @@ -16,7 +16,7 @@ // event sinks are COM objects implementing source interfaces. Once an event sink is passed to the COM // server (through a mechanism known as 'binding/advising to connection point'), COM server will be // calling source interface methods to "fire events". -// See https://docs.microsoft.com/cpp/mfc/connection-points +// See https://learn.microsoft.com/cpp/mfc/connection-points // // There are few interesting obervations about source interfaces. Usually source interfaces are defined // as 'dispinterface' - meaning that only late-bound invocations on this interface are allowed. Even diff --git a/src/coreclr/binder/assemblyname.cpp b/src/coreclr/binder/assemblyname.cpp index 0c96f6be47e..245c72c8d6a 100644 --- a/src/coreclr/binder/assemblyname.cpp +++ b/src/coreclr/binder/assemblyname.cpp @@ -25,7 +25,7 @@ namespace { - // See https://docs.microsoft.com/dotnet/framework/reflection-and-codedom/specifying-fully-qualified-type-names#specifying-assembly-names + // See https://learn.microsoft.com/dotnet/framework/reflection-and-codedom/specifying-fully-qualified-type-names#specifying-assembly-names const WCHAR* s_neutralCulture = W("neutral"); } diff --git a/src/coreclr/interop/comwrappers.hpp b/src/coreclr/interop/comwrappers.hpp index ac120d2abb7..47bf008ac50 100644 --- a/src/coreclr/interop/comwrappers.hpp +++ b/src/coreclr/interop/comwrappers.hpp @@ -231,7 +231,7 @@ public: }; // Class used to hold COM objects (i.e. IUnknown base class) -// This class mimics the semantics of ATL::CComPtr (https://docs.microsoft.com/cpp/atl/reference/ccomptr-class). +// This class mimics the semantics of ATL::CComPtr (https://learn.microsoft.com/cpp/atl/reference/ccomptr-class). template struct ComHolder { diff --git a/src/coreclr/interop/inc/interoplib.h b/src/coreclr/interop/inc/interoplib.h index 37237f5f7ca..684283b7133 100644 --- a/src/coreclr/interop/inc/interoplib.h +++ b/src/coreclr/interop/inc/interoplib.h @@ -52,7 +52,7 @@ namespace InteropLib // The returned context memory is guaranteed to be initialized to zero. void* Context; - // See https://docs.microsoft.com/windows/win32/api/windows.ui.xaml.hosting.referencetracker/ + // See https://learn.microsoft.com/windows/win32/api/windows.ui.xaml.hosting.referencetracker/ // for details. bool FromTrackerRuntime; diff --git a/src/coreclr/interop/referencetrackertypes.hpp b/src/coreclr/interop/referencetrackertypes.hpp index 239503e544d..ff4d8b84ac2 100644 --- a/src/coreclr/interop/referencetrackertypes.hpp +++ b/src/coreclr/interop/referencetrackertypes.hpp @@ -6,7 +6,7 @@ #include -// Documentation found at https://docs.microsoft.com/windows/win32/api/windows.ui.xaml.hosting.referencetracker/ +// Documentation found at https://learn.microsoft.com/windows/win32/api/windows.ui.xaml.hosting.referencetracker/ // 64bd43f8-bfee-4ec4-b7eb-2935158dae21 const GUID IID_IReferenceTrackerTarget = { 0x64bd43f8, 0xbfee, 0x4ec4, { 0xb7, 0xeb, 0x29, 0x35, 0x15, 0x8d, 0xae, 0x21 } }; diff --git a/src/coreclr/jit/clrjit.natvis b/src/coreclr/jit/clrjit.natvis index cfbc6a181e9..485d0c5df5f 100644 --- a/src/coreclr/jit/clrjit.natvis +++ b/src/coreclr/jit/clrjit.natvis @@ -8,8 +8,8 @@ The .NET Foundation licenses this file to you under the MIT license. diff --git a/src/coreclr/jit/codegenxarch.cpp b/src/coreclr/jit/codegenxarch.cpp index 64c2b84e87b..757491b9503 100644 --- a/src/coreclr/jit/codegenxarch.cpp +++ b/src/coreclr/jit/codegenxarch.cpp @@ -9912,7 +9912,7 @@ void CodeGen::genFnEpilog(BasicBlock* block) // if we reported the frame pointer in the prolog. The Windows x64 unwinding ABI specifically // disallows this `lea` form: // - // See https://docs.microsoft.com/en-us/cpp/build/prolog-and-epilog?view=msvc-160#epilog-code + // See https://learn.microsoft.com/cpp/build/prolog-and-epilog?view=msvc-160#epilog-code // // "When a frame pointer is not used, the epilog must use add RSP,constant to deallocate the fixed part of the // stack. It may not use lea RSP,constant[RSP] instead. This restriction exists so the unwind code has fewer diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/InteropServices/UnmanagedCallersOnlyAttribute.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/InteropServices/UnmanagedCallersOnlyAttribute.cs index 790d2f0fe21..375d3de0994 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/InteropServices/UnmanagedCallersOnlyAttribute.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/InteropServices/UnmanagedCallersOnlyAttribute.cs @@ -5,14 +5,14 @@ namespace System.Runtime.InteropServices { /// /// Any method marked with can be directly called from - /// native code. The function token can be loaded to a local variable using the address-of operator + /// native code. The function token can be loaded to a local variable using the address-of operator /// in C# and passed as a callback to a native method. /// /// /// Methods marked with this attribute have the following restrictions: /// * Method must be marked "static". /// * Must not be called from managed code. - /// * Must only have blittable arguments. + /// * Must only have blittable arguments. /// [AttributeUsage(AttributeTargets.Method, Inherited = false)] public sealed class UnmanagedCallersOnlyAttribute : Attribute diff --git a/src/coreclr/nativeaot/Runtime/windows/CoffNativeCodeManager.cpp b/src/coreclr/nativeaot/Runtime/windows/CoffNativeCodeManager.cpp index b0eb24759bb..0bd9fbb34f9 100644 --- a/src/coreclr/nativeaot/Runtime/windows/CoffNativeCodeManager.cpp +++ b/src/coreclr/nativeaot/Runtime/windows/CoffNativeCodeManager.cpp @@ -152,7 +152,7 @@ static PTR_VOID GetUnwindDataBlob(TADDR moduleBase, PTR_RUNTIME_FUNCTION pRuntim PTR_uint32_t xdata = dac_cast(pRuntimeFunction->UnwindData + moduleBase); int size = 4; - // See https://docs.microsoft.com/en-us/cpp/build/arm64-exception-handling + // See https://learn.microsoft.com/cpp/build/arm64-exception-handling int unwindWords = xdata[0] >> 27; int epilogScopes = (xdata[0] >> 22) & 0x1f; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/CompatibilitySuppressions.xml b/src/coreclr/nativeaot/System.Private.CoreLib/src/CompatibilitySuppressions.xml index 69d5d5a83a4..0e5e5abf785 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/CompatibilitySuppressions.xml +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0001 diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.NativeAot.cs index e06ac745704..374ad0d8cd0 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.NativeAot.cs @@ -131,13 +131,13 @@ namespace System.Runtime.InteropServices /// /// This is useful in scenarios when the caller has no need to rely on an IUnknown instance /// that is used when running managed code is not possible (i.e. during a GC). In traditional - /// COM scenarios this is common, but scenarios involving Reference Tracker hosting + /// COM scenarios this is common, but scenarios involving Reference Tracker hosting /// calling of the IUnknown API during a GC is possible. /// CallerDefinedIUnknown = 1, /// - /// Flag used to indicate the COM interface should implement IReferenceTrackerTarget. + /// Flag used to indicate the COM interface should implement IReferenceTrackerTarget. /// When this flag is passed, the resulting COM interface will have an internal implementation of IUnknown /// and as such none should be supplied by the caller. /// diff --git a/src/coreclr/nativeaot/docs/compiling.md b/src/coreclr/nativeaot/docs/compiling.md index 757b00bb0b4..dcbe314646b 100644 --- a/src/coreclr/nativeaot/docs/compiling.md +++ b/src/coreclr/nativeaot/docs/compiling.md @@ -1,6 +1,6 @@ # Compiling with Native AOT -Please consult [documentation](https://docs.microsoft.com/dotnet/core/deploying/native-aot) for instructions how to compile and publish application. +Please consult [documentation](https://learn.microsoft.com/dotnet/core/deploying/native-aot) for instructions how to compile and publish application. The rest of this document covers advanced topics only. diff --git a/src/coreclr/scripts/jitrollingbuild.py b/src/coreclr/scripts/jitrollingbuild.py index 07d48c17712..93f1f02c28c 100644 --- a/src/coreclr/scripts/jitrollingbuild.py +++ b/src/coreclr/scripts/jitrollingbuild.py @@ -462,7 +462,7 @@ def upload_command(coreclr_args): except: logging.warning("Please install:") logging.warning(" pip install azure-storage-blob") - logging.warning("See also https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-python") + logging.warning("See also https://learn.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-python") raise RuntimeError("Missing azure storage package.") blob_service_client = BlobServiceClient(account_url=az_blob_storage_account_uri, credential=coreclr_args.az_storage_key) diff --git a/src/coreclr/scripts/jitutil.py b/src/coreclr/scripts/jitutil.py index 7fad27c07a3..78cb26e01c7 100644 --- a/src/coreclr/scripts/jitutil.py +++ b/src/coreclr/scripts/jitutil.py @@ -571,7 +571,7 @@ def require_azure_storage_libraries(need_azure_storage_blob=True, need_azure_ide logging.error(" pip install azure-storage-blob azure-identity") logging.error("or (Windows):") logging.error(" py -3 -m pip install azure-storage-blob azure-identity") - logging.error("See also https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-python") + logging.error("See also https://learn.microsoft.com/azure/storage/blobs/storage-quickstart-blobs-python") raise RuntimeError("Missing Azure Storage package.") # The Azure packages spam all kinds of output to the logging channels. @@ -585,7 +585,7 @@ def report_azure_error(): """ Report an Azure error """ logging.error("A problem occurred accessing Azure. Are you properly authenticated using the Azure CLI?") - logging.error("Install the Azure CLI from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli.") + logging.error("Install the Azure CLI from https://learn.microsoft.com/cli/azure/install-azure-cli.") logging.error("Then log in to Azure using `az login`.") diff --git a/src/coreclr/scripts/superpmi_diffs_setup.py b/src/coreclr/scripts/superpmi_diffs_setup.py index c54de696ccd..dd233a4191d 100644 --- a/src/coreclr/scripts/superpmi_diffs_setup.py +++ b/src/coreclr/scripts/superpmi_diffs_setup.py @@ -168,7 +168,7 @@ def build_jit_analyze(coreclr_args, source_directory, jit_analyze_build_director # Build jit-analyze only, and build it as a self-contained app (not framework-dependent). # What target RID are we building? It depends on where we're going to run this code. - # The RID catalog is here: https://docs.microsoft.com/en-us/dotnet/core/rid-catalog. + # The RID catalog is here: https://learn.microsoft.com/dotnet/core/rid-catalog. # Windows x64 => win-x64 # Windows x86 => win-x86 # Windows arm64 => win-arm64 diff --git a/src/coreclr/tools/SOS/SOS_README.md b/src/coreclr/tools/SOS/SOS_README.md index d20ab2d44f8..f034cd09313 100644 --- a/src/coreclr/tools/SOS/SOS_README.md +++ b/src/coreclr/tools/SOS/SOS_README.md @@ -2,4 +2,4 @@ SOS and other diagnostic tools now ship out of band and work with any version of SOS has moved to the diagnostics repo here: https://github.com/dotnet/diagnostics.git. -Instructions to install SOS: https://docs.microsoft.com/dotnet/core/diagnostics/dotnet-sos +Instructions to install SOS: https://learn.microsoft.com/dotnet/core/diagnostics/dotnet-sos diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/DynamicDependencyAttributesOnEntityNode.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/DynamicDependencyAttributesOnEntityNode.cs index 31b54535294..7eb0cb49815 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/DynamicDependencyAttributesOnEntityNode.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/DynamicDependencyAttributesOnEntityNode.cs @@ -22,7 +22,7 @@ namespace ILCompiler.DependencyAnalysis { /// /// Computes the list of dependencies from DynamicDependencyAttribute. - /// https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.codeanalysis.dynamicdependencyattribute + /// https://learn.microsoft.com/dotnet/api/system.diagnostics.codeanalysis.dynamicdependencyattribute /// public class DynamicDependencyAttributesOnEntityNode : DependencyNodeCore { diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ObjectWriter/CoffObjectWriter.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ObjectWriter/CoffObjectWriter.cs index f319eebfe6c..8bbdccb9278 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ObjectWriter/CoffObjectWriter.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ObjectWriter/CoffObjectWriter.cs @@ -26,7 +26,7 @@ namespace ILCompiler.ObjectWriter /// /// /// The PE/COFF object format is described in the official specifciation at - /// https://learn.microsoft.com/en-us/windows/win32/debug/pe-format. However, + /// https://learn.microsoft.com/windows/win32/debug/pe-format. However, /// numerous extensions are missing in the specification. The most notable /// ones are listed below. /// diff --git a/src/coreclr/utilcode/util.cpp b/src/coreclr/utilcode/util.cpp index 88317684fe8..d9d90ddfd19 100644 --- a/src/coreclr/utilcode/util.cpp +++ b/src/coreclr/utilcode/util.cpp @@ -2385,7 +2385,7 @@ namespace Util { #ifdef HOST_WINDOWS // Struct used to scope suspension of client impersonation for the current thread. - // https://docs.microsoft.com/en-us/windows/desktop/secauthz/client-impersonation + // https://learn.microsoft.com/windows/desktop/secauthz/client-impersonation class SuspendImpersonation { public: diff --git a/src/coreclr/vm/amsi.cpp b/src/coreclr/vm/amsi.cpp index 4e2a36c130d..698aa229e8e 100644 --- a/src/coreclr/vm/amsi.cpp +++ b/src/coreclr/vm/amsi.cpp @@ -9,7 +9,7 @@ namespace { - // https://docs.microsoft.com/en-us/windows/desktop/api/amsi/ + // https://learn.microsoft.com/windows/desktop/api/amsi/ DECLARE_HANDLE(HAMSICONTEXT); DECLARE_HANDLE(HAMSISESSION); diff --git a/src/coreclr/vm/codeman.cpp b/src/coreclr/vm/codeman.cpp index 0885ec6d3b8..ea682d05325 100644 --- a/src/coreclr/vm/codeman.cpp +++ b/src/coreclr/vm/codeman.cpp @@ -1011,11 +1011,11 @@ PTR_VOID GetUnwindDataBlob(TADDR moduleBase, PTR_RUNTIME_FUNCTION pRuntimeFuncti int size = 4; #if defined(TARGET_ARM) - // See https://docs.microsoft.com/en-us/cpp/build/arm-exception-handling + // See https://learn.microsoft.com/cpp/build/arm-exception-handling int unwindWords = xdata[0] >> 28; int epilogScopes = (xdata[0] >> 23) & 0x1f; #else - // See https://docs.microsoft.com/en-us/cpp/build/arm64-exception-handling + // See https://learn.microsoft.com/cpp/build/arm64-exception-handling int unwindWords = xdata[0] >> 27; int epilogScopes = (xdata[0] >> 22) & 0x1f; #endif diff --git a/src/coreclr/vm/interoputil.cpp b/src/coreclr/vm/interoputil.cpp index e5e10b0feca..2f6293c894a 100644 --- a/src/coreclr/vm/interoputil.cpp +++ b/src/coreclr/vm/interoputil.cpp @@ -2509,7 +2509,7 @@ HRESULT GetTypeLibVersionForAssembly( // Check to see if the TypeLibVersionAttribute is set. IfFailRet(pAssembly->GetMDImport()->GetCustomAttributeByName(TokenFromRid(1, mdtAssembly), INTEROP_TYPELIBVERSION_TYPE, (const void**)&pbData, &cbData)); - // For attribute contents, see https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.typelibversionattribute + // For attribute contents, see https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.typelibversionattribute if (cbData >= (2 + 2 * sizeof(UINT32))) { CustomAttributeParser cap(pbData, cbData); diff --git a/src/coreclr/vm/nativelibrary.cpp b/src/coreclr/vm/nativelibrary.cpp index 7acdce8b37d..953ce5b6fc9 100644 --- a/src/coreclr/vm/nativelibrary.cpp +++ b/src/coreclr/vm/nativelibrary.cpp @@ -597,7 +597,7 @@ namespace int varCount = 0; - // Follow LoadLibrary rules in MSDN doc: https://docs.microsoft.com/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibrarya + // Follow LoadLibrary rules in MSDN doc: https://learn.microsoft.com/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibrarya // To prevent the function from appending ".DLL" to the module name, include a trailing point character (.) in the module name string // or provide an absolute path. libNameVariations[varCount++] = NameFmt; diff --git a/src/installer/tests/HostActivation.Tests/RegisteredInstallLocationOverride.cs b/src/installer/tests/HostActivation.Tests/RegisteredInstallLocationOverride.cs index 66c0a2c9763..4cd7a495e94 100644 --- a/src/installer/tests/HostActivation.Tests/RegisteredInstallLocationOverride.cs +++ b/src/installer/tests/HostActivation.Tests/RegisteredInstallLocationOverride.cs @@ -36,7 +36,7 @@ namespace Microsoft.DotNet.CoreSetup.Test.HostActivation // product must look into the 32-bit hive. // Without the redirection we would not be able to test that the product always looks // into 32-bit only. - // Per this page https://docs.microsoft.com/en-us/windows/desktop/WinProg64/shared-registry-keys + // Per this page https://learn.microsoft.com/windows/desktop/WinProg64/shared-registry-keys // a user writable redirected key is for example HKCU\Software\Classes\Interface // so we're going to use that one - it's not super clean as the key stores COM interfaces, // but we should not corrupt anything by adding a special subkey even if it's left behind. diff --git a/src/installer/tests/TestUtils/ArgumentEscaper.cs b/src/installer/tests/TestUtils/ArgumentEscaper.cs index f805ec8a696..1c8dc3d25eb 100644 --- a/src/installer/tests/TestUtils/ArgumentEscaper.cs +++ b/src/installer/tests/TestUtils/ArgumentEscaper.cs @@ -14,7 +14,7 @@ namespace Microsoft.DotNet.Cli.Build.Framework /// so that the next process will receive the same string[] args /// /// See here for more info: - /// https://docs.microsoft.com/en-us/archive/blogs/twistylittlepassagesallalike/everyone-quotes-command-line-arguments-the-wrong-way + /// https://learn.microsoft.com/archive/blogs/twistylittlepassagesallalike/everyone-quotes-command-line-arguments-the-wrong-way /// /// /// @@ -28,7 +28,7 @@ namespace Microsoft.DotNet.Cli.Build.Framework /// so that the next process will receive the same string[] args /// /// See here for more info: - /// https://docs.microsoft.com/en-us/archive/blogs/twistylittlepassagesallalike/everyone-quotes-command-line-arguments-the-wrong-way + /// https://learn.microsoft.com/archive/blogs/twistylittlepassagesallalike/everyone-quotes-command-line-arguments-the-wrong-way /// /// /// @@ -99,7 +99,7 @@ namespace Microsoft.DotNet.Cli.Build.Framework /// be to do this only for cmd metacharacters. /// /// See here for more info: - /// https://docs.microsoft.com/en-us/archive/blogs/twistylittlepassagesallalike/everyone-quotes-command-line-arguments-the-wrong-way + /// https://learn.microsoft.com/archive/blogs/twistylittlepassagesallalike/everyone-quotes-command-line-arguments-the-wrong-way /// /// /// diff --git a/src/libraries/Common/src/Interop/Windows/Interop.Errors.cs b/src/libraries/Common/src/Interop/Windows/Interop.Errors.cs index a21197310f9..237c5c214b0 100644 --- a/src/libraries/Common/src/Interop/Windows/Interop.Errors.cs +++ b/src/libraries/Common/src/Interop/Windows/Interop.Errors.cs @@ -3,7 +3,7 @@ internal static partial class Interop { - // As defined in winerror.h and https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes + // As defined in winerror.h and https://learn.microsoft.com/windows/win32/debug/system-error-codes internal static partial class Errors { internal const int ERROR_SUCCESS = 0x0; diff --git a/src/libraries/Common/src/Interop/Windows/Interop.SECURITY_QUALITY_OF_SERVICE.cs b/src/libraries/Common/src/Interop/Windows/Interop.SECURITY_QUALITY_OF_SERVICE.cs index 3b63485ef98..6a0f0d4795c 100644 --- a/src/libraries/Common/src/Interop/Windows/Interop.SECURITY_QUALITY_OF_SERVICE.cs +++ b/src/libraries/Common/src/Interop/Windows/Interop.SECURITY_QUALITY_OF_SERVICE.cs @@ -4,7 +4,7 @@ internal static partial class Interop { /// - /// SECURITY_QUALITY_OF_SERVICE structure. + /// SECURITY_QUALITY_OF_SERVICE structure. /// Used to support client impersonation. Client specifies this to a server to allow /// it to impersonate the client. /// diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateToolhelp32Snapshot.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateToolhelp32Snapshot.cs index 4a0d3d50686..6dd27a9fb4e 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateToolhelp32Snapshot.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateToolhelp32Snapshot.cs @@ -36,16 +36,16 @@ internal static partial class Interop internal fixed char szExeFile[MAX_PATH]; } - // https://docs.microsoft.com/windows/desktop/api/tlhelp32/nf-tlhelp32-createtoolhelp32snapshot + // https://learn.microsoft.com/windows/desktop/api/tlhelp32/nf-tlhelp32-createtoolhelp32snapshot [LibraryImport(Libraries.Kernel32, SetLastError = true)] internal static partial nint CreateToolhelp32Snapshot(SnapshotFlags dwFlags, uint th32ProcessID); - // https://docs.microsoft.com/windows/desktop/api/tlhelp32/nf-tlhelp32-process32first + // https://learn.microsoft.com/windows/desktop/api/tlhelp32/nf-tlhelp32-process32first [LibraryImport(Libraries.Kernel32, EntryPoint = "Process32FirstW", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] internal static unsafe partial bool Process32First(nint hSnapshot, PROCESSENTRY32* lppe); - // https://docs.microsoft.com/windows/desktop/api/tlhelp32/nf-tlhelp32-process32next + // https://learn.microsoft.com/windows/desktop/api/tlhelp32/nf-tlhelp32-process32next [LibraryImport(Libraries.Kernel32, EntryPoint = "Process32NextW", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] internal static unsafe partial bool Process32Next(nint hSnapshot, PROCESSENTRY32* lppe); diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeviceIoControl.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeviceIoControl.cs index aae40b9bb7f..05e16899ba2 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeviceIoControl.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeviceIoControl.cs @@ -9,10 +9,10 @@ internal static partial class Interop { internal static partial class Kernel32 { - // https://docs.microsoft.com/windows/win32/api/winioctl/ni-winioctl-fsctl_get_reparse_point + // https://learn.microsoft.com/windows/win32/api/winioctl/ni-winioctl-fsctl_get_reparse_point internal const int FSCTL_GET_REPARSE_POINT = 0x000900a8; - // https://docs.microsoft.com/windows-hardware/drivers/ddi/ntddstor/ni-ntddstor-ioctl_storage_read_capacity + // https://learn.microsoft.com/windows-hardware/drivers/ddi/ntddstor/ni-ntddstor-ioctl_storage_read_capacity internal const int IOCTL_STORAGE_READ_CAPACITY = 0x002D5140; [LibraryImport(Libraries.Kernel32, EntryPoint = "DeviceIoControl", SetLastError = true)] diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FILE_ALLOCATION_INFO.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FILE_ALLOCATION_INFO.cs index 0233626ee73..a47c89dc8a5 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FILE_ALLOCATION_INFO.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FILE_ALLOCATION_INFO.cs @@ -5,7 +5,7 @@ internal static partial class Interop { internal static partial class Kernel32 { - // Value taken from https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-setfileinformationbyhandle#remarks: + // Value taken from https://learn.microsoft.com/windows/win32/api/fileapi/nf-fileapi-setfileinformationbyhandle#remarks: internal const int FileAllocationInfo = 5; internal struct FILE_ALLOCATION_INFO diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFinalPathNameByHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFinalPathNameByHandle.cs index cdc0fcc3e53..4b4ac6c806f 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFinalPathNameByHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFinalPathNameByHandle.cs @@ -12,7 +12,7 @@ internal static partial class Interop { internal const uint FILE_NAME_NORMALIZED = 0x0; - // https://docs.microsoft.com/windows/desktop/api/fileapi/nf-fileapi-getfinalpathnamebyhandlew (kernel32) + // https://learn.microsoft.com/windows/desktop/api/fileapi/nf-fileapi-getfinalpathnamebyhandlew (kernel32) [LibraryImport(Libraries.Kernel32, EntryPoint = "GetFinalPathNameByHandleW", SetLastError = true)] internal static unsafe partial uint GetFinalPathNameByHandle( SafeFileHandle hFile, diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IoControlCodeAccess.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IoControlCodeAccess.cs index be477375c81..a565e1b55c0 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IoControlCodeAccess.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IoControlCodeAccess.cs @@ -9,7 +9,7 @@ internal static partial class Interop internal static partial class Kernel32 { /// - /// RequiredAccess. + /// RequiredAccess. /// Indicates the type of access that a caller must request when opening the file object that represents the device (see IRP_MJ_CREATE). /// [Flags] diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.REPARSE_DATA_BUFFER.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.REPARSE_DATA_BUFFER.cs index 123ac9235b9..dbfc7c33d7e 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.REPARSE_DATA_BUFFER.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.REPARSE_DATA_BUFFER.cs @@ -8,7 +8,7 @@ internal static partial class Interop { internal static partial class Kernel32 { - // https://docs.microsoft.com/windows-hardware/drivers/ifs/fsctl-get-reparse-point + // https://learn.microsoft.com/windows-hardware/drivers/ifs/fsctl-get-reparse-point internal const int MAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16 * 1024; internal const uint SYMLINK_FLAG_RELATIVE = 1; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.STORAGE_READ_CAPACITY.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.STORAGE_READ_CAPACITY.cs index 49d3af39f9b..cb6913fa9d1 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.STORAGE_READ_CAPACITY.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.STORAGE_READ_CAPACITY.cs @@ -8,7 +8,7 @@ internal static partial class Interop { internal static partial class Kernel32 { - // https://docs.microsoft.com/en-us/windows/win32/devio/storage-read-capacity + // https://learn.microsoft.com/windows/win32/devio/storage-read-capacity [StructLayout(LayoutKind.Sequential)] internal unsafe struct STORAGE_READ_CAPACITY { diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.FILE_FULL_EA_INFORMATION.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.FILE_FULL_EA_INFORMATION.cs index 24f807538bf..29bfaeed5f7 100644 --- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.FILE_FULL_EA_INFORMATION.cs +++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.FILE_FULL_EA_INFORMATION.cs @@ -9,7 +9,7 @@ internal static partial class Interop internal static partial class NtDll { /// - /// FILE_FULL_EA_INFORMATION structure. + /// FILE_FULL_EA_INFORMATION structure. /// Provides extended attribute (EA) information. This structure is used primarily by network drivers. /// [StructLayoutAttribute(LayoutKind.Sequential)] diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtStatus.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtStatus.cs index ad48e8e74d5..e2a62a36cdf 100644 --- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtStatus.cs +++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtStatus.cs @@ -6,7 +6,7 @@ internal static partial class Interop internal static class StatusOptions { // See the NT_SUCCESS macro in the Windows SDK, and - // https://learn.microsoft.com/en-us/windows-hardware/drivers/kernel/using-ntstatus-values + // https://learn.microsoft.com/windows-hardware/drivers/kernel/using-ntstatus-values internal static bool NT_SUCCESS(uint ntStatus) => (int)ntStatus >= 0; // Error codes from ntstatus.h diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.IStream.COMWrappers.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.IStream.COMWrappers.cs index e922be50899..181d4a9ca02 100644 --- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.IStream.COMWrappers.cs +++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.IStream.COMWrappers.cs @@ -9,7 +9,7 @@ internal static partial class Interop internal static partial class Ole32 { /// - /// IStream interface. + /// IStream interface. /// /// /// This interface explicitly doesn't use the built-in COM support, but instead is only used with ComWrappers. diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.IStream.NoCOMWrappers.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.IStream.NoCOMWrappers.cs index 0dee8c4ae31..a14f144e689 100644 --- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.IStream.NoCOMWrappers.cs +++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.IStream.NoCOMWrappers.cs @@ -9,7 +9,7 @@ internal static partial class Interop internal static partial class Ole32 { /// - /// COM IStream interface. + /// COM IStream interface. /// /// /// The definition in does not lend diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STATFLAG.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STATFLAG.cs index 38cd9844524..169ff3cb009 100644 --- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STATFLAG.cs +++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STATFLAG.cs @@ -7,7 +7,7 @@ internal static partial class Interop { /// /// Stat flags for . - /// + /// /// internal enum STATFLAG : uint { diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STATSTG.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STATSTG.cs index 6e1cf2c7e86..7cccfcf75ce 100644 --- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STATSTG.cs +++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STATSTG.cs @@ -11,7 +11,7 @@ internal static partial class Interop { /// /// Statistics for . - /// + /// /// /// /// The definition in isn't blittable. @@ -41,7 +41,7 @@ internal static partial class Interop /// /// Supported locking modes. - /// + /// /// /// /// '0' means does not support lock modes. diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STGM.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STGM.cs index a946ed209d4..815fa63bfca 100644 --- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STGM.cs +++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STGM.cs @@ -9,7 +9,7 @@ internal static partial class Interop { /// /// Stream / storage modes. - /// + /// /// [Flags] internal enum STGM : uint diff --git a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STGTY.cs b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STGTY.cs index 17be0418785..75da59f11fb 100644 --- a/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STGTY.cs +++ b/src/libraries/Common/src/Interop/Windows/Ole32/Interop.STGTY.cs @@ -7,7 +7,7 @@ internal static partial class Interop { /// /// Type of the storage element. Used with . - /// + /// /// internal enum STGTY : uint { diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs index ed40ac83a8a..fb276985709 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs @@ -509,7 +509,7 @@ namespace System.Net.Security if (inSecBuffers.Count > 1 && inUnmanagedBuffer[1].BufferType == SecurityBufferType.SECBUFFER_EXTRA && inSecBuffers._item1.Type == SecurityBufferType.SECBUFFER_EMPTY) { // OS function did not use all provided data and turned EMPTY to EXTRA - // https://docs.microsoft.com/en-us/windows/win32/secauthn/extra-buffers-returned-by-schannel + // https://learn.microsoft.com/windows/win32/secauthn/extra-buffers-returned-by-schannel int leftover = inUnmanagedBuffer[1].cbBuffer; int processed = inSecBuffers._item0.Token.Length - inUnmanagedBuffer[1].cbBuffer; @@ -810,7 +810,7 @@ namespace System.Net.Security if (inSecBuffers.Count > 1 && inUnmanagedBuffer[1].BufferType == SecurityBufferType.SECBUFFER_EXTRA && inSecBuffers._item1.Type == SecurityBufferType.SECBUFFER_EMPTY) { // OS function did not use all provided data and turned EMPTY to EXTRA - // https://docs.microsoft.com/en-us/windows/win32/secauthn/extra-buffers-returned-by-schannel + // https://learn.microsoft.com/windows/win32/secauthn/extra-buffers-returned-by-schannel int leftover = inUnmanagedBuffer[1].cbBuffer; int processed = inSecBuffers._item0.Token.Length - inUnmanagedBuffer[1].cbBuffer; diff --git a/src/libraries/Common/src/System/Data/Common/AdapterUtil.cs b/src/libraries/Common/src/System/Data/Common/AdapterUtil.cs index 3675641903c..956e6ca855e 100644 --- a/src/libraries/Common/src/System/Data/Common/AdapterUtil.cs +++ b/src/libraries/Common/src/System/Data/Common/AdapterUtil.cs @@ -17,7 +17,7 @@ namespace System.Data.Common { internal static partial class ADP { - // NOTE: Initializing a Task in SQL CLR requires the "UNSAFE" permission set (https://docs.microsoft.com/en-us/dotnet/framework/performance/sql-server-programming-and-host-protection-attributes) + // NOTE: Initializing a Task in SQL CLR requires the "UNSAFE" permission set (https://learn.microsoft.com/dotnet/framework/performance/sql-server-programming-and-host-protection-attributes) // Therefore we are lazily initializing these Tasks to avoid forcing customers to use the "UNSAFE" set when they are actually using no Async features private static Task? _trueTask; internal static Task TrueTask => _trueTask ??= Task.FromResult(true); diff --git a/src/libraries/Common/src/System/Net/Http/WinInetProxyHelper.cs b/src/libraries/Common/src/System/Net/Http/WinInetProxyHelper.cs index c30e77bfa1b..d4f4ef7795f 100644 --- a/src/libraries/Common/src/System/Net/Http/WinInetProxyHelper.cs +++ b/src/libraries/Common/src/System/Net/Http/WinInetProxyHelper.cs @@ -104,7 +104,7 @@ namespace System.Net.Http autoProxyOptions.Reserved2 = 0; // AutoProxy Cache. - // https://docs.microsoft.com/en-us/windows/desktop/WinHttp/autoproxy-cache + // https://learn.microsoft.com/windows/desktop/WinHttp/autoproxy-cache // If the out-of-process service is active when WinHttpGetProxyForUrl is called, the cached autoproxy // URL and script are available to the whole computer. However, if the out-of-process service is used, // and the fAutoLogonIfChallenged flag in the pAutoProxyOptions structure is true, then the autoproxy diff --git a/src/libraries/Common/src/System/Security/Cryptography/DSACng.SignVerify.cs b/src/libraries/Common/src/System/Security/Cryptography/DSACng.SignVerify.cs index c076e8c9a68..6b3c8eabfd4 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/DSACng.SignVerify.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/DSACng.SignVerify.cs @@ -14,7 +14,7 @@ namespace System.Security.Cryptography // As of FIPS 186-4 the maximum Q size is 32 bytes. // // See also: cbGroupSize at - // https://docs.microsoft.com/en-us/windows/desktop/api/bcrypt/ns-bcrypt-_bcrypt_dsa_key_blob_v2 + // https://learn.microsoft.com/windows/desktop/api/bcrypt/ns-bcrypt-_bcrypt_dsa_key_blob_v2 private const int WindowsMaxQSize = 32; public override byte[] CreateSignature(byte[] rgbHash) diff --git a/src/libraries/Common/tests/System/IO/TempDirectory.cs b/src/libraries/Common/tests/System/IO/TempDirectory.cs index 280315471f6..e15f00a199a 100644 --- a/src/libraries/Common/tests/System/IO/TempDirectory.cs +++ b/src/libraries/Common/tests/System/IO/TempDirectory.cs @@ -47,7 +47,7 @@ namespace System.IO /// /// Generates a string with 255 random valid filename characters. /// 255 is the max file/folder name length in NTFS and FAT32: - // https://docs.microsoft.com/en-us/windows/win32/fileio/filesystem-functionality-comparison?redirectedfrom=MSDN#limits + // https://learn.microsoft.com/windows/win32/fileio/filesystem-functionality-comparison?redirectedfrom=MSDN#limits /// /// A 255 length string with random valid filename characters. public static string GetMaxLengthRandomName() diff --git a/src/libraries/Common/tests/System/Net/Security/FakeNtlmServer.cs b/src/libraries/Common/tests/System/Net/Security/FakeNtlmServer.cs index 1117b3412f3..6f576d927b2 100644 --- a/src/libraries/Common/tests/System/Net/Security/FakeNtlmServer.cs +++ b/src/libraries/Common/tests/System/Net/Security/FakeNtlmServer.cs @@ -13,7 +13,7 @@ using Xunit; namespace System.Net.Security { // Implementation of subset of the NTLM specification - // https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/b38c36ed-2804-4868-a9ff-8dd3182128e4 + // https://learn.microsoft.com/openspecs/windows_protocols/ms-nlmp/b38c36ed-2804-4868-a9ff-8dd3182128e4 // // Server-side implementation of the NTLMv2 exchange is implemented with // basic verification of the messages passed by the client against a diff --git a/src/libraries/Common/tests/TestUtilities/System/WindowsIdentityFixture.cs b/src/libraries/Common/tests/TestUtilities/System/WindowsIdentityFixture.cs index 2817d305e6d..386829b2bf4 100644 --- a/src/libraries/Common/tests/TestUtilities/System/WindowsIdentityFixture.cs +++ b/src/libraries/Common/tests/TestUtilities/System/WindowsIdentityFixture.cs @@ -74,7 +74,7 @@ namespace System // Create user and remove/create if already exists uint result = NetUserAdd(null, 1, ref userInfo, out uint param_err); - // error codes https://docs.microsoft.com/en-us/windows/desktop/netmgmt/network-management-error-codes + // error codes https://learn.microsoft.com/windows/desktop/netmgmt/network-management-error-codes // 0 == NERR_Success if (result == 2224) // NERR_UserExists { diff --git a/src/libraries/Microsoft.Extensions.Caching.Abstractions/README.md b/src/libraries/Microsoft.Extensions.Caching.Abstractions/README.md index a89ce2c8c54..83bd01f557e 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Abstractions/README.md +++ b/src/libraries/Microsoft.Extensions.Caching.Abstractions/README.md @@ -2,7 +2,7 @@ Caching is combined with a core caching abstraction under `Microsoft.Extensions.Caching.Abstractions` that allows for implementing general purpose memory and distributed caches, with integration for Redis and SqlServer. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/caching. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/caching. ## Contribution Bar - [x] [We consider new features, new APIs, bug fixes, and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/Microsoft.Extensions.Caching.Memory/README.md b/src/libraries/Microsoft.Extensions.Caching.Memory/README.md index e2a88e23c71..90817800a9d 100644 --- a/src/libraries/Microsoft.Extensions.Caching.Memory/README.md +++ b/src/libraries/Microsoft.Extensions.Caching.Memory/README.md @@ -2,7 +2,7 @@ In-memory caching provides a general purpose memory implementation of the core caching abstractions provided under `Microsoft.Extensions.Caching.Abstractions` and it is great for apps that run in a single server, where all cached data rents memory in the app's process. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/caching. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/caching. ## Example diff --git a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs index 060d1f55d72..c0434440df0 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs +++ b/src/libraries/Microsoft.Extensions.Configuration.Binder/src/ConfigurationBinder.cs @@ -543,7 +543,7 @@ namespace Microsoft.Extensions.Configuration { if (p.IsOut || p.IsIn || p.ParameterType.IsByRef) { - nameOfInvalidParameter = p.Name!; // never null as we're not passed return value parameters: https://docs.microsoft.com/en-us/dotnet/api/system.reflection.parameterinfo.name?view=net-6.0#remarks + nameOfInvalidParameter = p.Name!; // never null as we're not passed return value parameters: https://learn.microsoft.com/dotnet/api/system.reflection.parameterinfo.name?view=net-6.0#remarks return false; } } diff --git a/src/libraries/Microsoft.Extensions.Configuration.Json/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Configuration.Json/src/PACKAGE.md index 825b3dbe412..705f7cbed7d 100644 --- a/src/libraries/Microsoft.Extensions.Configuration.Json/src/PACKAGE.md +++ b/src/libraries/Microsoft.Extensions.Configuration.Json/src/PACKAGE.md @@ -2,7 +2,7 @@ -JSON configuration provider implementation for [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration/). This package enables you to read your application's settings from a JSON file. You can use [JsonConfigurationExtensions.AddJsonFile](https://docs.microsoft.com/dotnet/api/microsoft.extensions.configuration.jsonconfigurationextensions.addjsonfile) extension method on `IConfigurationBuilder` to add the JSON configuration provider to the configuration builder. +JSON configuration provider implementation for [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration/). This package enables you to read your application's settings from a JSON file. You can use [JsonConfigurationExtensions.AddJsonFile](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.jsonconfigurationextensions.addjsonfile) extension method on `IConfigurationBuilder` to add the JSON configuration provider to the configuration builder. ## How to Use diff --git a/src/libraries/Microsoft.Extensions.Configuration/README.md b/src/libraries/Microsoft.Extensions.Configuration/README.md index 73c432729cf..984eb1b85cd 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/README.md +++ b/src/libraries/Microsoft.Extensions.Configuration/README.md @@ -2,7 +2,7 @@ `Microsoft.Extensions.Configuration` is combined with a core configuration abstraction under `Microsoft.Extensions.Configuration.Abstractions` that allows for building different kinds of configuration providers to retrieve key/value pair configuration values from in the form of `IConfiguration`. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/configuration. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/configuration. ## Contribution Bar - [x] [We consider new features, new APIs, bug fixes, and performance changes](../README.md#contribution-bar) diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/README.md b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/README.md index 3d2f82f682b..2828a64dc48 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/README.md +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/README.md @@ -2,7 +2,7 @@ `Microsoft.Extensions.DependencyInjection.Abstractions` contains a core DI abstraction that allows for building different kinds of dependency injection containers to retrieve services from that have been registered with different lifetimes. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/dependency-injection. ## Contribution Bar - [x] [We consider new features, new APIs, bug fixes, and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/README.md b/src/libraries/Microsoft.Extensions.DependencyInjection/README.md index 38bd0d27f12..d8439736491 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/README.md +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/README.md @@ -2,7 +2,7 @@ `Microsoft.Extensions.DependencyInjection` is combined with a core DI abstraction under `Microsoft.Extensions.DependencyInjection.Abstractions` that allows for building different kinds of dependency injection containers to retrieve services from that have been registered with different lifetimes. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/dependency-injection. ## Contribution Bar - [x] [We consider new features, new APIs, bug fixes, and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.DependencyModel/src/PACKAGE.md index 19b13040a8a..050207e31f2 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/PACKAGE.md +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/PACKAGE.md @@ -4,7 +4,7 @@ Provides abstractions for reading `.deps` files. When a .NET application is compiled, the SDK generates a JSON manifest file (`.deps.json`) that contains information about application dependencies. You can use `Microsoft.Extensions.DependencyModel` to read information from this manifest at run time. This is useful when you want to dynamically compile code (for example, using Roslyn Emit API) referencing the same dependencies as your main application. -By default, the dependency manifest contains information about the application's target framework and runtime dependencies. Set the [PreserveCompilationContext](https://docs.microsoft.com/dotnet/core/project-sdk/msbuild-props#preservecompilationcontext) project property to `true` to additionally include information about reference assemblies used during compilation. +By default, the dependency manifest contains information about the application's target framework and runtime dependencies. Set the [PreserveCompilationContext](https://learn.microsoft.com/dotnet/core/project-sdk/msbuild-props#preservecompilationcontext) project property to `true` to additionally include information about reference assemblies used during compilation. ## How to Use @@ -39,8 +39,8 @@ class Program * [.deps.json file format](https://github.com/dotnet/sdk/blob/main/documentation/specs/runtime-configuration-file.md#appnamedepsjson) -* [Microsoft.Extensions.DependencyModel namespace](https://docs.microsoft.com/dotnet/api/microsoft.extensions.dependencymodel) -* [Microsoft.Extensions.DependencyModel.DependencyContext](https://docs.microsoft.com/dotnet/api/microsoft.extensions.dependencymodel.dependencycontext) +* [Microsoft.Extensions.DependencyModel namespace](https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencymodel) +* [Microsoft.Extensions.DependencyModel.DependencyContext](https://learn.microsoft.com/dotnet/api/microsoft.extensions.dependencymodel.dependencycontext) ## Feedback & Contributing diff --git a/src/libraries/Microsoft.Extensions.Diagnostics.Abstractions/README.md b/src/libraries/Microsoft.Extensions.Diagnostics.Abstractions/README.md index 200587369cc..5c4689bb7dc 100644 --- a/src/libraries/Microsoft.Extensions.Diagnostics.Abstractions/README.md +++ b/src/libraries/Microsoft.Extensions.Diagnostics.Abstractions/README.md @@ -10,7 +10,7 @@ Commonly Used Types: - `Microsoft.Extensions.Diagnostics.Metrics.MetricsBuilderExtensions` - `Microsoft.Extensions.Diagnostics.Metrics.MetricsOptions` -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/diagnostics. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/diagnostics. ## Contribution Bar - [x] [We consider new features, new APIs, bug fixes, and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/README.md b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/README.md index 923206b1c4f..742d88c094e 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/README.md +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/README.md @@ -6,7 +6,7 @@ Hosting provides as a primitive the concept of a hosted service, which is how ap Hosting provides good integration for long-running console applications, windows services, ASP.NET Core. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/generic-host. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/generic-host. ## Contribution Bar - [x] [We consider new features, new APIs, bug fixes, and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/BackgroundService.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/BackgroundService.cs index d752c024cbe..49e5e64a968 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/BackgroundService.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/BackgroundService.cs @@ -29,7 +29,7 @@ namespace Microsoft.Extensions.Hosting /// /// Triggered when is called. /// A that represents the long running operations. - /// See Worker Services in .NET for implementation guidelines. + /// See Worker Services in .NET for implementation guidelines. protected abstract Task ExecuteAsync(CancellationToken stoppingToken); /// diff --git a/src/libraries/Microsoft.Extensions.Hosting.Systemd/README.md b/src/libraries/Microsoft.Extensions.Hosting.Systemd/README.md index 0d9d5b59cce..ba20c1a17e6 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Systemd/README.md +++ b/src/libraries/Microsoft.Extensions.Hosting.Systemd/README.md @@ -2,7 +2,7 @@ `Microsoft.Extensions.Hosting.Systemd` contains implementation for using hosting in Systemd Services. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/generic-host. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/generic-host. ## Contribution Bar - [x] [We consider new features, new APIs, bug fixes, and performance changes](https://github.com/dotnet/runtime/tree/main/src/libraries#contribution-bar) diff --git a/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/README.md b/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/README.md index fad810de55a..4ec180825f9 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/README.md +++ b/src/libraries/Microsoft.Extensions.Hosting.WindowsServices/README.md @@ -2,7 +2,7 @@ `Microsoft.Extensions.Hosting.WindowsServices` contains implementation for using hosting in Windows Services. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.hosting. +Documentation can be found at https://learn.microsoft.com/dotnet/api/microsoft.extensions.hosting. ## Contribution Bar - [x] [We consider new features, new APIs, bug fixes, and performance changes](https://github.com/dotnet/runtime/tree/main/src/libraries#contribution-bar) diff --git a/src/libraries/Microsoft.Extensions.Hosting/README.md b/src/libraries/Microsoft.Extensions.Hosting/README.md index 9aa05bc8b2a..277f5a3bb77 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/README.md +++ b/src/libraries/Microsoft.Extensions.Hosting/README.md @@ -6,7 +6,7 @@ Hosting provides as a primitive the concept of a hosted service, which is how ap Hosting provides good integration for long-running console applications, windows services, ASP.NET Core. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/generic-host. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/generic-host. ## Contribution Bar - [x] [We consider new features, new APIs, bug fixes, and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/Microsoft.Extensions.Hosting/docs/HostShutdown.md b/src/libraries/Microsoft.Extensions.Hosting/docs/HostShutdown.md index 870e5d0b534..947f602e29e 100644 --- a/src/libraries/Microsoft.Extensions.Hosting/docs/HostShutdown.md +++ b/src/libraries/Microsoft.Extensions.Hosting/docs/HostShutdown.md @@ -47,7 +47,7 @@ has logic to handle scenario (5) above. Apps that call `Environment.Exit`, and n If your application uses Hosting, and you want to gracefully stop the host, you can call [`IHostApplicationLifetime.StopApplication()`][StopApplication] instead of `Environment.Exit`. -[StopApplication]: https://docs.microsoft.com/dotnet/api/microsoft.extensions.hosting.ihostapplicationlifetime.stopapplication +[StopApplication]: https://learn.microsoft.com/dotnet/api/microsoft.extensions.hosting.ihostapplicationlifetime.stopapplication ### Hosting Shutdown Process diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/README.md b/src/libraries/Microsoft.Extensions.Logging.Abstractions/README.md index e0b0a1710d4..cc89e7b525c 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/README.md +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/README.md @@ -11,7 +11,7 @@ Commonly Used Types: - `Microsoft.Extensions.Logging.LoggerMessage` - `Microsoft.Extensions.Logging.Abstractions.NullLogger` -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/logging. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/logging. ## Contribution Bar - [x] [We consider new features, new APIs, bug fixes, and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/Microsoft.Extensions.Logging.Configuration/README.md b/src/libraries/Microsoft.Extensions.Logging.Configuration/README.md index f22c46c7d4f..3767fb4c798 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Configuration/README.md +++ b/src/libraries/Microsoft.Extensions.Logging.Configuration/README.md @@ -2,7 +2,7 @@ `Microsoft.Extensions.Logging.Configuration` provides configuration support for Microsoft.Extensions.Logging. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/logging. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/logging. ## Contribution Bar - [x] [We consider new features, new APIs, bug fixes, and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/README.md b/src/libraries/Microsoft.Extensions.Logging.Console/README.md index dda428b5af4..ca8c1b83226 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Console/README.md +++ b/src/libraries/Microsoft.Extensions.Logging.Console/README.md @@ -2,11 +2,11 @@ `Microsoft.Extensions.Logging.Console` provides a Console logger provider implementation for Microsoft.Extensions.Logging. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/logging. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/logging. -To learn about our .NET 5 feature on how to control the format of console logs check out [this documentation](https://learn.microsoft.com/en-us/dotnet/core/extensions/console-log-formatter). +To learn about our .NET 5 feature on how to control the format of console logs check out [this documentation](https://learn.microsoft.com/dotnet/core/extensions/console-log-formatter). -To learn about our .NET 6 feature on how to use a source generator to create log messages check out [this documentation](https://learn.microsoft.com/en-us/dotnet/core/extensions/logger-message-generator). +To learn about our .NET 6 feature on how to use a source generator to create log messages check out [this documentation](https://learn.microsoft.com/dotnet/core/extensions/logger-message-generator). ## Contribution Bar - [x] [We consider new features, new APIs, bug fixes, and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/Microsoft.Extensions.Logging.Debug/README.md b/src/libraries/Microsoft.Extensions.Logging.Debug/README.md index d92d06e2e99..5ca2f862f6f 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Debug/README.md +++ b/src/libraries/Microsoft.Extensions.Logging.Debug/README.md @@ -2,7 +2,7 @@ `Microsoft.Extensions.Logging.Debug` provides a Debug output logger provider implementation for Microsoft.Extensions.Logging. This logger logs messages to a debugger monitor by writing messages with `System.Diagnostics.Debug.WriteLine()`. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/logging. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/logging. ## Contribution Bar - [x] [We consider new features, new APIs, bug fixes, and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/Microsoft.Extensions.Logging.Debug/src/PACKAGE.md b/src/libraries/Microsoft.Extensions.Logging.Debug/src/PACKAGE.md index 97b378f4350..b9908263d4b 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Debug/src/PACKAGE.md +++ b/src/libraries/Microsoft.Extensions.Logging.Debug/src/PACKAGE.md @@ -8,7 +8,7 @@ * Allow logging to the debugger output. -* Provide extensions method for the [ILoggingBuilder](https://docs.microsoft.com/dotnet/api/microsoft.extensions.logging.iloggingbuilder) class to easily enable this Debug logger. +* Provide extensions method for the [ILoggingBuilder](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.iloggingbuilder) class to easily enable this Debug logger. ## How to Use diff --git a/src/libraries/Microsoft.Extensions.Logging.EventLog/README.md b/src/libraries/Microsoft.Extensions.Logging.EventLog/README.md index fd0c336e147..9ec3bd8eaee 100644 --- a/src/libraries/Microsoft.Extensions.Logging.EventLog/README.md +++ b/src/libraries/Microsoft.Extensions.Logging.EventLog/README.md @@ -2,7 +2,7 @@ `Microsoft.Extensions.Logging.EventLog` provides a Windows Event Log logger provider implementation for Microsoft.Extensions.Logging. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/logging. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/logging. ## Contribution Bar - [x] [We consider new features, new APIs, bug fixes, and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/Microsoft.Extensions.Logging.EventSource/README.md b/src/libraries/Microsoft.Extensions.Logging.EventSource/README.md index 7d806bfc5d2..8727a91e15f 100644 --- a/src/libraries/Microsoft.Extensions.Logging.EventSource/README.md +++ b/src/libraries/Microsoft.Extensions.Logging.EventSource/README.md @@ -2,7 +2,7 @@ `Microsoft.Extensions.Logging.EventSource` provides a basic implementation for the built-in event source logger provider. Using `Microsoft.Extensions.Logging.EventSource.LoggingEventSource` which is the bridge from all ILogger-based logging to EventSource/EventListener logging, logging can be enabled by enabling the event source called "Microsoft-Extensions-Logging". -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/logging. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/logging. ## Contribution Bar - [x] [We consider new features, new APIs, bug fixes, and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/Microsoft.Extensions.Logging.TraceSource/README.md b/src/libraries/Microsoft.Extensions.Logging.TraceSource/README.md index a4edcaef042..e1bca63c3a6 100644 --- a/src/libraries/Microsoft.Extensions.Logging.TraceSource/README.md +++ b/src/libraries/Microsoft.Extensions.Logging.TraceSource/README.md @@ -2,7 +2,7 @@ `Microsoft.Extensions.Logging.TraceSource` provides a basic implementation for the built-in TraceSource logger provider. This logger logs messages to a trace listener by writing messages with `System.Diagnostics.TraceSource.TraceEvent()`. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/logging. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/logging. ## Example diff --git a/src/libraries/Microsoft.Extensions.Logging/README.md b/src/libraries/Microsoft.Extensions.Logging/README.md index fc3ba6e48fd..0d333e06c06 100644 --- a/src/libraries/Microsoft.Extensions.Logging/README.md +++ b/src/libraries/Microsoft.Extensions.Logging/README.md @@ -2,7 +2,7 @@ `Microsoft.Extensions.Logging` is combined with a core logging abstraction under `Microsoft.Extensions.Logging.Abstractions`. This abstraction is available in our basic built-in implementations like console, event log, and debug (Debug.WriteLine). Also note, there is no dedicated built-in solution for file-based logging. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/logging. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/logging. ## Examples @@ -60,7 +60,7 @@ public class LoggingSample2 } ``` -To reach a balance between performance and usability we added the compile-time logging source generator feature in .NET 6, to learn more about it and learn how to use a source generator to create log messages check out [this documentation](https://learn.microsoft.com/en-us/dotnet/core/extensions/logger-message-generator). +To reach a balance between performance and usability we added the compile-time logging source generator feature in .NET 6, to learn more about it and learn how to use a source generator to create log messages check out [this documentation](https://learn.microsoft.com/dotnet/core/extensions/logger-message-generator). ### Baggage and Tags for `ActivityTrackingOptions` diff --git a/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/README.md b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/README.md index 91266396fd2..9f093b4aaf5 100644 --- a/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/README.md +++ b/src/libraries/Microsoft.Extensions.Options.ConfigurationExtensions/README.md @@ -2,7 +2,7 @@ `Microsoft.Extensions.Options.ConfigurationExtensions` provides additional configuration-specific functionality related to Options. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/options. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/options. ## Contribution Bar - [x] [We consider new features, new APIs, bug fixes, and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/Microsoft.Extensions.Options.DataAnnotations/README.md b/src/libraries/Microsoft.Extensions.Options.DataAnnotations/README.md index 2e5b390bc9e..87cb759b958 100644 --- a/src/libraries/Microsoft.Extensions.Options.DataAnnotations/README.md +++ b/src/libraries/Microsoft.Extensions.Options.DataAnnotations/README.md @@ -2,7 +2,7 @@ `Microsoft.Extensions.Options.DataAnnotations` provides additional DataAnnotations specific functionality related to Options.. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/options. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/options. ## Example diff --git a/src/libraries/Microsoft.Extensions.Options/README.md b/src/libraries/Microsoft.Extensions.Options/README.md index 58f4ffa7d70..d15cf5eef60 100644 --- a/src/libraries/Microsoft.Extensions.Options/README.md +++ b/src/libraries/Microsoft.Extensions.Options/README.md @@ -2,7 +2,7 @@ `Microsoft.Extensions.Options` provides a strongly typed way of specifying and accessing settings using dependency injection and acts as a bridge between configuration, DI, and higher level libraries. This library is the glue for how an app developer uses DI to configure the behavior of a library like HttpClient Factory. This also enables user to get a strongly-typed view of their configuration. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/core/extensions/options. +Documentation can be found at https://learn.microsoft.com/dotnet/core/extensions/options. ## Contribution Bar - [x] [We consider new features, new APIs, bug fixes, and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/Microsoft.Extensions.Options/src/CompatibilitySuppressions.xml b/src/libraries/Microsoft.Extensions.Options/src/CompatibilitySuppressions.xml index 0c096372f5d..1142c9e21c4 100644 --- a/src/libraries/Microsoft.Extensions.Options/src/CompatibilitySuppressions.xml +++ b/src/libraries/Microsoft.Extensions.Options/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@ - + CP0015 diff --git a/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Extensions/EmptyReadonlyDictionary.cs b/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Extensions/EmptyReadonlyDictionary.cs index 99ef9076112..f8b4f74593b 100644 --- a/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Extensions/EmptyReadonlyDictionary.cs +++ b/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Extensions/EmptyReadonlyDictionary.cs @@ -38,7 +38,7 @@ internal sealed class EmptyReadOnlyDictionary : IReadOnlyDictionar public bool TryGetValue(TKey key, out TValue value) { -#pragma warning disable CS8601 // The recommended implementation: https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2.trygetvalue +#pragma warning disable CS8601 // The recommended implementation: https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2.trygetvalue value = default; #pragma warning restore diff --git a/src/libraries/Microsoft.NET.WebAssembly.Threading/src/CompatibilitySuppressions.xml b/src/libraries/Microsoft.NET.WebAssembly.Threading/src/CompatibilitySuppressions.xml index cbecb005c81..8af156c8764 100644 --- a/src/libraries/Microsoft.NET.WebAssembly.Threading/src/CompatibilitySuppressions.xml +++ b/src/libraries/Microsoft.NET.WebAssembly.Threading/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + PKV006 diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/CompatibilitySuppressions.xml b/src/libraries/Microsoft.VisualBasic.Core/src/CompatibilitySuppressions.xml index b4a619b5cce..721870b5487 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/CompatibilitySuppressions.xml +++ b/src/libraries/Microsoft.VisualBasic.Core/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0014 diff --git a/src/libraries/Microsoft.Win32.Registry/src/System/Security/AccessControl/RegistryRights.cs b/src/libraries/Microsoft.Win32.Registry/src/System/Security/AccessControl/RegistryRights.cs index faea51e71fd..33a7bdc198a 100644 --- a/src/libraries/Microsoft.Win32.Registry/src/System/Security/AccessControl/RegistryRights.cs +++ b/src/libraries/Microsoft.Win32.Registry/src/System/Security/AccessControl/RegistryRights.cs @@ -5,7 +5,7 @@ namespace System.Security.AccessControl { // We derived this enum from the definitions of KEY_READ and such from // winnt.h and from MSDN, plus some experimental validation with regedit. - // https://docs.microsoft.com/en-us/windows/desktop/SysInfo/registry-key-security-and-access-rights + // https://learn.microsoft.com/windows/desktop/SysInfo/registry-key-security-and-access-rights [Flags] public enum RegistryRights { diff --git a/src/libraries/Microsoft.Win32.SystemEvents/src/CompatibilitySuppressions.xml b/src/libraries/Microsoft.Win32.SystemEvents/src/CompatibilitySuppressions.xml index 639d29998aa..038640c9457 100644 --- a/src/libraries/Microsoft.Win32.SystemEvents/src/CompatibilitySuppressions.xml +++ b/src/libraries/Microsoft.Win32.SystemEvents/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0015 diff --git a/src/libraries/README.md b/src/libraries/README.md index e56a1f12721..2688718a027 100644 --- a/src/libraries/README.md +++ b/src/libraries/README.md @@ -35,6 +35,6 @@ Some libraries are under more active development than others. Depending on the l ## Deployment -Some libraries are included in the .NET SDK as part of the runtime's [shared framework](https://learn.microsoft.com/en-us/dotnet/standard/glossary#shared-framework). Other libraries are deployed as out-of-band (OOB) NuGet packages and need to be installed separately. +Some libraries are included in the .NET SDK as part of the runtime's [shared framework](https://learn.microsoft.com/dotnet/standard/glossary#shared-framework). Other libraries are deployed as out-of-band (OOB) NuGet packages and need to be installed separately. -For more information, see the [Runtime libraries overview](https://learn.microsoft.com/en-us/dotnet/standard/runtime-libraries-overview). +For more information, see the [Runtime libraries overview](https://learn.microsoft.com/dotnet/standard/runtime-libraries-overview). diff --git a/src/libraries/System.CodeDom/src/CompatibilitySuppressions.xml b/src/libraries/System.CodeDom/src/CompatibilitySuppressions.xml index 03f406bb355..71d7d472073 100644 --- a/src/libraries/System.CodeDom/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.CodeDom/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0015 diff --git a/src/libraries/System.Collections.Concurrent/README.md b/src/libraries/System.Collections.Concurrent/README.md index 7faf36d5552..4d63322f3d7 100644 --- a/src/libraries/System.Collections.Concurrent/README.md +++ b/src/libraries/System.Collections.Concurrent/README.md @@ -1,7 +1,7 @@ # System.Collections.Concurrent This is the assembly that surfaces concurrent collections such as [`ConcurrentDictionary`](https://learn.microsoft.com/dotnet/api/system.collections.concurrent.concurrentdictionary-2) and [`ConcurrentBag`](https://learn.microsoft.com/dotnet/api/system.collections.concurrent.concurrentbag-1). It provides thread-safe collections that should be used whenever multiple threads are accessing the collection concurrently. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/api/system.collections.concurrent. +Documentation can be found at https://learn.microsoft.com/dotnet/api/system.collections.concurrent. ## Contribution Bar - [x] [We consider new features, new APIs and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/System.Collections.Immutable/README.md b/src/libraries/System.Collections.Immutable/README.md index 8d002fc6bb9..a08107edf0a 100644 --- a/src/libraries/System.Collections.Immutable/README.md +++ b/src/libraries/System.Collections.Immutable/README.md @@ -1,7 +1,7 @@ # System.Collections.Immutable This is the assembly that surfaces immutable collections such as [`ImmutableArray`](https://learn.microsoft.com/dotnet/api/system.collections.immutable.immutablearray-1) and [`ImmutableDictionary`](https://learn.microsoft.com/dotnet/api/system.collections.immutable.immutabledictionary-2). -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/api/system.collections.immutable. +Documentation can be found at https://learn.microsoft.com/dotnet/api/system.collections.immutable. ## Contribution Bar - [x] [We consider new features, new APIs and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/System.Collections.Immutable/src/PACKAGE.md b/src/libraries/System.Collections.Immutable/src/PACKAGE.md index 0ca0b161aa4..78c81a59089 100644 --- a/src/libraries/System.Collections.Immutable/src/PACKAGE.md +++ b/src/libraries/System.Collections.Immutable/src/PACKAGE.md @@ -62,8 +62,8 @@ The main types provided by this library are: -- [Collections and Data Structures](https://docs.microsoft.com/dotnet/standard/collections/) -- [API documentation](https://docs.microsoft.com/dotnet/api/system.collections.immutable) +- [Collections and Data Structures](https://learn.microsoft.com/dotnet/standard/collections/) +- [API documentation](https://learn.microsoft.com/dotnet/api/system.collections.immutable) ## Feedback & Contributing diff --git a/src/libraries/System.Collections.NonGeneric/README.md b/src/libraries/System.Collections.NonGeneric/README.md index e7486f5491a..4d1bd77dfb9 100644 --- a/src/libraries/System.Collections.NonGeneric/README.md +++ b/src/libraries/System.Collections.NonGeneric/README.md @@ -1,9 +1,9 @@ # System.Collections.NonGeneric -This is the assembly that generally surfaces most non-generic collections such as [`Stack`](https://learn.microsoft.com/en-us/dotnet/api/system.collections.stack) and [`Queue`](https://learn.microsoft.com/en-us/dotnet/api/system.collections.queue). +This is the assembly that generally surfaces most non-generic collections such as [`Stack`](https://learn.microsoft.com/dotnet/api/system.collections.stack) and [`Queue`](https://learn.microsoft.com/dotnet/api/system.collections.queue). -Non-generic collections that are used by lower-level parts of the framework, such as [`IList`](https://learn.microsoft.com/en-us/dotnet/api/system.collections.ilist) and [`Hashtable`](https://learn.microsoft.com/en-us/dotnet/api/system.collections.hashtable) are surfaced by the `System.Runtime` assembly. The implementations for these collections live in [System.Private.Corelib](../System.Private.Corelib/src/System/Collections/). +Non-generic collections that are used by lower-level parts of the framework, such as [`IList`](https://learn.microsoft.com/dotnet/api/system.collections.ilist) and [`Hashtable`](https://learn.microsoft.com/dotnet/api/system.collections.hashtable) are surfaced by the `System.Runtime` assembly. The implementations for these collections live in [System.Private.Corelib](../System.Private.Corelib/src/System/Collections/). -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/collections. +Documentation can be found at https://learn.microsoft.com/dotnet/csharp/programming-guide/concepts/collections. ## Contribution Bar - [x] [We only consider fixes to maintain or improve quality](../../libraries/README.md#primary-bar) diff --git a/src/libraries/System.Collections.Specialized/README.md b/src/libraries/System.Collections.Specialized/README.md index bb7944c83da..19c6304bf1a 100644 --- a/src/libraries/System.Collections.Specialized/README.md +++ b/src/libraries/System.Collections.Specialized/README.md @@ -1,7 +1,7 @@ # System.Collections.Specialized This is the assembly that surfaces specialized collections; for example, [`LinkedDictionary`](https://learn.microsoft.com/dotnet/api/system.collections.specialized.listdictionary), [`BitVector`](https://learn.microsoft.com/dotnet/api/system.collections.specialized.bitvector), and [`StringCollection`](https://learn.microsoft.com/dotnet/api/system.collections.specialized.stringcollection). -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/api/system.collections.specialized. +Documentation can be found at https://learn.microsoft.com/dotnet/api/system.collections.specialized. ## Contribution Bar - [x] [We only consider lower-risk or high-impact fixes to maintain or improve quality](../../libraries/README.md#primary-bar) diff --git a/src/libraries/System.Collections/README.md b/src/libraries/System.Collections/README.md index 6ec616de5d6..5fcd64a0e72 100644 --- a/src/libraries/System.Collections/README.md +++ b/src/libraries/System.Collections/README.md @@ -3,7 +3,7 @@ This is the assembly that generally surfaces generic collections such as [`List< Generic collection interfaces that are used by lower-level parts of the framework, such as [`IList`](https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1) and [`IAsyncEnumerable`](https://learn.microsoft.com/dotnet/api/system.collections.generic.iasyncenumerable-1) are surfaced by the `System.Runtime` assembly. The implementations for these collections live in [System.Private.Corelib](../System.Private.Corelib/src/System/Collections/Generic). -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/collections. +Documentation can be found at https://learn.microsoft.com/dotnet/csharp/programming-guide/concepts/collections. ## Contribution Bar - [x] [We consider new features, new APIs and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/System.Collections/src/CompatibilitySuppressions.xml b/src/libraries/System.Collections/src/CompatibilitySuppressions.xml index f281317339d..52276bd955e 100644 --- a/src/libraries/System.Collections/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Collections/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0001 diff --git a/src/libraries/System.Collections/src/System/Collections/BitArray.cs b/src/libraries/System.Collections/src/System/Collections/BitArray.cs index 0f54b8a714c..7de69a92cb4 100644 --- a/src/libraries/System.Collections/src/System/Collections/BitArray.cs +++ b/src/libraries/System.Collections/src/System/Collections/BitArray.cs @@ -623,7 +623,7 @@ namespace System.Collections // In that case, we are shifting a uint by 32, which could be considered undefined. // The result of a shift operation is undefined ... if the right operand // is greater than or equal to the width in bits of the promoted left operand, - // https://docs.microsoft.com/en-us/cpp/c-language/bitwise-shift-operators?view=vs-2017 + // https://learn.microsoft.com/cpp/c-language/bitwise-shift-operators?view=vs-2017 // However, the compiler protects us from undefined behaviour by constraining the // right operand to between 0 and width - 1 (inclusive), i.e. right_operand = (right_operand % width). uint mask = uint.MaxValue >> (BitsPerInt32 - extraBits); diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/CompatibilitySuppressions.xml b/src/libraries/System.Configuration.ConfigurationManager/src/CompatibilitySuppressions.xml index 95f9902596c..a0910bc9ea9 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Configuration.ConfigurationManager/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0002 diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/PACKAGE.md b/src/libraries/System.Configuration.ConfigurationManager/src/PACKAGE.md index 992b7669426..01688235389 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/PACKAGE.md +++ b/src/libraries/System.Configuration.ConfigurationManager/src/PACKAGE.md @@ -74,10 +74,10 @@ The main types provided by this library are: -* [Configure apps by using configuration files](https://docs.microsoft.com/dotnet/framework/configure-apps/) -* [System.Configuration namespace](https://docs.microsoft.com/dotnet/api/system.configuration) -* [System.Configuration.Configuration](https://docs.microsoft.com/dotnet/api/system.configuration.configuration) -* [System.Configuration.ConfigurationManager](https://docs.microsoft.com/dotnet/api/system.configuration.configurationmanager) +* [Configure apps by using configuration files](https://learn.microsoft.com/dotnet/framework/configure-apps/) +* [System.Configuration namespace](https://learn.microsoft.com/dotnet/api/system.configuration) +* [System.Configuration.Configuration](https://learn.microsoft.com/dotnet/api/system.configuration.configuration) +* [System.Configuration.ConfigurationManager](https://learn.microsoft.com/dotnet/api/system.configuration.configurationmanager) ## Feedback & Contributing diff --git a/src/libraries/System.Console/src/System/ConsolePal.Windows.cs b/src/libraries/System.Console/src/System/ConsolePal.Windows.cs index f51fed48b02..0e930653ecd 100644 --- a/src/libraries/System.Console/src/System/ConsolePal.Windows.cs +++ b/src/libraries/System.Console/src/System/ConsolePal.Windows.cs @@ -1227,7 +1227,7 @@ namespace System // If the code page could be Unicode, we should use ReadConsole instead, e.g. // Note that WriteConsoleW has a max limit on num of chars to write (64K) - // [https://docs.microsoft.com/en-us/windows/console/writeconsole] + // [https://learn.microsoft.com/windows/console/writeconsole] // However, we do not need to worry about that because the StreamWriter in Console has // a much shorter buffer size anyway. int charsWritten; diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/DbConnectionOptions.cs b/src/libraries/System.Data.Common/src/System/Data/Common/DbConnectionOptions.cs index 42082231ff8..26870bfdb23 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/DbConnectionOptions.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/DbConnectionOptions.cs @@ -17,13 +17,13 @@ namespace System.Data.Common // differences between OleDb and Odbc // ODBC: - // https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqldriverconnect-function + // https://learn.microsoft.com/sql/odbc/reference/syntax/sqldriverconnect-function // do not support == -> = in keywords // first key-value pair wins // quote values using \{ and \}, only driver= and pwd= appear to generically allow quoting // do not strip quotes from value, or add quotes except for driver keyword // OLEDB: - // https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/connection-string-syntax#oledb-connection-string-syntax + // https://learn.microsoft.com/dotnet/framework/data/adonet/connection-string-syntax#oledb-connection-string-syntax // support == -> = in keywords // last key-value pair wins // quote values using \" or \' diff --git a/src/libraries/System.Data.Common/src/System/Data/DataTable.cs b/src/libraries/System.Data.Common/src/System/Data/DataTable.cs index 428393d70ea..dedde6f7efb 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataTable.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataTable.cs @@ -1357,7 +1357,7 @@ namespace System.Data get { // used for Formating/Parsing - // https://docs.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo.isneutralculture + // https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo.isneutralculture if (null == _formatProvider) { CultureInfo culture = Locale; diff --git a/src/libraries/System.Data.Odbc/src/Common/System/Data/Common/DbConnectionOptions.cs b/src/libraries/System.Data.Odbc/src/Common/System/Data/Common/DbConnectionOptions.cs index 2a75940d3f2..331969fa50a 100644 --- a/src/libraries/System.Data.Odbc/src/Common/System/Data/Common/DbConnectionOptions.cs +++ b/src/libraries/System.Data.Odbc/src/Common/System/Data/Common/DbConnectionOptions.cs @@ -20,13 +20,13 @@ namespace System.Data.Common // differences between OleDb and Odbc // ODBC: - // https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqldriverconnect-function + // https://learn.microsoft.com/sql/odbc/reference/syntax/sqldriverconnect-function // do not support == -> = in keywords // first key-value pair wins // quote values using \{ and \}, only driver= and pwd= appear to generically allow quoting // do not strip quotes from value, or add quotes except for driver keyword // OLEDB: - // https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/connection-string-syntax#oledb-connection-string-syntax + // https://learn.microsoft.com/dotnet/framework/data/adonet/connection-string-syntax#oledb-connection-string-syntax // support == -> = in keywords // last key-value pair wins // quote values using \" or \' diff --git a/src/libraries/System.Data.Odbc/src/CompatibilitySuppressions.xml b/src/libraries/System.Data.Odbc/src/CompatibilitySuppressions.xml index 3767ec73850..41c22dab4f9 100644 --- a/src/libraries/System.Data.Odbc/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Data.Odbc/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0001 diff --git a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcConnectionHandle.cs b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcConnectionHandle.cs index 1e428ff9966..99819356761 100644 --- a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcConnectionHandle.cs +++ b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcConnectionHandle.cs @@ -101,7 +101,7 @@ namespace System.Data.Odbc break; case IsolationLevel.Snapshot: sql_iso = ODBC32.SQL_TRANSACTION.SNAPSHOT; - // VSDD 414121: Snapshot isolation level must be set through SQL_COPT_SS_TXN_ISOLATION (https://docs.microsoft.com/en-us/sql/relational-databases/native-client-odbc-api/sqlsetconnectattr#sqlcoptsstxnisolation) + // VSDD 414121: Snapshot isolation level must be set through SQL_COPT_SS_TXN_ISOLATION (https://learn.microsoft.com/sql/relational-databases/native-client-odbc-api/sqlsetconnectattr#sqlcoptsstxnisolation) isolationAttribute = ODBC32.SQL_ATTR.SQL_COPT_SS_TXN_ISOLATION; break; case IsolationLevel.Chaos: diff --git a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcHandle.cs b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcHandle.cs index 0e6be81299d..448c882aba2 100644 --- a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcHandle.cs +++ b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcHandle.cs @@ -200,7 +200,7 @@ namespace System.Data.Odbc internal ODBC32.SQLRETURN GetDiagnosticRecord(short record, out string sqlState, StringBuilder messageBuilder, out int nativeError, out short cchActual) { // SQLGetDiagRecW expects a buffer large enough to hold a five-character state code plus a null-terminator - // See https://docs.microsoft.com/sql/odbc/reference/syntax/sqlgetdiagrec-function + // See https://learn.microsoft.com/sql/odbc/reference/syntax/sqlgetdiagrec-function char[] buffer = new char[6]; char[] message = new char[1024]; ODBC32.SQLRETURN retcode = Interop.Odbc.SQLGetDiagRecW(HandleType, this, record, buffer, out nativeError, message, checked((short)message.Length), out cchActual); diff --git a/src/libraries/System.Data.OleDb/src/CompatibilitySuppressions.xml b/src/libraries/System.Data.OleDb/src/CompatibilitySuppressions.xml index a07afbdfcfc..3e011bfd729 100644 --- a/src/libraries/System.Data.OleDb/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Data.OleDb/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0015 diff --git a/src/libraries/System.Data.OleDb/src/OleDbComWrappers.cs b/src/libraries/System.Data.OleDb/src/OleDbComWrappers.cs index d5d84927a09..8cc99bc0950 100644 --- a/src/libraries/System.Data.OleDb/src/OleDbComWrappers.cs +++ b/src/libraries/System.Data.OleDb/src/OleDbComWrappers.cs @@ -54,7 +54,7 @@ namespace System.Data.OleDb throw new NotImplementedException(); } - // Doc and type layout: https://docs.microsoft.com/windows/win32/api/oaidl/nn-oaidl-ierrorinfo + // Doc and type layout: https://learn.microsoft.com/windows/win32/api/oaidl/nn-oaidl-ierrorinfo private sealed class ErrorInfoWrapper : UnsafeNativeMethods.IErrorInfo, IDisposable { private readonly IntPtr _wrappedInstance; diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/ActivityUserGuide.md b/src/libraries/System.Diagnostics.DiagnosticSource/src/ActivityUserGuide.md index 54c436ae891..d0c81bfcd9a 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/ActivityUserGuide.md +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/ActivityUserGuide.md @@ -1,6 +1,6 @@ # Activity User Guide -**This doc is being obsoleted by: https://docs.microsoft.com/dotnet/core/diagnostics/distributed-tracing +**This doc is being obsoleted by: https://learn.microsoft.com/dotnet/core/diagnostics/distributed-tracing Future doc changes should be done in the official docs, not here. There is still some information here that is not present in the official docs (yet) so I am preserving it as-is.** diff --git a/src/libraries/System.Diagnostics.EventLog/README.md b/src/libraries/System.Diagnostics.EventLog/README.md index 62102276411..5f5a359a948 100644 --- a/src/libraries/System.Diagnostics.EventLog/README.md +++ b/src/libraries/System.Diagnostics.EventLog/README.md @@ -2,7 +2,7 @@ This assembly exposes the System.Diagnostics.EventLog class, which allows the applications to use the Windows event log service. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.eventlog. +Documentation can be found at https://learn.microsoft.com/dotnet/api/system.diagnostics.eventlog. ## Contribution Bar diff --git a/src/libraries/System.Diagnostics.EventLog/src/CompatibilitySuppressions.xml b/src/libraries/System.Diagnostics.EventLog/src/CompatibilitySuppressions.xml index 81018913a46..6724110f6b1 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Diagnostics.EventLog/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0004 diff --git a/src/libraries/System.Diagnostics.EventLog/src/Messages/readme.md b/src/libraries/System.Diagnostics.EventLog/src/Messages/readme.md index 9ea4b4d69b2..dc93c72ed13 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/Messages/readme.md +++ b/src/libraries/System.Diagnostics.EventLog/src/Messages/readme.md @@ -1,6 +1,6 @@ These files are used to produce an Event Message File. -For more information see https://docs.microsoft.com/en-us/windows/win32/eventlog/message-files. +For more information see https://learn.microsoft.com/windows/win32/eventlog/message-files. The design of the EventLog class is to allow for the registration of event sources without specifying message files. diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/README.md b/src/libraries/System.Diagnostics.PerformanceCounter/README.md index ed5ad148dc7..8a281ce3f49 100644 --- a/src/libraries/System.Diagnostics.PerformanceCounter/README.md +++ b/src/libraries/System.Diagnostics.PerformanceCounter/README.md @@ -2,7 +2,7 @@ This assembly exposes the System.Diagnostics.PerformanceCounter class, which allows access to Windows performance counters. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.performancecounter. +Documentation can be found at https://learn.microsoft.com/dotnet/api/system.diagnostics.performancecounter. ## Contribution Bar diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/src/CompatibilitySuppressions.xml b/src/libraries/System.Diagnostics.PerformanceCounter/src/CompatibilitySuppressions.xml index 9633772cc68..70c5f8d65c7 100644 --- a/src/libraries/System.Diagnostics.PerformanceCounter/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Diagnostics.PerformanceCounter/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0015 diff --git a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Windows.cs b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Windows.cs index dc101504082..6054597a37f 100644 --- a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Windows.cs +++ b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Windows.cs @@ -860,7 +860,7 @@ namespace System.Diagnostics private static string GetEnvironmentVariablesBlock(DictionaryWrapper sd) { - // https://docs.microsoft.com/en-us/windows/win32/procthread/changing-environment-variables + // https://learn.microsoft.com/windows/win32/procthread/changing-environment-variables // "All strings in the environment block must be sorted alphabetically by name. The sort is // case-insensitive, Unicode order, without regard to locale. Because the equal sign is a // separator, it must not be used in the name of an environment variable." diff --git a/src/libraries/System.Diagnostics.Process/tests/ProcessStreamReadTests.cs b/src/libraries/System.Diagnostics.Process/tests/ProcessStreamReadTests.cs index 26174ab7aef..55a38beec90 100644 --- a/src/libraries/System.Diagnostics.Process/tests/ProcessStreamReadTests.cs +++ b/src/libraries/System.Diagnostics.Process/tests/ProcessStreamReadTests.cs @@ -571,7 +571,7 @@ namespace System.Diagnostics.Tests p.StartInfo.RedirectStandardError = true; // On netfx, the handler is called once with the Data as null, even if the process writes nothing to the pipe. - // That behavior is documented here https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.datareceivedeventhandler + // That behavior is documented here https://learn.microsoft.com/dotnet/api/system.diagnostics.datareceivedeventhandler p.Start(); p.BeginOutputReadLine(); diff --git a/src/libraries/System.Diagnostics.TraceSource/README.md b/src/libraries/System.Diagnostics.TraceSource/README.md index e7f8b2c0e27..d01ec9160ee 100644 --- a/src/libraries/System.Diagnostics.TraceSource/README.md +++ b/src/libraries/System.Diagnostics.TraceSource/README.md @@ -2,7 +2,7 @@ This assembly exposes the System.Diagnostics.TraceSource class, which provides a set of methods and properties that enable applications to trace the execution of code and associate trace messages with their source. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.tracesource. +Documentation can be found at https://learn.microsoft.com/dotnet/api/system.diagnostics.tracesource. ## Contribution Bar diff --git a/src/libraries/System.Diagnostics.Tracing/documentation/EventCounterTutorial.md b/src/libraries/System.Diagnostics.Tracing/documentation/EventCounterTutorial.md index 26ce253a585..f77d7a2cd55 100644 --- a/src/libraries/System.Diagnostics.Tracing/documentation/EventCounterTutorial.md +++ b/src/libraries/System.Diagnostics.Tracing/documentation/EventCounterTutorial.md @@ -6,7 +6,7 @@ For events that happen very frequently (for example, if it happens every few mil When dealing with large number of events, knowing the measure per event is not very useful either. Most of the time all we need is just some statistics out of it. So we could crank the statistics within the process itself and then write an event once in a while to report the statistics, that's what `EventCounter` will do for us. Let's take a look at an example how to do this in `Microsoft.Diagnostics.Tracing.EventSource`. -In the sequel, we assume you are familiar with the basic `EventSource` usage, if you don't, please refer to [Vance's excellent blog](https://docs.microsoft.com/en-us/archive/blogs/vancem/introduction-tutorial-logging-etw-events-in-c-system-diagnostics-tracing-eventsource) on that. +In the sequel, we assume you are familiar with the basic `EventSource` usage, if you don't, please refer to [Vance's excellent blog](https://learn.microsoft.com/archive/blogs/vancem/introduction-tutorial-logging-etw-events-in-c-system-diagnostics-tracing-eventsource) on that. Without further ado, here is an example on how to use the `EventCounter` diff --git a/src/libraries/System.DirectoryServices/src/CompatibilitySuppressions.xml b/src/libraries/System.DirectoryServices/src/CompatibilitySuppressions.xml index 2961a274f4a..244f91b2603 100644 --- a/src/libraries/System.DirectoryServices/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.DirectoryServices/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0015 diff --git a/src/libraries/System.Drawing.Primitives/README.md b/src/libraries/System.Drawing.Primitives/README.md index 435c7cfdb07..70730552777 100644 --- a/src/libraries/System.Drawing.Primitives/README.md +++ b/src/libraries/System.Drawing.Primitives/README.md @@ -1,9 +1,9 @@ # System.Drawing.Primitives -This assembly exposes fundamental drawing APIs such as [`Point`](https://learn.microsoft.com/en-us/dotnet/api/system.drawing.point) and [`Size`](https://learn.microsoft.com/en-us/dotnet/api/system.drawing.size) which don't require access to native GDI+ libraries. +This assembly exposes fundamental drawing APIs such as [`Point`](https://learn.microsoft.com/dotnet/api/system.drawing.point) and [`Size`](https://learn.microsoft.com/dotnet/api/system.drawing.size) which don't require access to native GDI+ libraries. `System.Drawing.Primitives` supports not just Windows, but all officially supported platforms. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/api/system.drawing. +Documentation can be found at https://learn.microsoft.com/dotnet/api/system.drawing. ## Contribution Bar - [x] [We consider new features, new APIs and performance changes](../README.md#primary-bar) diff --git a/src/libraries/System.Drawing.Primitives/src/System/Drawing/ColorTranslator.cs b/src/libraries/System.Drawing.Primitives/src/System/Drawing/ColorTranslator.cs index b8fc7866abe..ab679a7cde3 100644 --- a/src/libraries/System.Drawing.Primitives/src/System/Drawing/ColorTranslator.cs +++ b/src/libraries/System.Drawing.Primitives/src/System/Drawing/ColorTranslator.cs @@ -44,7 +44,7 @@ namespace System.Drawing // also updating the runtime. // This method converts Color to an OLE_COLOR. - // https://docs.microsoft.com/openspecs/office_file_formats/ms-oforms/4b8f4be0-3fff-4e42-9fc1-b9fd00251e8e + // https://learn.microsoft.com/openspecs/office_file_formats/ms-oforms/4b8f4be0-3fff-4e42-9fc1-b9fd00251e8e if (c.IsKnownColor && c.IsSystemColor) { diff --git a/src/libraries/System.IO.FileSystem.AccessControl/src/System/IO/FileSystemAclExtensions.cs b/src/libraries/System.IO.FileSystem.AccessControl/src/System/IO/FileSystemAclExtensions.cs index cecec0f38bb..f1fcfb677b9 100644 --- a/src/libraries/System.IO.FileSystem.AccessControl/src/System/IO/FileSystemAclExtensions.cs +++ b/src/libraries/System.IO.FileSystem.AccessControl/src/System/IO/FileSystemAclExtensions.cs @@ -213,7 +213,7 @@ namespace System.IO } // In the context of a FileStream, the only ACCESS_MASK ACE rights we care about are reading/writing data and the generic read/write rights. - // See: https://docs.microsoft.com/en-us/windows/win32/secauthz/access-mask + // See: https://learn.microsoft.com/windows/win32/secauthz/access-mask private static FileAccess GetFileAccessFromRights(FileSystemRights rights) { FileAccess access = 0; diff --git a/src/libraries/System.IO.FileSystem.Watcher/src/System/HResults.cs b/src/libraries/System.IO.FileSystem.Watcher/src/System/HResults.cs index 59b7ce8ab25..f3fa06865eb 100644 --- a/src/libraries/System.IO.FileSystem.Watcher/src/System/HResults.cs +++ b/src/libraries/System.IO.FileSystem.Watcher/src/System/HResults.cs @@ -5,7 +5,7 @@ /* These HRESULTs are used for mapping managed exceptions to COM error codes and vice versa through COM Interop. For background on COM error codes see -https://docs.microsoft.com/en-us/windows/desktop/com/com-error-codes. +https://learn.microsoft.com/windows/desktop/com/com-error-codes. FACILITY_URT is defined as 0x13 (0x8013xxxx). The facility range is reserved for the .NET Framework SDK teams. diff --git a/src/libraries/System.IO.Pipes.AccessControl/tests/NamedPipeTests/NamedPipeServerStreamAclTests.cs b/src/libraries/System.IO.Pipes.AccessControl/tests/NamedPipeTests/NamedPipeServerStreamAclTests.cs index 55c89327de1..396a14c6f6d 100644 --- a/src/libraries/System.IO.Pipes.AccessControl/tests/NamedPipeTests/NamedPipeServerStreamAclTests.cs +++ b/src/libraries/System.IO.Pipes.AccessControl/tests/NamedPipeTests/NamedPipeServerStreamAclTests.cs @@ -178,7 +178,7 @@ namespace System.IO.Pipes.Tests // - PipeAccessRights.WriteData | PipeAccessRights.WriteExtendedAttributes | PipeAccessRights.WriteAttributes // additionalAccessRights gets bitwise merged with the 'dwOpenMode' parameter we pass to CreateNamedPipeW. - // This parameter can acquire any of the values described here: https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createnamedpipea + // This parameter can acquire any of the values described here: https://learn.microsoft.com/windows/win32/api/winbase/nf-winbase-createnamedpipea // It's particularly important to mention that two of the accepted values collide with the value of two PipeAccessRights enum values: // - ReadData (0x1): Same value as PIPE_ACCESS_INBOUND // - WriteData (0x2): Same value as PIPE_ACCESS_OUTBOUND diff --git a/src/libraries/System.IO.Pipes/src/CompatibilitySuppressions.xml b/src/libraries/System.IO.Pipes/src/CompatibilitySuppressions.xml index db08f006c4c..6c409dea39b 100644 --- a/src/libraries/System.IO.Pipes/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.IO.Pipes/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0001 diff --git a/src/libraries/System.Linq.Expressions/src/CompatibilitySuppressions.xml b/src/libraries/System.Linq.Expressions/src/CompatibilitySuppressions.xml index 6cd6653b9e0..2524d0e9645 100644 --- a/src/libraries/System.Linq.Expressions/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Linq.Expressions/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0001 diff --git a/src/libraries/System.Linq.Expressions/src/System/Dynamic/ExpandoObject.cs b/src/libraries/System.Linq.Expressions/src/System/Dynamic/ExpandoObject.cs index 288d01c185d..fb11d87ce5f 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Dynamic/ExpandoObject.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Dynamic/ExpandoObject.cs @@ -321,7 +321,7 @@ namespace System.Dynamic // that uses DebuggerTypeProxy, instead of defining a generic debug view type and // using different instantiations. The reason for this is that support for generics // with using DebuggerTypeProxy is limited. For C#, DebuggerTypeProxy supports only - // open types (from MSDN https://docs.microsoft.com/en-us/visualstudio/debugger/using-debuggertypeproxy-attribute). + // open types (from MSDN https://learn.microsoft.com/visualstudio/debugger/using-debuggertypeproxy-attribute). private sealed class KeyCollectionDebugView { private readonly ICollection _collection; @@ -460,7 +460,7 @@ namespace System.Dynamic // that uses DebuggerTypeProxy, instead of defining a generic debug view type and // using different instantiations. The reason for this is that support for generics // with using DebuggerTypeProxy is limited. For C#, DebuggerTypeProxy supports only - // open types (from MSDN https://docs.microsoft.com/en-us/visualstudio/debugger/using-debuggertypeproxy-attribute). + // open types (from MSDN https://learn.microsoft.com/visualstudio/debugger/using-debuggertypeproxy-attribute). private sealed class ValueCollectionDebugView { private readonly ICollection _collection; diff --git a/src/libraries/System.Linq.Queryable/README.md b/src/libraries/System.Linq.Queryable/README.md index c23f7e0abdf..930fb1ea91b 100644 --- a/src/libraries/System.Linq.Queryable/README.md +++ b/src/libraries/System.Linq.Queryable/README.md @@ -2,7 +2,7 @@ Provides a set of extension methods for querying data structures that implement `IQueryable`. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/api/system.linq. +Documentation can be found at https://learn.microsoft.com/dotnet/api/system.linq. ## Contribution Bar diff --git a/src/libraries/System.Memory.Data/src/CompatibilitySuppressions.xml b/src/libraries/System.Memory.Data/src/CompatibilitySuppressions.xml index 9e798aa1ff3..27c7ce33024 100644 --- a/src/libraries/System.Memory.Data/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Memory.Data/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0015 diff --git a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs index 653ec96c1bb..000bd5f2487 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs +++ b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpHandler.cs @@ -80,7 +80,7 @@ namespace System.Net.Http private TimeSpan _receiveDataTimeout = TimeSpan.FromSeconds(30); // Using OS defaults for "Keep-alive timeout" and "keep-alive interval" - // as documented in https://docs.microsoft.com/en-us/windows/win32/winsock/sio-keepalive-vals#remarks + // as documented in https://learn.microsoft.com/windows/win32/winsock/sio-keepalive-vals#remarks private TimeSpan _tcpKeepAliveTime = TimeSpan.FromHours(2); private TimeSpan _tcpKeepAliveInterval = TimeSpan.FromSeconds(1); private bool _tcpKeepAliveEnabled; diff --git a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/StressServer.cs b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/StressServer.cs index 8eaa167fef1..35122083742 100644 --- a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/StressServer.cs +++ b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/StressServer.cs @@ -52,7 +52,7 @@ namespace HttpStress if (configuration.UseHttpSys && OperatingSystem.IsWindows()) { // Use http.sys. This requires additional manual configuration ahead of time; - // see https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/httpsys?view=aspnetcore-2.2#configure-windows-server. + // see https://learn.microsoft.com/aspnet/core/fundamentals/servers/httpsys?view=aspnetcore-2.2#configure-windows-server. // In particular, you need to: // 1. Create a self-signed cert and install it into your local personal store, e.g. New-SelfSignedCertificate -DnsName "localhost" -CertStoreLocation "cert:\LocalMachine\My" // 2. Pre-register the URL prefix, e.g. netsh http add urlacl url=https://localhost:5001/ user=Users diff --git a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListenerTimeoutManager.Windows.cs b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListenerTimeoutManager.Windows.cs index 5b6636bac93..222b3b51169 100644 --- a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListenerTimeoutManager.Windows.cs +++ b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListenerTimeoutManager.Windows.cs @@ -8,7 +8,7 @@ namespace System.Net { // // See the native HTTP_TIMEOUT_LIMIT_INFO structure documentation for additional information. - // https://docs.microsoft.com/en-us/windows/desktop/api/http/ns-http-_http_timeout_limit_info + // https://learn.microsoft.com/windows/desktop/api/http/ns-http-_http_timeout_limit_info // public class HttpListenerTimeoutManager { diff --git a/src/libraries/System.Net.Quic/readme.md b/src/libraries/System.Net.Quic/readme.md index 039ce733a23..e8ba3e7f32c 100644 --- a/src/libraries/System.Net.Quic/readme.md +++ b/src/libraries/System.Net.Quic/readme.md @@ -18,7 +18,7 @@ During the build, the `msquic.dll` is automatically downloaded and placed in cor ### Linux -On Linux, `libmsquic` is published via official Microsoft Linux package repository `packages.microsoft.com`. In order to consume packages from it, you have to add it manually, see https://docs.microsoft.com/en-us/windows-server/administration/linux-package-repository-for-microsoft-software. After that, you should be able to install `libmsquic` via the package manager of your distro, e.g. for Ubuntu: +On Linux, `libmsquic` is published via official Microsoft Linux package repository `packages.microsoft.com`. In order to consume packages from it, you have to add it manually, see https://learn.microsoft.com/windows-server/administration/linux-package-repository-for-microsoft-software. After that, you should be able to install `libmsquic` via the package manager of your distro, e.g. for Ubuntu: ``` apt install libmsquic ``` diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs index 6c5c2d8e2a9..17c5a3e1824 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs @@ -1303,7 +1303,7 @@ namespace System.Net.Sockets.Tests Assert.Throws(() => { // This is a false start. - // https://docs.microsoft.com/en-us/dotnet/api/system.net.sockets.socket.receivemessagefrom + // https://learn.microsoft.com/dotnet/api/system.net.sockets.socket.receivemessagefrom // "...the returned IPPacketInformation object will only be valid for packets which arrive at the // local computer after the socket option has been set. If a socket is sent packets between when // it is bound to a local endpoint (explicitly by the Bind method or implicitly by one of the Connect, diff --git a/src/libraries/System.Numerics.Tensors/src/CompatibilitySuppressions.xml b/src/libraries/System.Numerics.Tensors/src/CompatibilitySuppressions.xml index a072803b8d8..2ce75e7b71d 100644 --- a/src/libraries/System.Numerics.Tensors/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Numerics.Tensors/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0001 diff --git a/src/libraries/System.Numerics.Tensors/src/PACKAGE.md b/src/libraries/System.Numerics.Tensors/src/PACKAGE.md index c5670c1c0f9..4fcfa9bff72 100644 --- a/src/libraries/System.Numerics.Tensors/src/PACKAGE.md +++ b/src/libraries/System.Numerics.Tensors/src/PACKAGE.md @@ -46,7 +46,7 @@ The main types provided by this library are: ## Additional Documentation -* [API documentation](https://learn.microsoft.com/en-us/dotnet/api/system.numerics.tensors) +* [API documentation](https://learn.microsoft.com/dotnet/api/system.numerics.tensors) ## Feedback & Contributing diff --git a/src/libraries/System.Private.CoreLib/src/System/AggregateException.cs b/src/libraries/System.Private.CoreLib/src/System/AggregateException.cs index f9ec9353812..bdd6e875712 100644 --- a/src/libraries/System.Private.CoreLib/src/System/AggregateException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/AggregateException.cs @@ -392,7 +392,7 @@ namespace System /// because DebuggerDisplay should be a single property access or parameterless method call, so that the debugger /// can use a fast path without using the expression evaluator. /// - /// See https://docs.microsoft.com/en-us/visualstudio/debugger/using-the-debuggerdisplay-attribute + /// See https://learn.microsoft.com/visualstudio/debugger/using-the-debuggerdisplay-attribute /// internal int InnerExceptionCount => _innerExceptions.Length; diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs index 48cab155a94..a505c8de02a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs @@ -338,7 +338,7 @@ namespace System.Diagnostics.Tracing /// /// Returns a string of the XML manifest associated with the eventSourceType. The scheme for this XML is - /// documented at in EventManifest Schema https://docs.microsoft.com/en-us/windows/desktop/WES/eventmanifestschema-schema. + /// documented at in EventManifest Schema https://learn.microsoft.com/windows/desktop/WES/eventmanifestschema-schema. /// This is the preferred way of generating a manifest to be embedded in the ETW stream as it is fast and /// the fact that it only includes localized entries for the current UI culture is an acceptable tradeoff. /// @@ -359,7 +359,7 @@ namespace System.Diagnostics.Tracing } /// /// Returns a string of the XML manifest associated with the eventSourceType. The scheme for this XML is - /// documented at in EventManifest Schema https://docs.microsoft.com/en-us/windows/desktop/WES/eventmanifestschema-schema. + /// documented at in EventManifest Schema https://learn.microsoft.com/windows/desktop/WES/eventmanifestschema-schema. /// Pass EventManifestOptions.AllCultures when generating a manifest to be registered on the machine. This /// ensures that the entries in the event log will be "optimally" localized. /// diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.Nls.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.Nls.cs index 152b55a3e2f..bb24e9242fa 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.Nls.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.Nls.cs @@ -150,7 +150,7 @@ namespace System.Globalization // Note in calls to LCMapStringEx below, the input buffer is specified in wchars (and wchar count), // but the output buffer is specified in bytes (and byte count). This is because when generating // sort keys, LCMapStringEx treats the output buffer as containing opaque binary data. - // See https://docs.microsoft.com/en-us/windows/desktop/api/winnls/nf-winnls-lcmapstringex. + // See https://learn.microsoft.com/windows/desktop/api/winnls/nf-winnls-lcmapstringex. byte[]? borrowedArr = null; Span span = sortKeyLength <= 512 ? diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/RandomAccess.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/IO/RandomAccess.Windows.cs index e5c8e17da23..151a0abfc84 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/RandomAccess.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/RandomAccess.Windows.cs @@ -57,7 +57,7 @@ namespace System.IO int errorCode = FileStreamHelpers.GetLastWin32ErrorAndDisposeHandleIfInvalid(handle); return errorCode switch { - // https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-readfile#synchronization-and-file-position: + // https://learn.microsoft.com/windows/win32/api/fileapi/nf-fileapi-readfile#synchronization-and-file-position: // "If lpOverlapped is not NULL, then when a synchronous read operation reaches the end of a file, // ReadFile returns FALSE and GetLastError returns ERROR_HANDLE_EOF" Interop.Errors.ERROR_HANDLE_EOF => numBytesRead, @@ -447,7 +447,7 @@ namespace System.IO } } - // From https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-readfilescatter: + // From https://learn.microsoft.com/windows/win32/api/fileapi/nf-fileapi-readfilescatter: // "The file handle must be created with [...] the FILE_FLAG_OVERLAPPED and FILE_FLAG_NO_BUFFERING flags." private static bool CanUseScatterGatherWindowsAPIs(SafeFileHandle handle) => handle.IsAsync && ((handle.GetFileOptions() & SafeFileHandle.NoBuffering) != 0); @@ -738,7 +738,7 @@ namespace System.IO result->OffsetHigh = (int)(fileOffset >> 32); } - // From https://docs.microsoft.com/en-us/windows/win32/api/ioapiset/nf-ioapiset-getoverlappedresult: + // From https://learn.microsoft.com/windows/win32/api/ioapiset/nf-ioapiset-getoverlappedresult: // "If the hEvent member of the OVERLAPPED structure is NULL, the system uses the state of the hFile handle to signal when the operation has been completed. // Use of file, named pipe, or communications-device handles for this purpose is discouraged. // It is safer to use an event object because of the confusion that can occur when multiple simultaneous overlapped operations @@ -788,7 +788,7 @@ namespace System.IO } } - // From https://docs.microsoft.com/en-us/windows/win32/fileio/file-buffering: + // From https://learn.microsoft.com/windows/win32/fileio/file-buffering: // "File access sizes, including the optional file offset in the OVERLAPPED structure, // if specified, must be for a number of bytes that is an integer multiple of the volume sector size." // So if buffer and physical sector size is 4096 and the file size is 4097: diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs index a6335019d09..afc824b8025 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs @@ -20,13 +20,13 @@ namespace System.Runtime.InteropServices /// /// This is useful in scenarios when the caller has no need to rely on an IUnknown instance /// that is used when running managed code is not possible (i.e. during a GC). In traditional - /// COM scenarios this is common, but scenarios involving Reference Tracker hosting + /// COM scenarios this is common, but scenarios involving Reference Tracker hosting /// calling of the IUnknown API during a GC is possible. /// CallerDefinedIUnknown = 1, /// - /// Flag used to indicate the COM interface should implement IReferenceTrackerTarget. + /// Flag used to indicate the COM interface should implement IReferenceTrackerTarget. /// When this flag is passed, the resulting COM interface will have an internal implementation of IUnknown /// and as such none should be supplied by the caller. /// @@ -42,7 +42,7 @@ namespace System.Runtime.InteropServices None = 0, /// - /// Indicate if the supplied external COM object implements the IReferenceTracker. + /// Indicate if the supplied external COM object implements the IReferenceTracker. /// TrackerObject = 1, diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/RuntimeInformation.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/RuntimeInformation.cs index e750d101158..9387967c49a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/RuntimeInformation.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/RuntimeInformation.cs @@ -15,7 +15,7 @@ namespace System.Runtime.InteropServices /// and processor architecture of the currently executing process. /// Since this string is opaque, it is not recommended to parse the string into its constituent parts. /// - /// For more information, see https://docs.microsoft.com/dotnet/core/rid-catalog. + /// For more information, see https://learn.microsoft.com/dotnet/core/rid-catalog. /// public static string RuntimeIdentifier => s_runtimeIdentifier ??= AppContext.GetData("RUNTIME_IDENTIFIER") as string ?? "unknown"; diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/SuppressGCTransitionAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/SuppressGCTransitionAttribute.cs index b41d10ee520..d589dfb32bd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/SuppressGCTransitionAttribute.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/SuppressGCTransitionAttribute.cs @@ -36,7 +36,7 @@ namespace System.Runtime.InteropServices /// Suppressing the GC transition is an advanced scenario and should not be done without fully understanding /// potential consequences. /// - /// One of these consequences is an impact to Mixed-mode debugging (https://docs.microsoft.com/visualstudio/debugger/how-to-debug-in-mixed-mode). + /// One of these consequences is an impact to Mixed-mode debugging (https://learn.microsoft.com/visualstudio/debugger/how-to-debug-in-mixed-mode). /// During Mixed-mode debugging, it is not possible to step into or set breakpoints in a P/Invoke that /// has been marked with this attribute. A workaround is to switch to native debugging and set a breakpoint in the native function. /// In general, usage of this attribute is not recommended if debugging the P/Invoke is important, for example diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/UnmanagedCallersOnlyAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/UnmanagedCallersOnlyAttribute.cs index 411260e321d..114ae92bb95 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/UnmanagedCallersOnlyAttribute.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/UnmanagedCallersOnlyAttribute.cs @@ -5,14 +5,14 @@ namespace System.Runtime.InteropServices { /// /// Any method marked with can be directly called from - /// native code. The function token can be loaded to a local variable using the address-of operator + /// native code. The function token can be loaded to a local variable using the address-of operator /// in C# and passed as a callback to a native method. /// /// /// Methods marked with this attribute have the following restrictions: /// * Method must be marked "static". /// * Must not be called from managed code. - /// * Must only have blittable arguments. + /// * Must only have blittable arguments. /// [AttributeUsage(AttributeTargets.Method, Inherited = false)] public sealed class UnmanagedCallersOnlyAttribute : Attribute diff --git a/src/libraries/System.Private.Xml/src/Misc/HResults.cs b/src/libraries/System.Private.Xml/src/Misc/HResults.cs index dcd8e404242..d926214738b 100644 --- a/src/libraries/System.Private.Xml/src/Misc/HResults.cs +++ b/src/libraries/System.Private.Xml/src/Misc/HResults.cs @@ -4,7 +4,7 @@ /* These HRESULTs are used for mapping managed exceptions to COM error codes and vice versa through COM Interop. For background on COM error codes see -https://docs.microsoft.com/en-us/windows/desktop/com/com-error-codes. +https://learn.microsoft.com/windows/desktop/com/com-error-codes. FACILITY_URT is defined as 0x13 (0x8013xxxx). The facility range is reserved for the .NET Framework SDK teams. diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/DecimalFormatter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/DecimalFormatter.cs index 6510eb4defe..0c37d6c05f1 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/DecimalFormatter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/DecimalFormatter.cs @@ -32,7 +32,7 @@ namespace System.Xml.Xsl.Runtime private readonly char _zeroDigit; // These characters have special meaning for CLR and must be escaped - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-numeric-format-strings + // https://learn.microsoft.com/dotnet/standard/base-types/custom-numeric-format-strings private const string ClrSpecialChars = "0#.,%\u2030Ee\\'\";"; // This character is used to escape literal (passive) digits '0'..'9' diff --git a/src/libraries/System.Reflection.Context/src/CompatibilitySuppressions.xml b/src/libraries/System.Reflection.Context/src/CompatibilitySuppressions.xml index f79155e70fc..d353b22c21e 100644 --- a/src/libraries/System.Reflection.Context/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Reflection.Context/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + diff --git a/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingAssembly.cs b/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingAssembly.cs index c2588f7fde3..8aa6ea597b2 100644 --- a/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingAssembly.cs +++ b/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingAssembly.cs @@ -23,7 +23,7 @@ namespace System.Reflection.Context.Delegation } #pragma warning disable IL3003 // netstandard2.1 didn't have RequiresAssemblyFiles attributes applied on Assembly - [RequiresAssemblyFiles("Calling 'System.Reflection.Assembly.Location' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'", Url = "https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/il3000")] + [RequiresAssemblyFiles("Calling 'System.Reflection.Assembly.Location' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'", Url = "https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/il3000")] public override string Location { get { return UnderlyingAssembly.Location; } @@ -111,19 +111,19 @@ namespace System.Reflection.Context.Delegation } #pragma warning disable IL3003 // netstandard2.1 didn't have RequiresAssemblyFiles attributes applied on Assembly - [RequiresAssemblyFiles("Calling 'System.Reflection.Assembly.GetFile(string)' will throw for assemblies embedded in a single-file app", Url = "https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/il3001")] + [RequiresAssemblyFiles("Calling 'System.Reflection.Assembly.GetFile(string)' will throw for assemblies embedded in a single-file app", Url = "https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/il3001")] public override FileStream? GetFile(string name) { return UnderlyingAssembly.GetFile(name); } - [RequiresAssemblyFiles("Calling 'System.Reflection.Assembly.GetFiles()' will throw for assemblies embedded in a single-file app", Url = "https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/il3001")] + [RequiresAssemblyFiles("Calling 'System.Reflection.Assembly.GetFiles()' will throw for assemblies embedded in a single-file app", Url = "https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/il3001")] public override FileStream[] GetFiles() { return UnderlyingAssembly.GetFiles(); } - [RequiresAssemblyFiles("Calling 'System.Reflection.Assembly.GetFiles(bool)' will throw for assemblies embedded in a single-file app", Url = "https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/il3001")] + [RequiresAssemblyFiles("Calling 'System.Reflection.Assembly.GetFiles(bool)' will throw for assemblies embedded in a single-file app", Url = "https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/il3001")] public override FileStream[] GetFiles(bool getResourceModules) { return UnderlyingAssembly.GetFiles(getResourceModules); diff --git a/src/libraries/System.Reflection.Metadata/src/PACKAGE.md b/src/libraries/System.Reflection.Metadata/src/PACKAGE.md index f5891b8d74a..9b43fe952fe 100644 --- a/src/libraries/System.Reflection.Metadata/src/PACKAGE.md +++ b/src/libraries/System.Reflection.Metadata/src/PACKAGE.md @@ -93,11 +93,11 @@ The main types provided by this library are: -* [System.Reflection.Metadata.MetadataReader](https://docs.microsoft.com/dotnet/api/system.reflection.metadata.metadatareader) -* [System.Reflection.PortableExecutable.PEReader](https://docs.microsoft.com/dotnet/api/system.reflection.portableexecutable.pereader) -* [System.Reflection.Metadata.Ecma335.MetadataBuilder](https://docs.microsoft.com/dotnet/api/system.reflection.metadata.ecma335.metadatabuilder) -* [System.Reflection.PortableExecutable.PEBuilder](https://docs.microsoft.com/dotnet/api/system.reflection.portableexecutable.pebuilder) -* [System.Reflection.PortableExecutable.ManagedPEBuilder](https://docs.microsoft.com/dotnet/api/system.reflection.portableexecutable.managedpebuilder) +* [System.Reflection.Metadata.MetadataReader](https://learn.microsoft.com/dotnet/api/system.reflection.metadata.metadatareader) +* [System.Reflection.PortableExecutable.PEReader](https://learn.microsoft.com/dotnet/api/system.reflection.portableexecutable.pereader) +* [System.Reflection.Metadata.Ecma335.MetadataBuilder](https://learn.microsoft.com/dotnet/api/system.reflection.metadata.ecma335.metadatabuilder) +* [System.Reflection.PortableExecutable.PEBuilder](https://learn.microsoft.com/dotnet/api/system.reflection.portableexecutable.pebuilder) +* [System.Reflection.PortableExecutable.ManagedPEBuilder](https://learn.microsoft.com/dotnet/api/system.reflection.portableexecutable.managedpebuilder) ## Feedback & Contributing diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/PACKAGE.md b/src/libraries/System.Reflection.MetadataLoadContext/src/PACKAGE.md index f16805d7d3f..4c7566f5e7a 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/PACKAGE.md +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/PACKAGE.md @@ -50,9 +50,9 @@ The main types provided by this library are: -* [How to: Inspect assembly contents using MetadataLoadContext](https://docs.microsoft.com/dotnet/standard/assembly/inspect-contents-using-metadataloadcontext) -* [System.Reflection.MetadataLoadContext](https://docs.microsoft.com/dotnet/api/system.reflection.metadataloadcontext) -* [System.Reflection.MetadataAssemblyResolver](https://docs.microsoft.com/dotnet/api/system.reflection.metadataassemblyresolver) +* [How to: Inspect assembly contents using MetadataLoadContext](https://learn.microsoft.com/dotnet/standard/assembly/inspect-contents-using-metadataloadcontext) +* [System.Reflection.MetadataLoadContext](https://learn.microsoft.com/dotnet/api/system.reflection.metadataloadcontext) +* [System.Reflection.MetadataAssemblyResolver](https://learn.microsoft.com/dotnet/api/system.reflection.metadataassemblyresolver) ## Feedback & Contributing diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/MarshalAsParser.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/MarshalAsParser.cs index 2ccde8160d7..2d42379bea0 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/MarshalAsParser.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/MarshalAsParser.cs @@ -21,7 +21,7 @@ namespace Microsoft.Interop CharEncoding CharEncoding) : MarshallingInfoStringSupport(CharEncoding), IForwardedMarshallingInfo { // UnmanagedType.LPUTF8Str is not in netstandard2.0, so we define a constant for the value here. - // See https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.unmanagedtype + // See https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.unmanagedtype internal const UnmanagedType UnmanagedType_LPUTF8Str = (UnmanagedType)0x30; private protected abstract bool TryCreateAttributeSyntax([NotNullWhen(true)] out AttributeSyntax? attribute); diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/BoolMarshaller.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/BoolMarshaller.cs index b2d42a619fe..24e2102eb73 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/BoolMarshaller.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/BoolMarshaller.cs @@ -127,7 +127,7 @@ namespace Microsoft.Interop /// Marshals a boolean value as a 4-byte integer. /// /// - /// Corresponds to the definition of BOOL. + /// Corresponds to the definition of BOOL. /// public sealed class WinBoolMarshaller : BoolMarshallerBase { diff --git a/src/libraries/System.Runtime.InteropServices/src/CompatibilitySuppressions.xml b/src/libraries/System.Runtime.InteropServices/src/CompatibilitySuppressions.xml index b4c6a062718..da3c19b3810 100644 --- a/src/libraries/System.Runtime.InteropServices/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Runtime.InteropServices/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0001 diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/ADVF.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/ADVF.cs index f8a44d0a9e8..8caac60ad38 100644 --- a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/ADVF.cs +++ b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/ComTypes/ADVF.cs @@ -8,7 +8,7 @@ namespace System.Runtime.InteropServices.ComTypes /// /// Note: ADVF_ONLYONCE and ADVF_PRIMEFIRST values conform with objidl.dll but are backwards from /// the Platform SDK documentation as of 07/21/2003. - /// https://docs.microsoft.com/en-us/windows/desktop/api/objidl/ne-objidl-tagadvf. + /// https://learn.microsoft.com/windows/desktop/api/objidl/ne-objidl-tagadvf. /// [EditorBrowsable(EditorBrowsableState.Never)] [Flags] diff --git a/src/libraries/System.Runtime.Intrinsics/README.md b/src/libraries/System.Runtime.Intrinsics/README.md index 467c9fe55d4..f5852a46556 100644 --- a/src/libraries/System.Runtime.Intrinsics/README.md +++ b/src/libraries/System.Runtime.Intrinsics/README.md @@ -1,7 +1,7 @@ # System.Runtime.Intrinsics Contains types used to create and convey register states in various sizes and formats for use with instruction-set extensions. Also exposes select instruction-set extensions for various architectures (`x86`, `Arm`, `Wasm`). -Documentation can be found here: https://learn.microsoft.com/en-us/dotnet/api/system.runtime.intrinsics. +Documentation can be found here: https://learn.microsoft.com/dotnet/api/system.runtime.intrinsics. ## Contribution Bar - [x] [We consider new features, new APIs and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/System.Runtime.Numerics/README.md b/src/libraries/System.Runtime.Numerics/README.md index 2aa9e24c311..8ef5e0f375d 100644 --- a/src/libraries/System.Runtime.Numerics/README.md +++ b/src/libraries/System.Runtime.Numerics/README.md @@ -5,9 +5,9 @@ Contains additional numeric types that complement the numeric primitives (such a * The `Complex` structure, which represents a complex number. A complex number is a number in the form *a* + *b*i, where *a* is the real part, and *b* is the imaginary part. * The SIMD-enabled vector types, which include `Vector2`, `Vector3`, `Vector4`, `Matrix3x2`, `Matrix4x4`, `Plane`, and `Quaternion`. -Documentation can be found here: https://learn.microsoft.com/en-us/dotnet/api/system.numerics. +Documentation can be found here: https://learn.microsoft.com/dotnet/api/system.numerics. -This area also includes all of the interfaces that make up Generic Math, which is discussed more here: https://learn.microsoft.com/en-us/dotnet/standard/generics/math. +This area also includes all of the interfaces that make up Generic Math, which is discussed more here: https://learn.microsoft.com/dotnet/standard/generics/math. ## Contribution Bar - [x] [We consider new features, new APIs and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/System.Runtime/README.md b/src/libraries/System.Runtime/README.md index 9bde5e23be4..0d76cbe065c 100644 --- a/src/libraries/System.Runtime/README.md +++ b/src/libraries/System.Runtime/README.md @@ -1,7 +1,7 @@ # System.Runtime Contains fundamental classes and base classes that define commonly-used value and reference data types, events and event handlers, interfaces, attributes, and processing exceptions. -Documentation can be found here: https://learn.microsoft.com/en-us/dotnet/api/system?view=net-7.0. +Documentation can be found here: https://learn.microsoft.com/dotnet/api/system?view=net-7.0. ## Contribution Bar - [x] [We consider new features, new APIs and performance changes](../../libraries/README.md#primary-bar) diff --git a/src/libraries/System.Runtime/src/CompatibilitySuppressions.xml b/src/libraries/System.Runtime/src/CompatibilitySuppressions.xml index 51e030bd88c..d2ea84261c4 100644 --- a/src/libraries/System.Runtime/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Runtime/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0002 diff --git a/src/libraries/System.Runtime/tests/System.Globalization.Tests/CultureInfo/CultureInfoCtor.cs b/src/libraries/System.Runtime/tests/System.Globalization.Tests/CultureInfo/CultureInfoCtor.cs index c921165a4f3..9a952378471 100644 --- a/src/libraries/System.Runtime/tests/System.Globalization.Tests/CultureInfo/CultureInfoCtor.cs +++ b/src/libraries/System.Runtime/tests/System.Globalization.Tests/CultureInfo/CultureInfoCtor.cs @@ -430,7 +430,7 @@ namespace System.Globalization.Tests [InlineData(0x4C00)] public void TestCreationWithTemporaryLCID(int lcid) { - // https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/926e694f-1797-4418-a922-343d1c5e91a6 + // https://learn.microsoft.com/openspecs/windows_protocols/ms-lcid/926e694f-1797-4418-a922-343d1c5e91a6 // If a temporary LCID is assigned it will be dynamically assigned at runtime to be // 0x2000, 0x2400, 0x2800, 0x2C00, 0x3000, 0x3400, 0x3800, 0x3C00, 0x4000, 0x4400, 0x4800, or 0x4C00, // for the valid language-script-region tags. diff --git a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/File/GetSetTimes_SafeFileHandle.cs b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/File/GetSetTimes_SafeFileHandle.cs index 57eb9f80337..1cf0bb62e3b 100644 --- a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/File/GetSetTimes_SafeFileHandle.cs +++ b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/File/GetSetTimes_SafeFileHandle.cs @@ -101,7 +101,7 @@ namespace System.IO.Tests File.SetLastAccessTime(handle, DateTime.Now.Subtract(TimeSpan.FromDays(1))); DateTime timeAfterWrite = default, timeBeforeWrite = File.GetLastWriteTime(handle); - // According to https://learn.microsoft.com/en-us/windows/win32/api/fileapi/ns-fileapi-win32_file_attribute_data + // According to https://learn.microsoft.com/windows/win32/api/fileapi/ns-fileapi-win32_file_attribute_data // write time has a resolution of 2 seconds on FAT. Let's wait a little bit longer. for (int i = 0; i <= 5 && timeBeforeWrite >= timeAfterWrite; i++) { diff --git a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/ManualTests/ManualTests.cs b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/ManualTests/ManualTests.cs index fe0395a80c2..b4c7b3d7d21 100644 --- a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/ManualTests/ManualTests.cs +++ b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/ManualTests/ManualTests.cs @@ -112,7 +112,7 @@ namespace System.IO.ManualTests - Create an 8mb fixed size VHD. - Open Computer Management -> Storage -> Disk Management - Follow these instructions: - https://docs.microsoft.com/en-us/windows-server/storage/disk-management/manage-virtual-hard-disks + https://learn.microsoft.com/windows-server/storage/disk-management/manage-virtual-hard-disks - Restrict the space available in the VHD. - Create a 512 bytes quota in the VHD created above using cmd: diff --git a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/PortedCommon/IOInputs.cs b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/PortedCommon/IOInputs.cs index 0faa81495dd..9676973fed7 100644 --- a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/PortedCommon/IOInputs.cs +++ b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/PortedCommon/IOInputs.cs @@ -220,7 +220,7 @@ internal static class IOInputs } public static IEnumerable GetReservedDeviceNames() - { // See: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + { // See: https://learn.microsoft.com/windows/win32/fileio/naming-a-file // // Note - Recent versions of Win10 relax this restriction and allow reserved // device names as filenames. diff --git a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/TestData.cs b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/TestData.cs index 7b159b016b1..0451d386cbf 100644 --- a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/TestData.cs +++ b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/TestData.cs @@ -7,7 +7,7 @@ using Xunit; internal static class TestData { - // see: https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file + // see: https://learn.microsoft.com/windows/desktop/FileIO/naming-a-file private static readonly char[] s_invalidFileNameChars = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? new char[] { diff --git a/src/libraries/System.Runtime/tests/System.IO.Tests/BinaryWriter/BinaryWriter.WriteByteCharTests.cs b/src/libraries/System.Runtime/tests/System.IO.Tests/BinaryWriter/BinaryWriter.WriteByteCharTests.cs index 84a1fc2b1c4..bc847ff3f21 100644 --- a/src/libraries/System.Runtime/tests/System.IO.Tests/BinaryWriter/BinaryWriter.WriteByteCharTests.cs +++ b/src/libraries/System.Runtime/tests/System.IO.Tests/BinaryWriter/BinaryWriter.WriteByteCharTests.cs @@ -110,7 +110,7 @@ namespace System.IO.Tests Stream stream = CreateStream(); // string name = iso-2022-jp, codepage = 50220 (original test used a code page number). - // taken from https://docs.microsoft.com/en-us/windows/desktop/Intl/code-page-identifiers + // taken from https://learn.microsoft.com/windows/desktop/Intl/code-page-identifiers string codepageName = "iso-2022-jp"; BinaryWriter writer = new BinaryWriter(stream, Encoding.GetEncoding(codepageName)); diff --git a/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/JitInfoTests.cs b/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/JitInfoTests.cs index 18e05e2380e..2b2472f1b22 100644 --- a/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/JitInfoTests.cs +++ b/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/JitInfoTests.cs @@ -13,7 +13,7 @@ namespace System.Runtime.Tests { private long MakeAndInvokeDynamicSquareMethod(int input) { - // example ref emit dynamic method from https://docs.microsoft.com/en-us/dotnet/framework/reflection-and-codedom/how-to-define-and-execute-dynamic-methods + // example ref emit dynamic method from https://learn.microsoft.com/dotnet/framework/reflection-and-codedom/how-to-define-and-execute-dynamic-methods Type[] methodArgs = {typeof(int)}; DynamicMethod squareIt = new DynamicMethod( diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/CompatibilitySuppressions.xml b/src/libraries/System.Security.Cryptography.Pkcs/src/CompatibilitySuppressions.xml index 215e9b2af05..edcc855106e 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Security.Cryptography.Pkcs/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0002 diff --git a/src/libraries/System.Security.Cryptography.Xml/src/CompatibilitySuppressions.xml b/src/libraries/System.Security.Cryptography.Xml/src/CompatibilitySuppressions.xml index 4f60bbff6d5..3d73e1ec2e2 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Security.Cryptography.Xml/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0001 diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.StandardProperties.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.StandardProperties.cs index ceb080af407..a2c95d5b958 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.StandardProperties.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.StandardProperties.cs @@ -238,7 +238,7 @@ namespace System.Security.Cryptography switch (curve) { // nistP192 and nistP224 don't have named curve accelerators but we can handle them. - // These string values match the names in https://learn.microsoft.com/en-us/windows/win32/seccng/cng-named-elliptic-curves + // These string values match the names in https://learn.microsoft.com/windows/win32/seccng/cng-named-elliptic-curves case "nistP192": return 192; case "nistP224": return 224; case nameof(ECCurve.NamedCurves.nistP256): return 256; diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CryptoConfig.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CryptoConfig.cs index 0ad4b84fa80..c5a45f8ed76 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CryptoConfig.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CryptoConfig.cs @@ -337,7 +337,7 @@ namespace System.Security.Cryptography switch (name) { #pragma warning disable SYSLIB0021 // Obsolete: derived cryptographic types - // hardcode mapping for SHA* and HMAC* algorithm names from https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.cryptoconfig?view=net-5.0#remarks + // hardcode mapping for SHA* and HMAC* algorithm names from https://learn.microsoft.com/dotnet/api/system.security.cryptography.cryptoconfig?view=net-5.0#remarks case "SHA": case "SHA1": case "System.Security.Cryptography.SHA1": diff --git a/src/libraries/System.Security.Cryptography/tests/CngUtility.cs b/src/libraries/System.Security.Cryptography/tests/CngUtility.cs index 9d23acdf063..b25ed045200 100644 --- a/src/libraries/System.Security.Cryptography/tests/CngUtility.cs +++ b/src/libraries/System.Security.Cryptography/tests/CngUtility.cs @@ -21,14 +21,14 @@ namespace System.Security.Cryptography.Tests return isSupported; } - // https://docs.microsoft.com/windows/win32/api/bcrypt/nf-bcrypt-bcryptclosealgorithmprovider + // https://learn.microsoft.com/windows/win32/api/bcrypt/nf-bcrypt-bcryptclosealgorithmprovider [DllImport(BCRYPT_LIB, CallingConvention = CallingConvention.Winapi)] [DefaultDllImportSearchPaths(DllImportSearchPath.System32)] private static extern int BCryptCloseAlgorithmProvider( [In] IntPtr hAlgorithm, [In] uint dwFlags); - // https://docs.microsoft.com/windows/win32/api/bcrypt/nf-bcrypt-bcryptopenalgorithmprovider + // https://learn.microsoft.com/windows/win32/api/bcrypt/nf-bcrypt-bcryptopenalgorithmprovider [DllImport(BCRYPT_LIB, CallingConvention = CallingConvention.Winapi)] [DefaultDllImportSearchPaths(DllImportSearchPath.System32)] private static extern int BCryptOpenAlgorithmProvider( diff --git a/src/libraries/System.Security.Permissions/src/CompatibilitySuppressions.xml b/src/libraries/System.Security.Permissions/src/CompatibilitySuppressions.xml index 3a242096603..ea58cd3565d 100644 --- a/src/libraries/System.Security.Permissions/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.Security.Permissions/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0002 diff --git a/src/libraries/System.ServiceModel.Syndication/src/CompatibilitySuppressions.xml b/src/libraries/System.ServiceModel.Syndication/src/CompatibilitySuppressions.xml index 552f62c3f1f..c915f43527f 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/CompatibilitySuppressions.xml +++ b/src/libraries/System.ServiceModel.Syndication/src/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0001 diff --git a/src/libraries/System.ServiceProcess.ServiceController/README.md b/src/libraries/System.ServiceProcess.ServiceController/README.md index 1ccd1275244..1d05ab223d4 100644 --- a/src/libraries/System.ServiceProcess.ServiceController/README.md +++ b/src/libraries/System.ServiceProcess.ServiceController/README.md @@ -1,9 +1,9 @@ # System.ServiceProcess.ServiceController -Provides the [`System.ServiceProcess.ServiceController`](https://learn.microsoft.com/en-us/dotnet/api/system.serviceprocess.servicecontroller) class, which allows you to connect to a Windows service, manipulate it, or get information about it. +Provides the [`System.ServiceProcess.ServiceController`](https://learn.microsoft.com/dotnet/api/system.serviceprocess.servicecontroller) class, which allows you to connect to a Windows service, manipulate it, or get information about it. Note that `System.ServiceProcess.ServiceController` supports Windows only. -Documentation can be found at https://learn.microsoft.com/en-us/dotnet/api/system.serviceprocess. +Documentation can be found at https://learn.microsoft.com/dotnet/api/system.serviceprocess. ## Contribution Bar - [x] [We consider new features, new APIs and performance changes](../README.md#primary-bar) diff --git a/src/libraries/System.Text.Json/docs/KeyConverter_spec.md b/src/libraries/System.Text.Json/docs/KeyConverter_spec.md index b382e656e58..175834af08f 100644 --- a/src/libraries/System.Text.Json/docs/KeyConverter_spec.md +++ b/src/libraries/System.Text.Json/docs/KeyConverter_spec.md @@ -37,7 +37,7 @@ Implement an internal custom mechanism that is in charge of converting a defined * We need to define a criteria to choose what types we should support, I suggest to do as Utf8JsonReader/Writer and support the types supported by the Utf8Parser/Formatter. -* Supported types (Types supported by [`Utf8Formatter/Parser`](https://docs.microsoft.com/en-us/dotnet/api/system.buffers.text.utf8formatter?view=netcore-3.1) + a few others that are popular): +* Supported types (Types supported by [`Utf8Formatter/Parser`](https://learn.microsoft.com/dotnet/api/system.buffers.text.utf8formatter?view=netcore-3.1) + a few others that are popular): * Boolean * Byte * DateTime diff --git a/src/libraries/System.Text.Json/docs/ThreatModel.md b/src/libraries/System.Text.Json/docs/ThreatModel.md index f0031f8340c..97b18b9df17 100644 --- a/src/libraries/System.Text.Json/docs/ThreatModel.md +++ b/src/libraries/System.Text.Json/docs/ThreatModel.md @@ -10,17 +10,17 @@ The emphasis of this document is to describe security threats that were consider The notes in this section apply to the following serialization methods: -- [`JsonSerializer.Serialize`](https://docs.microsoft.com/dotnet/api/system.text.json.jsonserializer.serialize?view=net-5.0) -- [`JsonSerializer.SerializeAsync`](https://docs.microsoft.com/dotnet/api/system.text.json.jsonserializer.serializeasync?view=net-5.0) -- [`JsonSerializer.SerializeToUtf8Bytes`](https://docs.microsoft.com/dotnet/api/system.text.json.jsonserializer.serializetoutf8bytes?view=net-5.0) +- [`JsonSerializer.Serialize`](https://learn.microsoft.com/dotnet/api/system.text.json.jsonserializer.serialize?view=net-5.0) +- [`JsonSerializer.SerializeAsync`](https://learn.microsoft.com/dotnet/api/system.text.json.jsonserializer.serializeasync?view=net-5.0) +- [`JsonSerializer.SerializeToUtf8Bytes`](https://learn.microsoft.com/dotnet/api/system.text.json.jsonserializer.serializetoutf8bytes?view=net-5.0) ### Threat: Stack overflow due to circular references -.NET object graphs existing at runtime are generally trusted as inputs to `Utf8JsonWriter` and `JsonSerializer.Serialize` when writing. However, circular references in the instantiated input object graphs may cause a [`StackOverflowException`](https://docs.microsoft.com/dotnet/api/system.stackoverflowexception?view=net-5.0) if not guarded against, and possibly cause the application process to crash. +.NET object graphs existing at runtime are generally trusted as inputs to `Utf8JsonWriter` and `JsonSerializer.Serialize` when writing. However, circular references in the instantiated input object graphs may cause a [`StackOverflowException`](https://learn.microsoft.com/dotnet/api/system.stackoverflowexception?view=net-5.0) if not guarded against, and possibly cause the application process to crash. #### Mitigation -Circular references are detected when writing due to a maximum depth setting (64 by default), and a clear [`JsonException`](https://docs.microsoft.com/dotnet/api/system.text.json.jsonexception?view=net-5.0) is thrown when this depth is exceeded. Note that the reference handling feature implemented by the serializer provides a way to preserve object references on serialization and deserialization. +Circular references are detected when writing due to a maximum depth setting (64 by default), and a clear [`JsonException`](https://learn.microsoft.com/dotnet/api/system.text.json.jsonexception?view=net-5.0) is thrown when this depth is exceeded. Note that the reference handling feature implemented by the serializer provides a way to preserve object references on serialization and deserialization. ### Threat: Unintentional information disclosure @@ -36,8 +36,8 @@ Circular references are detected when writing due to a maximum depth setting (64 The notes in this section apply to the following deserialization methods: -- [`JsonSerializer.Deserialize`](https://docs.microsoft.com/dotnet/api/system.text.json.jsonserializer.deserialize?view=net-5.0) -- [`JsonSerializer.DeserializeAsync`](https://docs.microsoft.com/dotnet/api/system.text.json.jsonserializer.deserializeasync?view=net-5.0) +- [`JsonSerializer.Deserialize`](https://learn.microsoft.com/dotnet/api/system.text.json.jsonserializer.deserialize?view=net-5.0) +- [`JsonSerializer.DeserializeAsync`](https://learn.microsoft.com/dotnet/api/system.text.json.jsonserializer.deserializeasync?view=net-5.0) The `Utf8JsonReader` class, leveraged by `JsonSerializer` for deserialization, accepts arbitrary UTF-8 text or binary data as input, and is therefore expected to handle data from potentially untrusted sources. @@ -79,7 +79,7 @@ This situation can be avoided by being aware of the following points: - Constructors run when `JsonSerializer.Deserialize` deserializes POCOs. Therefore, logic in constructors may participate in state management of the deserialized instance. -- If necessitated by your deserialization scenario, use callbacks to ensure that the object is in a valid state. This is not yet a first-class feature in the serializer, but a workaround is described in the [How to migrate from Newtonsoft.Json to System.Text.Json document](https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to#callbacks). Be aware that this workaround potentially degrades performance. +- If necessitated by your deserialization scenario, use callbacks to ensure that the object is in a valid state. This is not yet a first-class feature in the serializer, but a workaround is described in the [How to migrate from Newtonsoft.Json to System.Text.Json document](https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to#callbacks). Be aware that this workaround potentially degrades performance. - Where applicable, consider validating object graphs deserialized from untrusted data sources before processing them. Each individual object may be in a consistent state, but an object graph as a whole may not be. @@ -139,11 +139,11 @@ By default, the `JsonSerializer` and `Utf8JsonReader` strictly honor the [RFC 82 - When advancing through JSON payloads, the `Utf8JsonReader` validates that the next token does not violate RFC 8529. However, a deserialization converter may decide to validate that the next token is compatible with the target type they wish to obtain. For instance, if you are expecting a `JsonTokenType.Number` the reader will not validate that the next token is not a `JsonTokenType.StartObject`. For such cases, the converter could check the payload and throw a `JsonException` if it is invalid, similar to what the serializer would do. Otherwise, the reader will throw an `InvalidOperationException`. - If a `JsonException` or `NotSupportedException` is thrown from a custom converter without a message, the serializer will append a message that includes the path to the part of the JSON that caused the error. For more information on error handling in converters, see [How to write custom converters for JSON serialization (marshalling) in .NET](https://docs.microsoft.com/dotnet/standard/serialization/system-text-json-converters-how-to?pivots=dotnet-5-0#error-handling). + If a `JsonException` or `NotSupportedException` is thrown from a custom converter without a message, the serializer will append a message that includes the path to the part of the JSON that caused the error. For more information on error handling in converters, see [How to write custom converters for JSON serialization (marshalling) in .NET](https://learn.microsoft.com/dotnet/standard/serialization/system-text-json-converters-how-to?pivots=dotnet-5-0#error-handling). ## `JsonSerializerOptions` -The notes in this section apply to usages of the [`JsonSerializerOptions`](https://docs.microsoft.com/dotnet/api/system.text.json.jsonserializeroptions?view=net-5.0) type. +The notes in this section apply to usages of the [`JsonSerializerOptions`](https://learn.microsoft.com/dotnet/api/system.text.json.jsonserializeroptions?view=net-5.0) type. ### Threat: Poor CPU throughput due to not caching custom `JsonSerializerOptions` instances @@ -193,7 +193,7 @@ Be sure to maintain an upper bound to the number of types being passed to `JsonS - The serializer, reader, and writer strictly honor the [RFC 8259 specification](https://tools.ietf.org/html/rfc8259) by default, but more permissive settings such as allowing trailing commas, allowing quoted numbers, and allowing, skipping, or disallowing both single-line and multi-line comments can be opted-into with `JsonSerializerOptions` and `JsonReaderOptions`. -- The serializer has a built-in converter for `DateTime` and `DateTimeOffset` types which parses and formats according to the ISO 8601:1-2019 extended profile. The specification and information about workarounds using custom converters is documented in the docs website: https://docs.microsoft.com/en-us/dotnet/standard/datetime/system-text-json-support. +- The serializer has a built-in converter for `DateTime` and `DateTimeOffset` types which parses and formats according to the ISO 8601:1-2019 extended profile. The specification and information about workarounds using custom converters is documented in the docs website: https://learn.microsoft.com/dotnet/standard/datetime/system-text-json-support. - The reference handling feature utilizes a non-standard JSON schema adopted from `Newtonsoft.Json` in which "$id", "$ref", and "$values" metadata properties are interspersed in JSON to allow keeping track of object references. When deserializing, this allows objects to point to each other in the resulting instance. When serializing, the resulting JSON is formatted using the previously mentioned representation. This feature is opt-in only (not enabled by default). When the feature is enabled, any deviation from the expected metadata in the input payloads when deserializing will cause a `JsonException` to be thrown. diff --git a/src/libraries/System.Text.Json/src/Resources/Strings.resx b/src/libraries/System.Text.Json/src/Resources/Strings.resx index cebea68790a..e65049fbb87 100644 --- a/src/libraries/System.Text.Json/src/Resources/Strings.resx +++ b/src/libraries/System.Text.Json/src/Resources/Strings.resx @@ -304,7 +304,7 @@ Expected a digit ('0'-'9'), but instead reached end of data. - .NET number values such as positive and negative infinity cannot be written as valid JSON. To make it work when using 'JsonSerializer', consider specifying 'JsonNumberHandling.AllowNamedFloatingPointLiterals' (see https://docs.microsoft.com/dotnet/api/system.text.json.serialization.jsonnumberhandling). + .NET number values such as positive and negative infinity cannot be written as valid JSON. To make it work when using 'JsonSerializer', consider specifying 'JsonNumberHandling.AllowNamedFloatingPointLiterals' (see https://learn.microsoft.com/dotnet/api/system.text.json.serialization.jsonnumberhandling). The JSON value of length {0} is too large and not supported. diff --git a/src/libraries/System.Text.RegularExpressions/README.md b/src/libraries/System.Text.RegularExpressions/README.md index 15a343b568a..49e6da19475 100644 --- a/src/libraries/System.Text.RegularExpressions/README.md +++ b/src/libraries/System.Text.RegularExpressions/README.md @@ -1,5 +1,5 @@ # System.Text.RegularExpressions -This assembly provides regular expression functionality. The main type contained in the assembly is [Regex](https://learn.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex) class, which represents an immutable regular expression object which can be used to test for matches on given input strings or spans. +This assembly provides regular expression functionality. The main type contained in the assembly is [Regex](https://learn.microsoft.com/dotnet/api/system.text.regularexpressions.regex) class, which represents an immutable regular expression object which can be used to test for matches on given input strings or spans. Documentation can be found at https://learn.microsoft.com/dotnet/api/system.text.regularexpressions. diff --git a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/GeneratedRegexAttribute.cs b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/GeneratedRegexAttribute.cs index 838527ebb78..9e44d0f9225 100644 --- a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/GeneratedRegexAttribute.cs +++ b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/GeneratedRegexAttribute.cs @@ -42,7 +42,7 @@ public sealed class GeneratedRegexAttribute : Attribute /// A bitwise combination of the enumeration values that modify the regular expression. /// The name of a culture to be used for case sensitive comparisons. is not case-sensitive. /// - /// For a list of predefined culture names on Windows systems, see the Language tag column in the list of + /// For a list of predefined culture names on Windows systems, see the Language tag column in the list of /// language/region names suported by Windows. Culture names follow the standard defined by BCP 47. In addition, /// starting with Windows 10, can be any valid BCP-47 language tag. /// @@ -66,7 +66,7 @@ public sealed class GeneratedRegexAttribute : Attribute /// A time-out interval (milliseconds), or to indicate that the method should not time out. /// The name of a culture to be used for case sensitive comparisons. is not case-sensitive. /// - /// For a list of predefined culture names on Windows systems, see the Language tag column in the list of + /// For a list of predefined culture names on Windows systems, see the Language tag column in the list of /// language/region names suported by Windows. Culture names follow the standard defined by BCP 47. In addition, /// starting with Windows 10, can be any valid BCP-47 language tag. /// diff --git a/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/Regex.KnownPattern.Tests.cs b/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/Regex.KnownPattern.Tests.cs index e7fe42f1cb1..d71726deea0 100644 --- a/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/Regex.KnownPattern.Tests.cs +++ b/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/Regex.KnownPattern.Tests.cs @@ -18,10 +18,10 @@ namespace System.Text.RegularExpressions.Tests public class RegexKnownPatternTests { // - // These patterns come from the Regex documentation at docs.microsoft.com. + // These patterns come from the Regex documentation at https://learn.microsoft.com. // - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-example-scanning-for-hrefs + // https://learn.microsoft.com/dotnet/standard/base-types/regular-expression-example-scanning-for-hrefs [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_Examples_ScanningHrefs(RegexEngine engine) @@ -59,7 +59,7 @@ namespace System.Text.RegularExpressions.Tests Assert.False(m.Success); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-example-changing-date-formats + // https://learn.microsoft.com/dotnet/standard/base-types/regular-expression-example-changing-date-formats [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_Examples_MDYtoDMY(RegexEngine engine) @@ -70,7 +70,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal("08-01-2020", r.Replace(dt, "${day}-${month}-${year}")); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/how-to-extract-a-protocol-and-port-number-from-a-url + // https://learn.microsoft.com/dotnet/standard/base-types/how-to-extract-a-protocol-and-port-number-from-a-url [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_Examples_ExtractProtocolPort(RegexEngine engine) @@ -108,7 +108,7 @@ namespace System.Text.RegularExpressions.Tests } } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/how-to-verify-that-strings-are-in-valid-email-format + // https://learn.microsoft.com/dotnet/standard/base-types/how-to-verify-that-strings-are-in-valid-email-format [Theory] [MemberData(nameof(Docs_Examples_ValidateEmail_TestData))] public async Task Docs_Examples_ValidateEmail(RegexEngine engine, string email, bool expectedIsValid) @@ -153,7 +153,7 @@ namespace System.Text.RegularExpressions.Tests } } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#matched_subexpression + // https://learn.microsoft.com/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#matched_subexpression [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_GroupingConstructs_MatchedSubexpression(RegexEngine engine) @@ -185,7 +185,7 @@ namespace System.Text.RegularExpressions.Tests Assert.False(match.NextMatch().Success); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#named-matched-subexpressions + // https://learn.microsoft.com/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#named-matched-subexpressions [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_GroupingConstructs_NamedMatchedSubexpression1(RegexEngine engine) @@ -217,7 +217,7 @@ namespace System.Text.RegularExpressions.Tests Assert.False(match.NextMatch().Success); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#named-matched-subexpressions + // https://learn.microsoft.com/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#named-matched-subexpressions [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_GroupingConstructs_NamedMatchedSubexpression2(RegexEngine engine) @@ -264,7 +264,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal(expected, actual.ToString()); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#balancing-group-definitions + // https://learn.microsoft.com/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#balancing-group-definitions [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_GroupingConstructs_BalancingGroups(RegexEngine engine) @@ -331,7 +331,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal(expected, actual.ToString()); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#noncapturing-groups + // https://learn.microsoft.com/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#noncapturing-groups [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_GroupingConstructs_NoncapturingGroups(RegexEngine engine) @@ -347,7 +347,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal(1, match.Groups.Count); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#group-options + // https://learn.microsoft.com/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#group-options [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_GroupingConstructs_GroupOptions(RegexEngine engine) @@ -370,7 +370,7 @@ namespace System.Text.RegularExpressions.Tests Assert.False(match.NextMatch().Success); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#zero-width-positive-lookahead-assertions + // https://learn.microsoft.com/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#zero-width-positive-lookahead-assertions [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_GroupingConstructs_ZeroWidthPositiveLookaheadAssertions(RegexEngine engine) @@ -401,7 +401,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal("Sunday", match.Value); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#zero-width-negative-lookahead-assertions + // https://learn.microsoft.com/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#zero-width-negative-lookahead-assertions [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_GroupingConstructs_ZeroWidthNegativeLookaheadAssertions(RegexEngine engine) @@ -424,7 +424,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal("ultimate", matches[3].Value); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#zero-width-positive-lookbehind-assertions + // https://learn.microsoft.com/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#zero-width-positive-lookbehind-assertions [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_GroupingConstructs_ZeroWidthPositiveLookbehindAssertions(RegexEngine engine) @@ -445,7 +445,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal("09", matches[1].Value); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#zero-width-negative-lookbehind-assertions + // https://learn.microsoft.com/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#zero-width-negative-lookbehind-assertions [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_GroupingConstructs_ZeroWidthNegativeLookbehindAssertions(RegexEngine engine) @@ -467,7 +467,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal("February 8, 2010", r.Match("Monday, February 8, 2010").Value); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#nonbacktracking-subexpressions + // https://learn.microsoft.com/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#nonbacktracking-subexpressions [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_GroupingConstructs_NonbacktrackingSubexpressions(RegexEngine engine) @@ -503,7 +503,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal("aaaa", back.Value); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#grouping-constructs-and-regular-expression-objects + // https://learn.microsoft.com/dotnet/standard/base-types/grouping-constructs-in-regular-expressions#grouping-constructs-and-regular-expression-objects [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_GroupingConstructs_GroupCaptureRelationship(RegexEngine engine) @@ -552,7 +552,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal(expected, actual.ToString()); } - // https://docs.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.capture?view=netcore-3.1#examples + // https://learn.microsoft.com/dotnet/api/system.text.regularexpressions.capture?view=netcore-3.1#examples [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_Capture_Sentences(RegexEngine engine) @@ -610,7 +610,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal(expected, actual.ToString()); } - // https://docs.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.capture.value?view=netcore-3.1 + // https://learn.microsoft.com/dotnet/api/system.text.regularexpressions.capture.value?view=netcore-3.1 [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_Capture_ProductNumber(RegexEngine engine) @@ -706,7 +706,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal(expected, actual.ToString()); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/backtracking-in-regular-expressions#linear-comparison-without-backtracking + // https://learn.microsoft.com/dotnet/standard/base-types/backtracking-in-regular-expressions#linear-comparison-without-backtracking [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_Backtracking_LinearComparisonWithoutBacktracking(RegexEngine engine) @@ -722,7 +722,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal(11, matches[0].Index); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/backtracking-in-regular-expressions#backtracking-with-optional-quantifiers-or-alternation-constructs + // https://learn.microsoft.com/dotnet/standard/base-types/backtracking-in-regular-expressions#backtracking-with-optional-quantifiers-or-alternation-constructs [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_Backtracking_WithOptionalQuantifiersOrAlternationConstructs(RegexEngine engine) @@ -741,7 +741,7 @@ namespace System.Text.RegularExpressions.Tests Assert.False(m.NextMatch().Success); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/backtracking-in-regular-expressions#nonbacktracking-subexpression + // https://learn.microsoft.com/dotnet/standard/base-types/backtracking-in-regular-expressions#nonbacktracking-subexpression [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_Backtracking_WithNestedOptionalQuantifiers_BacktrackingEliminated(RegexEngine engine) @@ -755,7 +755,7 @@ namespace System.Text.RegularExpressions.Tests Assert.False(r.IsMatch(Input)); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/backtracking-in-regular-expressions#lookbehind-assertions + // https://learn.microsoft.com/dotnet/standard/base-types/backtracking-in-regular-expressions#lookbehind-assertions [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_Backtracking_LookbehindAssertions(RegexEngine engine) @@ -775,7 +775,7 @@ namespace System.Text.RegularExpressions.Tests Assert.True(rBehindPattern.IsMatch(Input)); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/backtracking-in-regular-expressions#lookahead-assertions + // https://learn.microsoft.com/dotnet/standard/base-types/backtracking-in-regular-expressions#lookahead-assertions [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Doesn't support NonBacktracking")] [Theory] [InlineData(RegexEngine.NonBacktracking)] @@ -785,7 +785,7 @@ namespace System.Text.RegularExpressions.Tests Assert.False(r.IsMatch("aaaaaaaaaaaaaaaaaaaaaa.")); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/backtracking-in-regular-expressions#lookahead-assertions + // https://learn.microsoft.com/dotnet/standard/base-types/backtracking-in-regular-expressions#lookahead-assertions [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_Backtracking_LookaheadAssertions_BacktrackingEliminated(RegexEngine engine) @@ -800,7 +800,7 @@ namespace System.Text.RegularExpressions.Tests Assert.False(r.IsMatch("aaaaaaaaaaaaaaaaaaaaaa.")); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/details-of-regular-expression-behavior#net-framework-engine-capabilities + // https://learn.microsoft.com/dotnet/standard/base-types/details-of-regular-expression-behavior#net-framework-engine-capabilities [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_EngineCapabilities_LazyQuantifiers(RegexEngine engine) @@ -818,7 +818,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal("107325", match.Groups[1].Value); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/details-of-regular-expression-behavior#net-framework-engine-capabilities + // https://learn.microsoft.com/dotnet/standard/base-types/details-of-regular-expression-behavior#net-framework-engine-capabilities [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_EngineCapabilities_PositiveLookahead(RegexEngine engine) @@ -841,7 +841,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal("comes", matches[2].Value); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/details-of-regular-expression-behavior#net-framework-engine-capabilities + // https://learn.microsoft.com/dotnet/standard/base-types/details-of-regular-expression-behavior#net-framework-engine-capabilities [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_EngineCapabilities_NegativeLookahead(RegexEngine engine) @@ -865,7 +865,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal("functional", matches[3].Value); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/alternation-constructs-in-regular-expressions#conditional-matching-with-an-expression + // https://learn.microsoft.com/dotnet/standard/base-types/alternation-constructs-in-regular-expressions#conditional-matching-with-an-expression [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_EngineCapabilities_ConditionalEvaluation(RegexEngine engine) @@ -891,7 +891,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal(22, matches[1].Index); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/details-of-regular-expression-behavior#net-framework-engine-capabilities + // https://learn.microsoft.com/dotnet/standard/base-types/details-of-regular-expression-behavior#net-framework-engine-capabilities [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_EngineCapabilities_RightToLeftMatching(RegexEngine engine) @@ -919,7 +919,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal("107325", match.Groups[1].Value); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/details-of-regular-expression-behavior#net-framework-engine-capabilities + // https://learn.microsoft.com/dotnet/standard/base-types/details-of-regular-expression-behavior#net-framework-engine-capabilities [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_EngineCapabilities_PositiveNegativeLookbehind(RegexEngine engine) @@ -941,7 +941,7 @@ namespace System.Text.RegularExpressions.Tests Assert.False(r.IsMatch("me.myself!")); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/miscellaneous-constructs-in-regular-expressions#inline-options + // https://learn.microsoft.com/dotnet/standard/base-types/miscellaneous-constructs-in-regular-expressions#inline-options [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_InlineOptions(RegexEngine engine) @@ -988,7 +988,7 @@ namespace System.Text.RegularExpressions.Tests Assert.Equal(expected, actual.ToString()); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/miscellaneous-constructs-in-regular-expressions#inline-comment + // https://learn.microsoft.com/dotnet/standard/base-types/miscellaneous-constructs-in-regular-expressions#inline-comment [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_InlineComment(RegexEngine engine) @@ -1013,7 +1013,7 @@ namespace System.Text.RegularExpressions.Tests Assert.False(match.NextMatch().Success); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/miscellaneous-constructs-in-regular-expressions#end-of-line-comment + // https://learn.microsoft.com/dotnet/standard/base-types/miscellaneous-constructs-in-regular-expressions#end-of-line-comment [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_EndOfLineComment(RegexEngine engine) @@ -1026,7 +1026,7 @@ namespace System.Text.RegularExpressions.Tests Assert.True(r.IsMatch(Input)); } - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/anchors-in-regular-expressions#contiguous-matches-g + // https://learn.microsoft.com/dotnet/standard/base-types/anchors-in-regular-expressions#contiguous-matches-g [Theory] [MemberData(nameof(RegexHelpers.AvailableEngines_MemberData), MemberType = typeof(RegexHelpers))] public async Task Docs_Anchors_ContiguousMatches(RegexEngine engine) diff --git a/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/RegexCharacterSetTests.cs b/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/RegexCharacterSetTests.cs index cd601fca941..2eb52774c33 100644 --- a/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/RegexCharacterSetTests.cs +++ b/src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/RegexCharacterSetTests.cs @@ -359,7 +359,7 @@ namespace System.Text.RegularExpressions.Tests { foreach (RegexEngine engine in RegexHelpers.AvailableEngines) { - // https://docs.microsoft.com/en-us/dotnet/standard/base-types/character-classes-in-regular-expressions#supported-unicode-general-categories + // https://learn.microsoft.com/dotnet/standard/base-types/character-classes-in-regular-expressions#supported-unicode-general-categories yield return new object[] { engine, "L", new[] { UnicodeCategory.UppercaseLetter, UnicodeCategory.LowercaseLetter, UnicodeCategory.TitlecaseLetter, UnicodeCategory.ModifierLetter, UnicodeCategory.OtherLetter } }; yield return new object[] { engine, "Lu", new[] { UnicodeCategory.UppercaseLetter } }; diff --git a/src/libraries/System.Threading.AccessControl/src/System/Security/AccessControl/EventWaitHandleSecurity.cs b/src/libraries/System.Threading.AccessControl/src/System/Security/AccessControl/EventWaitHandleSecurity.cs index 222df279a5e..88a96bee485 100644 --- a/src/libraries/System.Threading.AccessControl/src/System/Security/AccessControl/EventWaitHandleSecurity.cs +++ b/src/libraries/System.Threading.AccessControl/src/System/Security/AccessControl/EventWaitHandleSecurity.cs @@ -21,7 +21,7 @@ using Microsoft.Win32.SafeHandles; namespace System.Security.AccessControl { // Derive this list of values from winnt.h and MSDN docs: - // https://docs.microsoft.com/en-us/windows/desktop/sync/synchronization-object-security-and-access-rights + // https://learn.microsoft.com/windows/desktop/sync/synchronization-object-security-and-access-rights // Win32's interesting values are EVENT_MODIFY_STATE (0x0002) and // EVENT_ALL_ACCESS (0x1F0003). I don't know what 0x1 is, but Windows diff --git a/src/libraries/System.Threading.AccessControl/src/System/Security/AccessControl/MutexSecurity.cs b/src/libraries/System.Threading.AccessControl/src/System/Security/AccessControl/MutexSecurity.cs index 26970fdf6aa..c775aed0dd6 100644 --- a/src/libraries/System.Threading.AccessControl/src/System/Security/AccessControl/MutexSecurity.cs +++ b/src/libraries/System.Threading.AccessControl/src/System/Security/AccessControl/MutexSecurity.cs @@ -21,7 +21,7 @@ using Microsoft.Win32.SafeHandles; namespace System.Security.AccessControl { // Derive this list of values from winnt.h and MSDN docs: - // https://docs.microsoft.com/en-us/windows/desktop/sync/synchronization-object-security-and-access-rights + // https://learn.microsoft.com/windows/desktop/sync/synchronization-object-security-and-access-rights // In order to call ReleaseMutex, you must have an ACL granting you // MUTEX_MODIFY_STATE rights (0x0001). The other interesting value diff --git a/src/libraries/System.Threading.AccessControl/src/System/Security/AccessControl/SemaphoreSecurity.cs b/src/libraries/System.Threading.AccessControl/src/System/Security/AccessControl/SemaphoreSecurity.cs index 34597415e48..1cd2b7fffb1 100644 --- a/src/libraries/System.Threading.AccessControl/src/System/Security/AccessControl/SemaphoreSecurity.cs +++ b/src/libraries/System.Threading.AccessControl/src/System/Security/AccessControl/SemaphoreSecurity.cs @@ -20,7 +20,7 @@ using Microsoft.Win32.SafeHandles; namespace System.Security.AccessControl { // Derive this list of values from winnt.h and MSDN docs: - // https://docs.microsoft.com/en-us/windows/desktop/sync/synchronization-object-security-and-access-rights + // https://learn.microsoft.com/windows/desktop/sync/synchronization-object-security-and-access-rights // Win32's interesting values are SEMAPHORE_MODIFY_STATE (0x2) and // SEMAPHORE_ALL_ACCESS (0x1F0003). I don't know what 0x1 is. diff --git a/src/libraries/System.Threading.AccessControl/tests/EventWaitHandleAclTests.cs b/src/libraries/System.Threading.AccessControl/tests/EventWaitHandleAclTests.cs index 3e9324e442f..61cd59035b7 100644 --- a/src/libraries/System.Threading.AccessControl/tests/EventWaitHandleAclTests.cs +++ b/src/libraries/System.Threading.AccessControl/tests/EventWaitHandleAclTests.cs @@ -83,7 +83,7 @@ namespace System.Threading.Tests } // The documentation says MAX_PATH is the length limit for name, but it won't throw any errors: - // https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-createeventexw + // https://learn.microsoft.com/windows/win32/api/synchapi/nf-synchapi-createeventexw // The .NET Core constructors for EventWaitHandle do not throw on name longer than MAX_LENGTH, so the extension method should match the behavior: // https://source.dot.net/#System.Private.CoreLib/shared/System/Threading/EventWaitHandle.Windows.cs,20 // The .NET Framework constructor throws: diff --git a/src/libraries/System.Threading.Tasks.Parallel/tests/BreakTests.cs b/src/libraries/System.Threading.Tasks.Parallel/tests/BreakTests.cs index 526f944a103..6cfec4f9e74 100644 --- a/src/libraries/System.Threading.Tasks.Parallel/tests/BreakTests.cs +++ b/src/libraries/System.Threading.Tasks.Parallel/tests/BreakTests.cs @@ -140,7 +140,7 @@ namespace System.Threading.Tasks.Tests Parallel.ForEach(mop, delegate(int item, ParallelLoopState ps, long index) { //break does not imply that the other iterations will not be run - //https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.parallelloopstate.break#System_Threading_Tasks_ParallelLoopState_Break + //https://learn.microsoft.com/dotnet/api/system.threading.tasks.parallelloopstate.break#System_Threading_Tasks_ParallelLoopState_Break //execute the test with high loop size and low break index complete[index] = true; if (index >= breakpoint) ps.Break(); diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/IPrepareInfo.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/IPrepareInfo.cs index 70a23d235a5..5df6a795b29 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/IPrepareInfo.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/IPrepareInfo.cs @@ -6,7 +6,7 @@ using System.Runtime.InteropServices.Marshalling; namespace System.Transactions.DtcProxyShim.DtcInterfaces; -// https://docs.microsoft.com/previous-versions/windows/desktop/ms686533(v=vs.85) +// https://learn.microsoft.com/previous-versions/windows/desktop/ms686533(v=vs.85) [GeneratedComInterface, Guid("80c7bfd0-87ee-11ce-8081-0080c758527e"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] internal partial interface IPrepareInfo { diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/IResourceManager.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/IResourceManager.cs index b10be08d5f4..f47e892dc2e 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/IResourceManager.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/IResourceManager.cs @@ -6,7 +6,7 @@ using System.Runtime.InteropServices.Marshalling; namespace System.Transactions.DtcProxyShim.DtcInterfaces; -// https://docs.microsoft.com/previous-versions/windows/desktop/ms681790(v=vs.85) +// https://learn.microsoft.com/previous-versions/windows/desktop/ms681790(v=vs.85) [GeneratedComInterface, Guid(Guids.IID_IResourceManager), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] internal partial interface IResourceManager { diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/IResourceManagerFactory2.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/IResourceManagerFactory2.cs index e29ed9a7a5b..02b477e3700 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/IResourceManagerFactory2.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/IResourceManagerFactory2.cs @@ -6,7 +6,7 @@ using System.Runtime.InteropServices.Marshalling; namespace System.Transactions.DtcProxyShim.DtcInterfaces; -// https://docs.microsoft.com/previous-versions/windows/desktop/ms686489(v=vs.85) +// https://learn.microsoft.com/previous-versions/windows/desktop/ms686489(v=vs.85) [GeneratedComInterface, Guid("6B369C21-FBD2-11d1-8F47-00C04F8EE57D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] internal partial interface IResourceManagerFactory2 { diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/IResourceManagerSink.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/IResourceManagerSink.cs index b39510bb57e..641a9346cac 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/IResourceManagerSink.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/IResourceManagerSink.cs @@ -6,7 +6,7 @@ using System.Runtime.InteropServices.Marshalling; namespace System.Transactions.DtcProxyShim.DtcInterfaces; -// https://docs.microsoft.com/previous-versions/windows/desktop/ms686073(v=vs.85) +// https://learn.microsoft.com/previous-versions/windows/desktop/ms686073(v=vs.85) [GeneratedComInterface, Guid("0D563181-DEFB-11CE-AED1-00AA0051E2C4"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] internal partial interface IResourceManagerSink { diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITmNodeName.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITmNodeName.cs index 4b6b4df3aab..6782c22f437 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITmNodeName.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITmNodeName.cs @@ -6,7 +6,7 @@ using System.Runtime.InteropServices.Marshalling; namespace System.Transactions.DtcProxyShim.DtcInterfaces; -// https://docs.microsoft.com/previous-versions/windows/desktop/ms687122(v=vs.85) +// https://learn.microsoft.com/previous-versions/windows/desktop/ms687122(v=vs.85) [GeneratedComInterface, Guid("30274F88-6EE4-474e-9B95-7807BC9EF8CF"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] internal partial interface ITmNodeName { diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransaction.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransaction.cs index 6a162124f79..248a47eb24e 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransaction.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransaction.cs @@ -6,7 +6,7 @@ using System.Runtime.InteropServices.Marshalling; namespace System.Transactions.DtcProxyShim.DtcInterfaces; -// https://docs.microsoft.com/previous-versions/windows/desktop/ms686531(v=vs.85) +// https://learn.microsoft.com/previous-versions/windows/desktop/ms686531(v=vs.85) [GeneratedComInterface, Guid(Guids.IID_ITransaction), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] internal partial interface ITransaction { diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionCloner.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionCloner.cs index 3a513b69ecd..f688a0340fa 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionCloner.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionCloner.cs @@ -6,7 +6,7 @@ using System.Runtime.InteropServices.Marshalling; namespace System.Transactions.DtcProxyShim.DtcInterfaces; -// https://docs.microsoft.com/previous-versions/windows/desktop/ms684377(v=vs.85) +// https://learn.microsoft.com/previous-versions/windows/desktop/ms684377(v=vs.85) [GeneratedComInterface, Guid("02656950-2152-11d0-944C-00A0C905416E"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] internal partial interface ITransactionCloner { diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionDispenser.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionDispenser.cs index 8d0a1d7c2ed..461403d2fb5 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionDispenser.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionDispenser.cs @@ -8,7 +8,7 @@ using System.Transactions.Oletx; namespace System.Transactions.DtcProxyShim.DtcInterfaces; -// https://docs.microsoft.com/previous-versions/windows/desktop/ms687604(v=vs.85) +// https://learn.microsoft.com/previous-versions/windows/desktop/ms687604(v=vs.85) [GeneratedComInterface, Guid(Guids.IID_ITransactionDispenser), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] internal partial interface ITransactionDispenser { diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionEnlistmentAsync.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionEnlistmentAsync.cs index e5a2d36b2cd..b0862b8410f 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionEnlistmentAsync.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionEnlistmentAsync.cs @@ -6,7 +6,7 @@ using System.Runtime.InteropServices.Marshalling; namespace System.Transactions.DtcProxyShim.DtcInterfaces; -// https://docs.microsoft.com/previous-versions/windows/desktop/ms686429(v=vs.85) +// https://learn.microsoft.com/previous-versions/windows/desktop/ms686429(v=vs.85) [GeneratedComInterface, Guid("0fb15081-af41-11ce-bd2b-204c4f4f5020"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] internal partial interface ITransactionEnlistmentAsync { diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionExport.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionExport.cs index 7fd2822a719..0b557693d3d 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionExport.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionExport.cs @@ -6,7 +6,7 @@ using System.Runtime.InteropServices.Marshalling; namespace System.Transactions.DtcProxyShim.DtcInterfaces; -// https://docs.microsoft.com/previous-versions/windows/desktop/ms678954(v=vs.85) +// https://learn.microsoft.com/previous-versions/windows/desktop/ms678954(v=vs.85) [GeneratedComInterface, Guid("0141fda5-8fc0-11ce-bd18-204c4f4f5020"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] internal partial interface ITransactionExport { diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionExportFactory.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionExportFactory.cs index 672f4576cb0..48ae5356b70 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionExportFactory.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionExportFactory.cs @@ -6,7 +6,7 @@ using System.Runtime.InteropServices.Marshalling; namespace System.Transactions.DtcProxyShim.DtcInterfaces; -// https://docs.microsoft.com/previous-versions/windows/desktop/ms686771(v=vs.85) +// https://learn.microsoft.com/previous-versions/windows/desktop/ms686771(v=vs.85) [GeneratedComInterface, Guid("E1CF9B53-8745-11ce-A9BA-00AA006C3706"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] internal partial interface ITransactionExportFactory { diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionImport.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionImport.cs index 57d4656e878..9246a6de83a 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionImport.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionImport.cs @@ -6,7 +6,7 @@ using System.Runtime.InteropServices.Marshalling; namespace System.Transactions.DtcProxyShim.DtcInterfaces; -// https://docs.microsoft.com/previous-versions/windows/desktop/ms681296(v=vs.85) +// https://learn.microsoft.com/previous-versions/windows/desktop/ms681296(v=vs.85) [GeneratedComInterface, Guid("E1CF9B5A-8745-11ce-A9BA-00AA006C3706"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] internal partial interface ITransactionImport { diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionImportWhereabouts.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionImportWhereabouts.cs index 58b3d2f4b07..e88c4a381f1 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionImportWhereabouts.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionImportWhereabouts.cs @@ -6,7 +6,7 @@ using System.Runtime.InteropServices.Marshalling; namespace System.Transactions.DtcProxyShim.DtcInterfaces; -// https://docs.microsoft.com/previous-versions/windows/desktop/ms682783(v=vs.85) +// https://learn.microsoft.com/previous-versions/windows/desktop/ms682783(v=vs.85) [GeneratedComInterface, Guid("0141fda4-8fc0-11ce-bd18-204c4f4f5020"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] internal partial interface ITransactionImportWhereabouts { diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionOptions.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionOptions.cs index 3a894ecfc0a..2984dbe575e 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionOptions.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionOptions.cs @@ -6,7 +6,7 @@ using System.Runtime.InteropServices.Marshalling; namespace System.Transactions.DtcProxyShim.DtcInterfaces; -// https://docs.microsoft.com/previous-versions/windows/desktop/ms686489(v=vs.85) +// https://learn.microsoft.com/previous-versions/windows/desktop/ms686489(v=vs.85) [GeneratedComInterface, Guid("3A6AD9E0-23B9-11cf-AD60-00AA00A74CCD"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] internal partial interface ITransactionOptions { diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionOutcomeEvents.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionOutcomeEvents.cs index 6d26bbba05a..bafb3a79a02 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionOutcomeEvents.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionOutcomeEvents.cs @@ -6,7 +6,7 @@ using System.Runtime.InteropServices; namespace System.Transactions.DtcProxyShim.DtcInterfaces; // Keep this type as a ComImport type as it is used with IConnectionPointContainer (and as a result needs to use built-in COM). -// https://docs.microsoft.com/previous-versions/windows/desktop/ms686465(v=vs.85) +// https://learn.microsoft.com/previous-versions/windows/desktop/ms686465(v=vs.85) [ComImport, Guid("3A6AD9E2-23B9-11cf-AD60-00AA00A74CCD"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] internal interface ITransactionOutcomeEvents { diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionPhase0EnlistmentAsync.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionPhase0EnlistmentAsync.cs index c77761e188c..3ccb0220e30 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionPhase0EnlistmentAsync.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/DtcInterfaces/ITransactionPhase0EnlistmentAsync.cs @@ -6,7 +6,7 @@ using System.Runtime.InteropServices.Marshalling; namespace System.Transactions.DtcProxyShim.DtcInterfaces; -// https://docs.microsoft.com/previous-versions/windows/desktop/ms685087(v=vs.85). _eventHandle = notificationEventHandle; - // https://docs.microsoft.com/previous-versions/windows/desktop/ms678898(v=vs.85) + // https://learn.microsoft.com/previous-versions/windows/desktop/ms678898(v=vs.85) [LibraryImport(Interop.Libraries.Xolehlp, StringMarshalling = StringMarshalling.Utf16)] [RequiresUnreferencedCode(TransactionManager.DistributedTransactionTrimmingWarning)] private static unsafe partial int DtcGetTransactionManagerExW( diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/Xactopt.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/Xactopt.cs index 338df459023..fa4fe6c0c85 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/Xactopt.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/Xactopt.cs @@ -7,7 +7,7 @@ using System.Text; namespace System.Transactions.DtcProxyShim; -// https://docs.microsoft.com/previous-versions/windows/desktop/ms679195(v=vs.85) +// https://learn.microsoft.com/previous-versions/windows/desktop/ms679195(v=vs.85) [NativeMarshalling(typeof(Marshaller))] [StructLayout(LayoutKind.Sequential)] internal struct Xactopt diff --git a/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.xml b/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.xml index 935f4a69d11..16090c5ea42 100644 --- a/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.xml +++ b/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.xml @@ -1,5 +1,5 @@  - + CP0014 diff --git a/src/libraries/apicompat/ApiCompatBaseline.netstandard2.0.xml b/src/libraries/apicompat/ApiCompatBaseline.netstandard2.0.xml index 939342fce86..16b5aad8431 100644 --- a/src/libraries/apicompat/ApiCompatBaseline.netstandard2.0.xml +++ b/src/libraries/apicompat/ApiCompatBaseline.netstandard2.0.xml @@ -1,5 +1,5 @@  - + CP0001 diff --git a/src/libraries/apicompat/ApiCompatBaseline.netstandard2.1.xml b/src/libraries/apicompat/ApiCompatBaseline.netstandard2.1.xml index f0ef02d93c1..999352135ae 100644 --- a/src/libraries/apicompat/ApiCompatBaseline.netstandard2.1.xml +++ b/src/libraries/apicompat/ApiCompatBaseline.netstandard2.1.xml @@ -1,5 +1,5 @@  - + CP0014 diff --git a/src/mono/browser/README.md b/src/mono/browser/README.md index ced0882ae83..a306ddedf39 100644 --- a/src/mono/browser/README.md +++ b/src/mono/browser/README.md @@ -157,7 +157,7 @@ To run a test with `FooBar` in the name: `make run-debugger-tests TEST_FILTER=FooBar` -(See https://docs.microsoft.com/en-us/dotnet/core/testing/selective-unit-tests?pivots=xunit for filter options) +(See https://learn.microsoft.com/dotnet/core/testing/selective-unit-tests?pivots=xunit for filter options) Additional arguments for `dotnet test` can be passed via `MSBUILD_ARGS` or `TEST_ARGS`. For example `MSBUILD_ARGS="/p:WasmDebugLevel=5"`. Though only one of `TEST_ARGS`, or `TEST_FILTER` can be used at a time. @@ -189,7 +189,7 @@ Also check [bench](../sample/wasm/browser-bench/README.md) sample to measure mon The wasm templates, located in the `templates` directory, are templates for `dotnet new`, VS and VS for Mac. They are packaged and distributed as part of the `wasm-experimental` workload. We have 2 templates, `wasmbrowser` and `wasmconsole`, for browser and console WebAssembly applications. -For details about using `dotnet new` see the dotnet tool [documentation](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-new). +For details about using `dotnet new` see the dotnet tool [documentation](https://learn.microsoft.com/dotnet/core/tools/dotnet-new). To test changes in the templates, use `dotnet new install --force src/mono/wasm/templates/templates/browser`. diff --git a/src/mono/browser/runtime/diagnostics/index.ts b/src/mono/browser/runtime/diagnostics/index.ts index f8f93f6781a..622a31f97fd 100644 --- a/src/mono/browser/runtime/diagnostics/index.ts +++ b/src/mono/browser/runtime/diagnostics/index.ts @@ -87,7 +87,7 @@ function diagnostic_options_from_environment (): DiagnosticOptions | null { } /// Parse a DOTNET_DiagnosticPorts string and return a DiagnosticOptions object. -/// See https://docs.microsoft.com/en-us/dotnet/core/diagnostics/diagnostic-port#configure-additional-diagnostic-ports +/// See https://learn.microsoft.com/dotnet/core/diagnostics/diagnostic-port#configure-additional-diagnostic-ports function diagnostic_options_from_ports_spec (val: string): DiagnosticOptions | null { if (val === "") return null; diff --git a/src/mono/browser/runtime/run.ts b/src/mono/browser/runtime/run.ts index 21f5fa2131a..471dd011bf4 100644 --- a/src/mono/browser/runtime/run.ts +++ b/src/mono/browser/runtime/run.ts @@ -12,7 +12,7 @@ import { postCancelThreads, terminateAllThreads } from "./pthreads"; import { call_entry_point } from "./managed-exports"; /** - * Possible signatures are described here https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/program-structure/main-command-line + * Possible signatures are described here https://learn.microsoft.com/dotnet/csharp/fundamentals/program-structure/main-command-line */ export async function mono_run_main_and_exit (main_assembly_name?: string, args?: string[]): Promise { try { @@ -33,7 +33,7 @@ export async function mono_run_main_and_exit (main_assembly_name?: string, args? } /** - * Possible signatures are described here https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/program-structure/main-command-line + * Possible signatures are described here https://learn.microsoft.com/dotnet/csharp/fundamentals/program-structure/main-command-line */ export async function mono_run_main (main_assembly_name?: string, args?: string[]): Promise { if (main_assembly_name === undefined || main_assembly_name === null || main_assembly_name === "") { diff --git a/src/mono/mono/eglib/gmisc-win32.c b/src/mono/mono/eglib/gmisc-win32.c index 0b2b9b30a78..451b82a36aa 100644 --- a/src/mono/mono/eglib/gmisc-win32.c +++ b/src/mono/mono/eglib/gmisc-win32.c @@ -135,7 +135,7 @@ g_get_current_dir (void) if (retval != 0) { // the size might be larger than MAX_PATH - // https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd + // https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd if (retval > buffer_size) { buffer_size = retval; buffer = g_realloc (buffer, buffer_size*sizeof(gunichar2)); diff --git a/src/mono/mono/metadata/external-only.c b/src/mono/mono/metadata/external-only.c index 369d6e2c849..8528a1701f5 100644 --- a/src/mono/mono/metadata/external-only.c +++ b/src/mono/mono/metadata/external-only.c @@ -731,7 +731,7 @@ mono_domain_owns_vtable_slot (MonoDomain *domain, gpointer vtable_slot) * * Unlike \c mono_method_get_unmanaged_thunk, minimal marshaling is done to the method parameters in * the wrapper. See - * https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.unmanagedcallersonlyattribute?view=net-6.0 + * https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.unmanagedcallersonlyattribute?view=net-6.0 * The method must be static and only use blittable argument types. There is no exception out-argument. * * diff --git a/src/mono/mono/metadata/native-library.c b/src/mono/mono/metadata/native-library.c index 6adb70bfda4..1ab165b6f95 100644 --- a/src/mono/mono/metadata/native-library.c +++ b/src/mono/mono/metadata/native-library.c @@ -364,7 +364,7 @@ netcore_probe_for_module (MonoImage *image, const char *file_name, int flags, Mo mono_error_move (bad_image_error, error); } - // TODO: Pass remaining flags on to LoadLibraryEx on Windows where appropriate, see https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.dllimportsearchpath?view=netcore-3.1 + // TODO: Pass remaining flags on to LoadLibraryEx on Windows where appropriate, see https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportsearchpath?view=netcore-3.1 if (!module && !is_ok (bad_image_error)) { mono_error_cleanup (error); diff --git a/src/mono/mono/mini/aot-compiler.c b/src/mono/mono/mini/aot-compiler.c index 57edfe8b087..119b945ee9f 100644 --- a/src/mono/mono/mini/aot-compiler.c +++ b/src/mono/mono/mini/aot-compiler.c @@ -5417,7 +5417,7 @@ add_native_to_managed_wrappers (MonoAotCompile *acfg) /* this cannot be enforced by the C# compiler so we must give the user some warning before aborting */ if (!(method->flags & METHOD_ATTRIBUTE_STATIC)) { - g_warning ("AOT restriction: Method '%s' must be static since it is decorated with [MonoPInvokeCallback]. See https://docs.microsoft.com/xamarin/ios/internals/limitations#reverse-callbacks", + g_warning ("AOT restriction: Method '%s' must be static since it is decorated with [MonoPInvokeCallback]. See https://learn.microsoft.com/xamarin/ios/internals/limitations#reverse-callbacks", mono_method_full_name (method, TRUE)); exit (1); } @@ -5425,7 +5425,7 @@ add_native_to_managed_wrappers (MonoAotCompile *acfg) sig = mono_method_signature_internal (e->ctor); if (sig->param_count != 1 || !(sig->params [0]->type == MONO_TYPE_CLASS && !strcmp (m_class_get_name (mono_class_from_mono_type_internal (sig->params [0])), "Type"))) { - g_warning ("AOT restriction: The attribute [MonoPInvokeCallback] used on method '%s' must take a System.Type argument. See https://docs.microsoft.com/xamarin/ios/internals/limitations#reverse-callbacks", + g_warning ("AOT restriction: The attribute [MonoPInvokeCallback] used on method '%s' must take a System.Type argument. See https://learn.microsoft.com/xamarin/ios/internals/limitations#reverse-callbacks", mono_method_full_name (method, TRUE)); exit (1); } diff --git a/src/mono/mono/mini/mini-runtime.c b/src/mono/mono/mini/mini-runtime.c index 35ae4b04161..932fcf010b1 100644 --- a/src/mono/mono/mini/mini-runtime.c +++ b/src/mono/mono/mini/mini-runtime.c @@ -2820,7 +2820,7 @@ lookup_start: if (mono_aot_only) { char *fullname = mono_method_get_full_name (method); - mono_error_set_execution_engine (error, "Attempting to JIT compile method '%s' while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information.\n", fullname); + mono_error_set_execution_engine (error, "Attempting to JIT compile method '%s' while running in aot-only mode. See https://learn.microsoft.com/xamarin/ios/internals/limitations for more information.\n", fullname); g_free (fullname); return NULL; diff --git a/src/mono/mono/mini/monovm.c b/src/mono/mono/mini/monovm.c index baa5e66b36f..9d9b1ae399b 100644 --- a/src/mono/mono/mini/monovm.c +++ b/src/mono/mono/mini/monovm.c @@ -45,7 +45,7 @@ static gboolean parse_trusted_platform_assemblies (const char *assemblies_paths) { // From - // https://docs.microsoft.com/en-us/dotnet/core/tutorials/netcore-hosting#step-3---prepare-runtime-properties + // https://learn.microsoft.com/dotnet/core/tutorials/netcore-hosting#step-3---prepare-runtime-properties // this is ';' separated on Windows and ':' separated elsewhere. char **parts = g_strsplit (assemblies_paths, G_SEARCHPATH_SEPARATOR_S, 0); int asm_count = 0; @@ -187,7 +187,7 @@ static gboolean parse_properties (int propertyCount, const char **propertyKeys, const char **propertyValues) { // A partial list of relevant properties is at: - // https://docs.microsoft.com/en-us/dotnet/core/tutorials/netcore-hosting#step-3---prepare-runtime-properties + // https://learn.microsoft.com/dotnet/core/tutorials/netcore-hosting#step-3---prepare-runtime-properties PInvokeOverrideFn override_fn = NULL; for (int i = 0; i < propertyCount; ++i) { diff --git a/src/mono/mono/tests/array-coop-1.cs b/src/mono/mono/tests/array-coop-1.cs index c0d3476b74f..a879673531d 100644 --- a/src/mono/mono/tests/array-coop-1.cs +++ b/src/mono/mono/tests/array-coop-1.cs @@ -22,7 +22,7 @@ System.Array.SetGenericValueImpl => ves_icall_System_Array_SetGenericValueImp System.Array.GetGenericValueImpl => ves_icall_System_Array_GetGenericValueImpl See -https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodinfo.makegenericmethod?view=netframework-4.7.1. +https://learn.microsoft.com/dotnet/api/system.reflection.methodinfo.makegenericmethod?view=netframework-4.7.1. https://msdn.microsoft.com/en-us/library/system.array.rank(v=vs.110).aspx https://stackoverflow.com/questions/1067312/how-to-use-methodinfo-invoke-to-set-property-value */ diff --git a/src/mono/mono/tests/coreclr-security.cs b/src/mono/mono/tests/coreclr-security.cs index 0c33e3d41ba..585bee9f956 100644 --- a/src/mono/mono/tests/coreclr-security.cs +++ b/src/mono/mono/tests/coreclr-security.cs @@ -149,7 +149,7 @@ public delegate void MethodDelegate (); public delegate Object InvokeDelegate (Object obj, Object[] parms); -// the 0.1% case from https://docs.microsoft.com/en-us/archive/blogs/shawnfa/silverlight-security-iii-inheritance +// the 0.1% case from https://learn.microsoft.com/archive/blogs/shawnfa/silverlight-security-iii-inheritance public class TransparentClassWithSafeCriticalDefaultConstructor { [SecuritySafeCritical] diff --git a/src/mono/mono/utils/mono-mmap-windows.c b/src/mono/mono/utils/mono-mmap-windows.c index 6ef8a4e882f..0d40c2f96c5 100644 --- a/src/mono/mono/utils/mono-mmap-windows.c +++ b/src/mono/mono/utils/mono-mmap-windows.c @@ -204,7 +204,7 @@ mono_file_map_error (size_t length, int flags, int fd, guint64 offset, void **re // been one DWORD in 32bit Windows, expanded to SIZE_T in 64bit Windows. // It is 64bits even on 32bit Windows to allow large files. // - // See https://docs.microsoft.com/en-us/windows/desktop/Memory/creating-a-file-mapping-object. + // See https://learn.microsoft.com/windows/desktop/Memory/creating-a-file-mapping-object. const guint64 mapping_length = offset + length; #if HAVE_API_SUPPORT_WIN32_FILE_MAPPING diff --git a/src/mono/wasi/Wasi.Build.Tests/BuildTestBase.cs b/src/mono/wasi/Wasi.Build.Tests/BuildTestBase.cs index 5cbdd8fe7d9..0511818c5e2 100644 --- a/src/mono/wasi/Wasi.Build.Tests/BuildTestBase.cs +++ b/src/mono/wasi/Wasi.Build.Tests/BuildTestBase.cs @@ -574,7 +574,7 @@ namespace Wasm.Build.Tests // this will ensure that all the async event handling has completed // and should be called after process.WaitForExit(int) - // https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process.waitforexit?view=net-5.0#System_Diagnostics_Process_WaitForExit_System_Int32_ + // https://learn.microsoft.com/dotnet/api/system.diagnostics.process.waitforexit?view=net-5.0#System_Diagnostics_Process_WaitForExit_System_Int32_ process.WaitForExit(); process.ErrorDataReceived -= logStdErr; diff --git a/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs b/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs index 03db9aed601..d20a8cc2695 100644 --- a/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs +++ b/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs @@ -517,7 +517,7 @@ namespace Wasm.Build.Tests // this will ensure that all the async event handling has completed // and should be called after process.WaitForExit(int) - // https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process.waitforexit?view=net-5.0#System_Diagnostics_Process_WaitForExit_System_Int32_ + // https://learn.microsoft.com/dotnet/api/system.diagnostics.process.waitforexit?view=net-5.0#System_Diagnostics_Process_WaitForExit_System_Int32_ process.WaitForExit(); process.ErrorDataReceived -= logStdErr; diff --git a/src/mono/wasm/features.md b/src/mono/wasm/features.md index 53995e656a1..627c87dfd76 100644 --- a/src/mono/wasm/features.md +++ b/src/mono/wasm/features.md @@ -53,7 +53,7 @@ Older versions of NodeJS hosts may need `--experimental-wasm-eh` command line op Passing Int64 and UInt64 values between JavaScript and C# requires support for the JavaScript `BigInt` type. See [JS-BigInt](https://github.com/WebAssembly/JS-BigInt-integration) for more information on this API. ### fetch - HTTP client -If an application uses the [HttpClient](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) managed API, your web browser must support the [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) API for it to run. +If an application uses the [HttpClient](https://learn.microsoft.com/dotnet/api/system.net.http.httpclient) managed API, your web browser must support the [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) API for it to run. Because web browsers do not expose direct access to sockets, we are unable to provide our own implementation of HTTP, and HttpClient's behavior and feature set will as a result depend also on the browser you use to run the application. @@ -62,7 +62,7 @@ A prominent limitation is that your application must obey `Cross-Origin Resource For your application to be able to perform HTTP requests in a NodeJS host, you need to install the `node-fetch` and `node-abort-controller` npm packages. ### WebSocket -Applications using the [WebSocketClient](https://learn.microsoft.com/en-us/dotnet/api/system.net.websockets.clientwebsocket) managed API will require the browser to support the [WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) API. +Applications using the [WebSocketClient](https://learn.microsoft.com/dotnet/api/system.net.websockets.clientwebsocket) managed API will require the browser to support the [WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) API. As with HTTP and HttpClient, we are unable to ship a custom implementation of this feature, so its behavior will depend on the browser being used to run the application. @@ -90,7 +90,7 @@ Trimming will remove unused code from your application, which reduces applicatio Some applications will break if trimming is used without further configuration due to the trimmer not knowing which code is used, for example any code accessed via reflection or serialization or dependency injection. -One typical source of trimming issues is JSON serialization/deserialization. The solution is to use [Source Generation](https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/source-generation), as shown below: +One typical source of trimming issues is JSON serialization/deserialization. The solution is to use [Source Generation](https://learn.microsoft.com/dotnet/standard/serialization/system-text-json/source-generation), as shown below: ```csharp [JsonSerializable(typeof(List))] @@ -99,7 +99,7 @@ partial class ItemListSerializerContext : JsonSerializerContext { } var json = JsonSerializer.Serialize(items, ItemListSerializerContext.Default.ListItem); ``` -Please ensure that you have thoroughly tested your application with trimming enabled before deployment, as the issues it causes may only appear in obscure parts of your software. For more advice on how to use trimming, see [trimming guidance](https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trim-self-contained). +Please ensure that you have thoroughly tested your application with trimming enabled before deployment, as the issues it causes may only appear in obscure parts of your software. For more advice on how to use trimming, see [trimming guidance](https://learn.microsoft.com/dotnet/core/deploying/trimming/trim-self-contained). ### C code or native linked libraries Native rebuild will cause the .NET runtime to be re-built alongside your application, which allows you to link additional libraries into the WASM binary or change compiler configuration flags. @@ -354,7 +354,7 @@ It includes the WASM templates for `dotnet new` and also preview version of mult You can use browser dev tools to debug the JavaScript of the application and the runtime. You could also debug the C# code using our integration with browser dev tools or Visual Studio. -See detailed [documentation](https://learn.microsoft.com/en-us/aspnet/core/blazor/debug) +See detailed [documentation](https://learn.microsoft.com/aspnet/core/blazor/debug) You could also use it to debug the WASM code. In order to see `C` function names and debug symbols DWARF, see [Debug symbols](#Native-debug-symbols) @@ -420,7 +420,7 @@ await dotnet.withConfig({browserProfilerOptions: {}}).run(); ### Diagnostic tools -We have initial implementation of diagnostic server and [event pipe](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/eventpipe) +We have initial implementation of diagnostic server and [event pipe](https://learn.microsoft.com/dotnet/core/diagnostics/eventpipe) At the moment it requires multi-threaded build of the runtime. diff --git a/src/native/corehost/apphost/apphost.windows.cpp b/src/native/corehost/apphost/apphost.windows.cpp index b8167cf6c0d..292652b8d99 100644 --- a/src/native/corehost/apphost/apphost.windows.cpp +++ b/src/native/corehost/apphost/apphost.windows.cpp @@ -28,7 +28,7 @@ namespace HMODULE module = ::GetModuleHandleW(nullptr); assert(module != nullptr); - // https://docs.microsoft.com/en-us/windows/win32/debug/pe-format + // https://learn.microsoft.com/windows/win32/debug/pe-format BYTE *bytes = reinterpret_cast(module); UINT32 pe_header_offset = reinterpret_cast(bytes)->e_lfanew; UINT16 subsystem = reinterpret_cast(bytes + pe_header_offset)->OptionalHeader.Subsystem; diff --git a/src/native/corehost/comhost/clsidmap.cpp b/src/native/corehost/comhost/clsidmap.cpp index 978cdeddb10..001649765f6 100644 --- a/src/native/corehost/comhost/clsidmap.cpp +++ b/src/native/corehost/comhost/clsidmap.cpp @@ -115,14 +115,14 @@ namespace GUID policy = WINTRUST_ACTION_GENERIC_VERIFY_V2; // File from disk must be used since there is no support for blob verification of a DLL - // https://docs.microsoft.com/windows/desktop/api/wintrust/ns-wintrust-wintrust_file_info + // https://learn.microsoft.com/windows/desktop/api/wintrust/ns-wintrust-wintrust_file_info WINTRUST_FILE_INFO fileData{}; fileData.cbStruct = sizeof(WINTRUST_FILE_INFO); fileData.pcwszFilePath = path.c_str(); fileData.hFile = nullptr; fileData.pgKnownSubject = nullptr; - // https://docs.microsoft.com/windows/desktop/api/wintrust/ns-wintrust-_wintrust_data + // https://learn.microsoft.com/windows/desktop/api/wintrust/ns-wintrust-_wintrust_data WINTRUST_DATA trustData{}; trustData.cbStruct = sizeof(trustData); trustData.pPolicyCallbackData = nullptr; @@ -137,7 +137,7 @@ namespace trustData.dwUIContext = 0; trustData.pFile = &fileData; - // https://docs.microsoft.com/windows/desktop/api/wintrust/nf-wintrust-winverifytrust + // https://learn.microsoft.com/windows/desktop/api/wintrust/nf-wintrust-winverifytrust LONG res = ::WinVerifyTrust(nullptr, &policy, &trustData); const DWORD err = ::GetLastError(); if (trustData.hWVTStateData != nullptr) diff --git a/src/native/corehost/test/nativehost/comhost_test.cpp b/src/native/corehost/test/nativehost/comhost_test.cpp index 53cc493a78b..b93a114f436 100644 --- a/src/native/corehost/test/nativehost/comhost_test.cpp +++ b/src/native/corehost/test/nativehost/comhost_test.cpp @@ -209,7 +209,7 @@ bool comhost_test::typelib(const pal::string_t &comhost_path, int count) for (int i = 1; i < count + 1; i++) { // The path format for a non-default embedded TLB is 'C:\file\path\to.exe\\2' where '2' is the resource name of the tlb to load. - // See https://docs.microsoft.com/windows/win32/api/oleauto/nf-oleauto-loadtypelib#remarks for documentation on the path format. + // See https://learn.microsoft.com/windows/win32/api/oleauto/nf-oleauto-loadtypelib#remarks for documentation on the path format. pal::stringstream_t tlb_path; tlb_path << comhost_path << '\\' << i; hr = load_typelib(tlb_path.str()); diff --git a/src/native/eventpipe/README.md b/src/native/eventpipe/README.md index eae5604bf8c..1fb84f17263 100644 --- a/src/native/eventpipe/README.md +++ b/src/native/eventpipe/README.md @@ -7,7 +7,7 @@ If there is information you wish was here and it isn't, please add it :) EventPipe is a cross-platform eventing library written in C with significant inspiration from ETW on Windows. Previously when .NET primarily ran on Windows we relied solely on ETW, but now that we run on multiple platforms we wanted to have cross platform logging supported directly in the -runtime. For more info see [the docs](https://docs.microsoft.com/en-us/dotnet/core/diagnostics/eventpipe). +runtime. For more info see [the docs](https://learn.microsoft.com/dotnet/core/diagnostics/eventpipe). DiagnosticServer is a simple RPC mechanism that allows external tools to communicate with the runtime over named pipes and sockets. External tools send the runtime commands which the runtime diff --git a/src/native/libs/Common/delayloadhook_windows.cpp b/src/native/libs/Common/delayloadhook_windows.cpp index 901ac566174..4e286cc69a5 100644 --- a/src/native/libs/Common/delayloadhook_windows.cpp +++ b/src/native/libs/Common/delayloadhook_windows.cpp @@ -18,7 +18,7 @@ FARPROC WINAPI secureDelayHook(unsigned dliNotify, PDelayLoadInfo pdli) return nullptr; } -// See https://docs.microsoft.com/en-us/cpp/build/reference/notification-hooks +// See https://learn.microsoft.com/cpp/build/reference/notification-hooks // This global hook is called prior to all the delay load LoadLibrary/GetProcAddress/etc. calls // Hooking this callback allows us to ensure that delay load LoadLibrary calls // specify the LOAD_LIBRARY_SEARCH_SYSTEM32 search path diff --git a/src/tasks/WorkloadBuildTasks/PatchNuGetConfig.cs b/src/tasks/WorkloadBuildTasks/PatchNuGetConfig.cs index 34dfe2c1706..a4828b1b3be 100644 --- a/src/tasks/WorkloadBuildTasks/PatchNuGetConfig.cs +++ b/src/tasks/WorkloadBuildTasks/PatchNuGetConfig.cs @@ -44,7 +44,7 @@ public class PatchNuGetConfig : Task * * * - * This is useful when using Central Package Management (https://learn.microsoft.com/en-us/nuget/consume-packages/central-package-management) + * This is useful when using Central Package Management (https://learn.microsoft.com/nuget/consume-packages/central-package-management) */ public string[] NuGetConfigPackageSourceMappings { get; set; } = Array.Empty(); diff --git a/src/tests/Common/CoreCLRTestLibrary/Utilities.cs b/src/tests/Common/CoreCLRTestLibrary/Utilities.cs index a3d6df5a623..feadf19dc37 100644 --- a/src/tests/Common/CoreCLRTestLibrary/Utilities.cs +++ b/src/tests/Common/CoreCLRTestLibrary/Utilities.cs @@ -340,7 +340,7 @@ namespace TestLibrary public const int PRODUCT_HOME_PREMIUM_N = 0x0000001A; /// - /// https://docs.microsoft.com/en-us/windows/desktop/api/sysinfoapi/nf-sysinfoapi-getproductinfo + /// https://learn.microsoft.com/windows/desktop/api/sysinfoapi/nf-sysinfoapi-getproductinfo /// [DllImport(nameof(Kernel32), SetLastError = false)] public static extern bool GetProductInfo( diff --git a/src/tests/Common/Directory.Build.targets b/src/tests/Common/Directory.Build.targets index 2d447a14a1b..ae168e70984 100644 --- a/src/tests/Common/Directory.Build.targets +++ b/src/tests/Common/Directory.Build.targets @@ -3,7 +3,7 @@ Common files don't take part in the root tests\src\Directory.Build.targets This file prevents them from including it as it gets included in its place If they ever need to take part, we can conditionally include them as documented - here https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build#directorybuildprops-and-directorybuildtargets + here https://learn.microsoft.com/visualstudio/msbuild/customize-your-build#directorybuildprops-and-directorybuildtargets --> diff --git a/src/tests/Common/Platform/platformdefines.h b/src/tests/Common/Platform/platformdefines.h index a6eb9c6eae9..2c1f13fbaa7 100644 --- a/src/tests/Common/Platform/platformdefines.h +++ b/src/tests/Common/Platform/platformdefines.h @@ -191,7 +191,7 @@ inline void *CoreClrBStrAlloc(size_t cb) { // A null is automatically applied in the SysAllocStringByteLen API. // Remove a single OLECHAR for the implied null. - // https://docs.microsoft.com/en-us/previous-versions/windows/desktop/api/oleauto/nf-oleauto-sysallocstringbytelen + // https://learn.microsoft.com/previous-versions/windows/desktop/api/oleauto/nf-oleauto-sysallocstringbytelen if (cb >= sizeof(OLECHAR)) cb -= sizeof(OLECHAR); diff --git a/src/tests/Directory.Build.targets b/src/tests/Directory.Build.targets index 0ffb806ca2c..f4bdec77e39 100644 --- a/src/tests/Directory.Build.targets +++ b/src/tests/Directory.Build.targets @@ -4,7 +4,7 @@ Common files don't take part in the root src\tests\Directory.Build.targets This file prevents them from including it as it gets included in its place If they ever need to take part, we can conditionally include them as documented - here https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build#directorybuildprops-and-directorybuildtargets + here https://learn.microsoft.com/visualstudio/msbuild/customize-your-build#directorybuildprops-and-directorybuildtargets --> diff --git a/src/tests/GC/LargeMemory/memcheck.cs b/src/tests/GC/LargeMemory/memcheck.cs index 5fbda715390..9f566301c7f 100644 --- a/src/tests/GC/LargeMemory/memcheck.cs +++ b/src/tests/GC/LargeMemory/memcheck.cs @@ -75,7 +75,7 @@ public static class MemCheck { [DllImport("kernel32.dll", SetLastError = true)] static extern bool GlobalMemoryStatusEx(ref MEMORYSTATUSEX lpBuffer); - // https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-memorystatusex + // https://learn.microsoft.com/windows/win32/api/sysinfoapi/ns-sysinfoapi-memorystatusex [StructLayout(LayoutKind.Sequential)] public struct MEMORYSTATUSEX { diff --git a/src/tests/Interop/COM/ComWrappers/MockReferenceTrackerRuntime/ReferenceTrackerRuntime.cpp b/src/tests/Interop/COM/ComWrappers/MockReferenceTrackerRuntime/ReferenceTrackerRuntime.cpp index 69d95102250..bcb57c5be6b 100644 --- a/src/tests/Interop/COM/ComWrappers/MockReferenceTrackerRuntime/ReferenceTrackerRuntime.cpp +++ b/src/tests/Interop/COM/ComWrappers/MockReferenceTrackerRuntime/ReferenceTrackerRuntime.cpp @@ -17,7 +17,7 @@ namespace API { - // Documentation found at https://docs.microsoft.com/windows/win32/api/windows.ui.xaml.hosting.referencetracker/ + // Documentation found at https://learn.microsoft.com/windows/win32/api/windows.ui.xaml.hosting.referencetracker/ //64bd43f8-bfee-4ec4-b7eb-2935158dae21 const GUID IID_IReferenceTrackerTarget = { 0x64bd43f8, 0xbfee, 0x4ec4, { 0xb7, 0xeb, 0x29, 0x35, 0x15, 0x8d, 0xae, 0x21} }; class DECLSPEC_UUID("64bd43f8-bfee-4ec4-b7eb-2935158dae21") IReferenceTrackerTarget : public IUnknown diff --git a/src/tests/Interop/ReadMe.md b/src/tests/Interop/ReadMe.md index 7b7917a55a2..c8d88a9616e 100644 --- a/src/tests/Interop/ReadMe.md +++ b/src/tests/Interop/ReadMe.md @@ -14,7 +14,7 @@ A common pattern for testing is using xUnit's `Assert` utilities. These utilitie ### Managed -Managed tests should be designed to use the [SDK style project](https://docs.microsoft.com/en-us/dotnet/core/tools/csproj) system provided by [`dotnet-cli`](https://github.com/dotnet/cli). +Managed tests should be designed to use the [SDK style project](https://learn.microsoft.com/dotnet/core/tools/csproj) system provided by [`dotnet-cli`](https://github.com/dotnet/cli). ### Native @@ -34,7 +34,7 @@ Interop testing is divided into several areas. ### P/Invoke -The P/Invoke bucket represents tests that involve a [Platform Invoke](https://docs.microsoft.com/en-us/dotnet/standard/native-interop) scenario. +The P/Invoke bucket represents tests that involve a [Platform Invoke](https://learn.microsoft.com/dotnet/standard/native-interop) scenario. Testing P/Invoke has two aspects: diff --git a/src/tools/illink/README.md b/src/tools/illink/README.md index 66eacd90dbb..af33c811deb 100644 --- a/src/tools/illink/README.md +++ b/src/tools/illink/README.md @@ -5,9 +5,9 @@ This project hosts various tools and msbuild tasks which are used when trimming ## IL Trimmer The [IL Trimmer](src/linker/README.md) is the developer's tool that can be used to produce apps that contain only code and assembly dependencies which are necessary to run the app. It's fully integrated into -.NET SDKs via [ILLink.Tasks](src/ILLink.Tasks/README.md) build task and exposed via `dotnet publish` trimming [settings](https://docs.microsoft.com/en-us/dotnet/core/deploying/trim-self-contained#trim-your-app---cli). +.NET SDKs via [ILLink.Tasks](src/ILLink.Tasks/README.md) build task and exposed via `dotnet publish` trimming [settings](https://learn.microsoft.com/dotnet/core/deploying/trim-self-contained#trim-your-app---cli). -The trimmer is always enabled for all size sensitive .NET workloads like Blazor WebAssembly, Xamarin or .NET mobile and can be manually enabled for other project types. The default apps trimming setting can be further customized by using a number of [msbuild properties](https://docs.microsoft.com/en-us/dotnet/core/deploying/trimming-options). +The trimmer is always enabled for all size sensitive .NET workloads like Blazor WebAssembly, Xamarin or .NET mobile and can be manually enabled for other project types. The default apps trimming setting can be further customized by using a number of [msbuild properties](https://learn.microsoft.com/dotnet/core/deploying/trimming-options). ## Dependencies Analyzer diff --git a/src/tools/illink/src/ILLink.RoslynAnalyzer/COMAnalyzer.cs b/src/tools/illink/src/ILLink.RoslynAnalyzer/COMAnalyzer.cs index 06ed3c7c44b..49a44d28dae 100644 --- a/src/tools/illink/src/ILLink.RoslynAnalyzer/COMAnalyzer.cs +++ b/src/tools/illink/src/ILLink.RoslynAnalyzer/COMAnalyzer.cs @@ -20,7 +20,7 @@ namespace ILLink.RoslynAnalyzer private const string MarshalAsAttribute = nameof (MarshalAsAttribute); static readonly DiagnosticDescriptor s_correctnessOfCOMCannotBeGuaranteed = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.CorrectnessOfCOMCannotBeGuaranteed, - helpLinkUri: "https://docs.microsoft.com/en-us/dotnet/core/deploying/trim-warnings/il2050"); + helpLinkUri: "https://learn.microsoft.com/dotnet/core/deploying/trim-warnings/il2050"); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create (s_correctnessOfCOMCannotBeGuaranteed); diff --git a/src/tools/illink/src/ILLink.RoslynAnalyzer/RequiresAssemblyFilesAnalyzer.cs b/src/tools/illink/src/ILLink.RoslynAnalyzer/RequiresAssemblyFilesAnalyzer.cs index 8949b249b35..d3331d11374 100644 --- a/src/tools/illink/src/ILLink.RoslynAnalyzer/RequiresAssemblyFilesAnalyzer.cs +++ b/src/tools/illink/src/ILLink.RoslynAnalyzer/RequiresAssemblyFilesAnalyzer.cs @@ -20,13 +20,13 @@ namespace ILLink.RoslynAnalyzer public const string RequiresAssemblyFilesAttributeFullyQualifiedName = "System.Diagnostics.CodeAnalysis." + RequiresAssemblyFilesAttribute; static readonly DiagnosticDescriptor s_locationRule = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.AvoidAssemblyLocationInSingleFile, - helpLinkUri: "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/il3000"); + helpLinkUri: "https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/il3000"); static readonly DiagnosticDescriptor s_getFilesRule = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.AvoidAssemblyGetFilesInSingleFile, - helpLinkUri: "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/il3001"); + helpLinkUri: "https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/il3001"); static readonly DiagnosticDescriptor s_requiresAssemblyFilesRule = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.RequiresAssemblyFiles, - helpLinkUri: "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/il3002"); + helpLinkUri: "https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/il3002"); static readonly DiagnosticDescriptor s_requiresAssemblyFilesAttributeMismatch = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.RequiresAssemblyFilesAttributeMismatch); diff --git a/src/tools/illink/src/ILLink.Shared/DataFlow/DefaultValueDictionary.cs b/src/tools/illink/src/ILLink.Shared/DataFlow/DefaultValueDictionary.cs index 49dc72f2b14..bc0501dc670 100644 --- a/src/tools/illink/src/ILLink.Shared/DataFlow/DefaultValueDictionary.cs +++ b/src/tools/illink/src/ILLink.Shared/DataFlow/DefaultValueDictionary.cs @@ -105,7 +105,7 @@ namespace ILLink.Shared.DataFlow return new DefaultValueDictionary (defaultValue, dict); } - // Prevent warning CS0659 https://docs.microsoft.com/en-us/dotnet/csharp/misc/cs0659. + // Prevent warning CS0659 https://learn.microsoft.com/dotnet/csharp/misc/cs0659. // This type should never be used as a dictionary key. public override int GetHashCode () => throw new NotImplementedException (); diff --git a/src/tools/illink/src/ILLink.Shared/DataFlow/MaybeLattice.cs b/src/tools/illink/src/ILLink.Shared/DataFlow/MaybeLattice.cs index 65726b20553..89a5d1f98d1 100644 --- a/src/tools/illink/src/ILLink.Shared/DataFlow/MaybeLattice.cs +++ b/src/tools/illink/src/ILLink.Shared/DataFlow/MaybeLattice.cs @@ -9,7 +9,7 @@ namespace ILLink.Shared.DataFlow { // Wrapper for Nullable which implements IEquatable so that this may // be used as a lattice value. Nullable types can't satisfy interface constraints; - // see for example https://docs.microsoft.com/dotnet/csharp/misc/cs0313. + // see for example https://learn.microsoft.com/dotnet/csharp/misc/cs0313. public struct Maybe : IEquatable>, IDeepCopyValue> where T : struct, IEquatable { diff --git a/src/tools/illink/src/linker/CompatibilitySuppressions.xml b/src/tools/illink/src/linker/CompatibilitySuppressions.xml index a1c6c7ff829..08ab3bdda16 100644 --- a/src/tools/illink/src/linker/CompatibilitySuppressions.xml +++ b/src/tools/illink/src/linker/CompatibilitySuppressions.xml @@ -1,5 +1,5 @@  - + CP0001