Commit Graph

137 Commits

Author SHA1 Message Date
Aaron Robinson a3fe5b1e50
Add guidelines for source generators in `dotnet/runtime` (#114709) 2025-04-15 16:42:57 -07:00
Viktor Hofer 5379704c79
Target NetFrameworkCurrent in tests and remove old mentions (#113667)
* Target NetFrameworkCurrent in tests and remove old mentions

... of previous .NET Framework versions in docs / tests.

NetFrameworkMinimum (net462) -> NetFrameworkCurrent (net481) so that we can
start consuming xunit v3 which requires at least net472. Use
NetFrameworkCurrent as the actual runtime that is then used is
.NET Framework 4.8.1 anyway (innerloop & CI).

* Revert source-generator ref assembly change

* Try to fix VoidMainWithExitCodeApp test

* Fix typo

---------

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
2025-03-20 21:30:24 +01:00
Serge Croisé 9d6fd092ce
docs: fix spelling grammar and missing words in clr-code-guide.md (#112222) 2025-02-05 22:19:51 -08:00
Aaron Robinson 72f4147c52
Update breaking change rules regarding byref/objref fields. (#112087)
New rule based on https://github.com/dotnet/runtime/pull/111584

---------

Co-authored-by: Stephen Toub <stoub@microsoft.com>
2025-02-03 13:41:38 -08:00
Pranav Senthilnathan 4490f6978d
Clarifying instructions for GenerateReferenceAssemblySource target (#109468)
* clarifying instructions for genapi target

* Update docs/coding-guidelines/updating-ref-source.md

Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>

---------

Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
2024-11-07 12:07:45 -08:00
Emmanuel Ferdman 9893d145eb
[browser] update incorrect references (#108352)
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2024-10-18 21:43:30 +02:00
Viktor Hofer c4b3d81df1
Target .NET 10 / net10.0 (#106599)
* Update dotnet10 feeds

* Update hardcoded old TFM values

* More hardcode updates and TFM checks

* Updates and delete duplicate file in Bcl.Numerics

* Linker stays on net9.0

* Fix .NET SDK max supported version

* Update apicompat sfx apicompat baseline file

* Update Microsoft.NET.WebAssembly.Threading APICompat settings

* Fix DiagnosticSource build

* Update SDK to RC1 for needed GetAlternateLookup API

to be able to build System.Text.Json on net9.0.

* Fix APICompat runtime regex pattern

* Suppress Bcl.Memory compatibility error for dropped framework

* Fix BinaryFormatter tests regex pattern for version subsitution

* Update BinaryFormatterTests.cs

* Pin SdkVersionForWorkloadTesting to the version in global.json

* Treat net9 and net10 as current for now

* Bump MicrosoftDotNetILCompilerVersion

* Update BinaryFormatterTests.cs

* Update System.Resources.Extensions

* Update AutoImports as well

* Fix ImporterTests.cs

* Block failing SignalRClientTests

* Update XmlSerialzation Schema Import tests.

* Update Versions.props

* Update CompatibilitySuppressions.xml for System.Numerics.Tensors

* Don't set EnableDefaultCompileItems, it doesn't work since we set EnableDefaultItems=false higher up

* Update regex in legacy BinaryFormatterTests.cs too

* Hardcode BinaryFormatter test assembly version to 9.0

This allows us to not change the majority of the tests

* Fix typo

* Fix issue in Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest.pkgproj

* Replace ForceNet8Current in a few more places

* Fix wasi workload

* Fix TreatAsCurrent for 10.0

* Add net9 workload manifests

* Update PackageId in icrosoft.NET.Runtime.WebAssembly.Templates.csproj

* Update ApiCompatBaseline.NetCoreAppLatestStable.xml

Changes from https://github.com/dotnet/runtime/pull/107758

* Remove duplicate dotnet10 feeds from nuget.config

* Update Versions.props

* Fake SDK band version for now

* Update Versions.props

* Update the SDK band versions for real

* Update the dotnet/sdk dependencies

* Update emsdk to net10 workloads

* Install a 9.0 runtime for workload tests too

* Update the compat tasks

* Merge in changes from net10-manifests

* Tmp: Trying out @am11's branch.

* Tmp2: Trying out @am11's branch.

* Tmp3: Replace the last usage of main in clone action.

* Update eng/pipelines/coreclr/templates/build-perf-bdn-app.yml

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>

* Update eng/pipelines/coreclr/templates/perf-job.yml

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>

* Update eng/pipelines/runtime-wasm-perf.yml

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>

---------

Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: Jackson Schuster <36744439+jtschuster@users.noreply.github.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Ilona Tomkowicz <itomkowicz@microsoft.com>
Co-authored-by: Steve Molloy <smolloy@microsoft.com>
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
2024-09-25 11:28:31 -05:00
Eric StJohn 6e440de5b4
Avoid package dependencies on libraries in the shared framework (#106172)
* Avoid package dependencies on libraries in the shared framework

We can avoid these dependencies since we can count on the library being
part of the shared framework.  Fewer dependencies means less packages
downloaded, less for customers to service, less copied into the output
directory when serviced.

* Add warning code.

* Address feedback
2024-08-12 11:15:19 -07:00
Jeremy Koritzinsky 0074d77112
Add some basic guidelines around using C++ standard headers now that our build allows us to (#101088) 2024-08-08 22:18:18 -07:00
SingleAccretion 7911e709c0
Do not separate header comments from function definitions (#105754)
* Do not separate header comments from function definitions

Separating them with a space defeats a VS feature that shows
the header comments when you hover over a function in code.

* Remove // static as well
2024-07-31 10:52:37 -07:00
Dan Moseley b252fa50ad
remove corefx from md (#105275) 2024-07-22 14:55:00 -06:00
Jan Kotas 99e94ce55d
Replace net8 with net9 under docs (#104189)
Fixes #104088
2024-06-29 07:44:01 -04:00
Ken Dale 59f2833b98
Update docs.microsoft.com usages to learn.microsoft.com (#102881)
* Update https://docs.microsoft.com to https://learn.microsoft.com

* Update http://docs.microsoft.com/ to https://learn.microsoft.com (removes trailing slash)

* Update docs.microsoft.com to https://learn.microsoft.com

* Update docs.microsoft.com to learn.microsoft.com

* Replace learn.microsoft.com/en-us/ with learn.microsoft.com/ to remove locale from urls
2024-05-31 11:27:45 -07:00
Paulus Pärssinen 1a811ea839
Update link to dotnet-format tool (#101619)
* Update link to dotnet-format tool

* It now lives in dotnet/sdk

* Link to official docs instead

Co-authored-by: Jan Kotas <jkotas@microsoft.com>

---------

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2024-04-26 12:27:36 -07:00
Alexander Rasmussen 5c01ed22b7
Updated coding-style.md to point to the new dotnet format repo (#101572) 2024-04-25 16:42:43 -04:00
Alexander Köplinger 883ffc4d18
Fix format.sh script and remove dotnet-format tool from dotnet-tools.json (#94839)
We're no longer using the separate dotnet-format tool since it is integrated into the dotnet SDK now.

With the move to the SDK the options changed a bit so we now need to use the `whitespace` format command so we can continue using the `--folder` option: https://github.com/dotnet/format/issues/1385

To run not just whitespace but code style formatters as well we'd need a workspace context (i.e. pass the .csproj to dotnet format), but inferring that from just the changed file list is hard.
2023-11-16 15:38:39 +01:00
Aleksey Kliger (λgeek) 4110bcea5b
Bump mono to -std=gnu11 (#91421)
Change the mono build to require C11 (with gnu extensions on gcc/clang platforms).
* Change `g_static_assert` to be `_Static_assert` or `static_assert` as apropriate.
* Change `_DN_STATIC_ASSERT` to be `static_assert`
* Add static asserts in `jiterp.c` when it casts between `T*` and `atomic_T*`
* Add C11 guidance to the mono coding guide doc

Contributes to #90404 

---

* Bump mono to -std=gnu99; use static_assert

* don't fall back to runtime checks for g_static_assert

* fix static assert that wasn't a constant expression

* use static_assert in shared containers

* bump C standard in offsets-tool.py

* use _Static_assert before C23

   Dont' include assert.h in glib.h because some of our older 3P code includes assert.h on its own and there are conflicts

* use CMAKE_C_STANDARD and related properties

* jiterp: static_assert that atomic ops are (less likely) to go wrong

   Not every C implementation guarantees that atomic operations on arbitrary types are lock free.  So for example, casting between atomic_ushort* and uint16_t* might not actually be ok to do.  We can't assert that they're inter-castable, but at least assert that they're the same size and that atomic_ushort is always lock-free. There might still be restrictions (for example atomic_ushort might have to be aligned differently) but this should at least catch obvious data corruption.

* Add C11 guidance to the Mono coding guide

* jiterp: long is 32-bits on wasm; use llong
2023-09-01 18:04:35 -04:00
MSDN.WhiteKnight 9ddb731683
Update Package readme guidelines with new template (#90842)
* Update package readme guidelines

* Fix typo
2023-08-21 12:44:18 +02:00
Adam Sitnik 1b37389af6
Introduction to vectorization with Vector128 and Vector256 (#84115)
Co-authored-by: Günther Foidl <gue@korporal.at>
Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Rob Hague <rob.hague00@gmail.com>
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
2023-06-29 11:00:07 +02:00
Viktor Hofer 07ae197db5
Use analyzers from targeting pack for NetCoreAppCurrent (#87726)
* Use analyzers from targeting pack for NetCoreAppCurrent

Fixes that analyzer failures didn't show-up in #74897

Add analyzers to the frameworklist that OOB projects in src/libraries
use, and only auto ProjectReference the analyzers in generators.targets
when not using the analyzers from the targeting pack.

Also move the generator projects related code into a separate file.

Continuation of https://github.com/dotnet/runtime/pull/75093

* Fix project build

* Add missing reference to Regex tests

* Add missing generators for netfx build

* Fix paht in test project

* Fix typo

* Disable runtime marshalling for SharedTypes.csproj

* Disable runtime marshalling for NativeExports.csproj
2023-06-19 23:27:38 +02:00
Bonuspunkt a15eaf7440
link to the latest version of Framework Design Guidelines (#86216)
also added Jeremy Barton because he was inconsistently mentioned
2023-05-15 09:58:01 -04:00
Tom Deseyn 21fb96b6ee
Try to untangle the rid calculation. (#82832)
* Try to untangle the rid calculation.

* Ignore __portableOS.

* Add back musl detection.

* Try fix AnyOS tests.

* Try fix coreclr linux_musl_arm64 job.

* src/tests/build.proj: use PackageRID for restore.

* Use RuntimeOS as an override for _packageOS.

* Remove (probably) out-dated override for non-portable ToolsRID.

* CI cross-builds for linux-musl use linux.

* Add missing arch to rid.

* Try simplified ToolsRID.

* Update comments.

* Rename OutputRid to OutputRID.

* Tweak comment.

* Move TargetsLinux{Bionic,Musl} with the other Targets properties.

* Don't use RuntimeOS for PackageRID for CrossBuilds.

* Move RuntimeOS condition to ToolsRID assignment.

* Clean up a few things.

* Fix broken Condition.

* Try fix the linux-bionic build.

* Try fix the linux-bionic build, part II.

* Try fix the linux-bionic build, part III.

* Fix PackageRID.

* Use RuntimeOS as _packageOS override.

* Remove RuntimeOS.

* Fix '-os linux-musl' mapping.

* Clean up .

* Rename __PortableOS to __PortableTargetOS.

* Extend comments.

* Extend OutputRID comment too.

* build.sh: include linux-bionic, linux-musl in usage.

* SourceBuild.props: no need to pass RuntimeOS. Only set ToolsOS, PackageOS when RuntimeOS is not empty.

* Fix comment.

* linux-bionic doesn't get built on linux-bionic.

* Unconditionally assign TargetsLinuxBionic/TargetsLinuxMusl.

* Remove SkipInferTargetOSName.
2023-04-21 10:02:07 +02:00
Dan Moseley 17c563e9a1
add link to interop guidelines (#83987) 2023-03-27 12:40:19 -06:00
Adeel Mujahid 3b63eb1346
Replace remaining instances of COMPlus with DOTNET (#82985)
* Replace remaining instances of COMPlus with DOTNET

* Fix heading in RyuJIT tutorial
2023-03-05 08:40:20 -08:00
Viktor Hofer 2ca7cf7140
Lowercase TargetOS (#80164)
Follow-up on #32451
Follow-up on #80074

In #43651, the "Windows" OS name was lowercased to achieve target frameworks with RIDs in them. At that time, the original plan was to lowercase all TargetOS values but that had to be cut because of resources. This PR finishes that and updates build systems, YML, markdowns and managed components.

To not break existing developer workflows, the passed-in -os value is automatically lower-cased in the script entry points and validated in the msbuild entry point.
2023-01-11 17:58:32 +01:00
Viktor Hofer 212fb54730
Use shipping runtime.json for RID targeting (#80074)
* Use shipping runtime.json for RID targeting

- Use the shipping runtime.json file to target RIDs when building
  instead of the custom OSGroups.json which only contained a subset of
  the available rids.
- To facilitate that, lower-case the existing platforms in the target
  frameworks strings which is the expected format anyway by the SDK and
  msbuild. This will eventually make it possible to bring some of the
  custom build infrastructure back into the SDK.
- Remove a few outdated code pieces and update docs.
2023-01-02 21:42:52 +01:00
Eirik Tsarpalis 97a51ccdb1
Add nullable reference type annotations to System.Text.Json source gen (#79613)
* Add nullability annotaitons to sourcegen components.

* Move sourcegen testing from Roslyn4.0 to Roslyn4.4.

* Fix accessibility modifiers

* Allow source generators to multi-target

* Binplace only netstandard2.0 compiled source generators

* Use live NetCoreAppCurrent tfm

* Update Directory.Build.targets

* Pick correct analyzer asset for consumption

* Fix build

* Revert "Move sourcegen testing from Roslyn4.0 to Roslyn4.4."

This reverts commit fe78570660.

* Make analyzer P2Ps choose the right asset

* PR feedback

* Update src/libraries/System.Text.Json/gen/JsonSourceGenerator.Parser.cs

* Make source generator target an LKG

* Update project-guidelines.md

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
2022-12-16 18:44:06 +00:00
MSDN.WhiteKnight 479d0133f3
Split library and package Readme (#78888)
* Split library and package Readme

* Fix punctuation

* Fix lint issues

* Automatically include package readme file if existent

* Rename README.md to PACKAGE.md

* Move PACKAGE.md into source directory

* Reinstate examples in README.md

* Update contributing guidelines

* Update docs/coding-guidelines/libraries-packaging.md

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
2022-12-12 11:57:58 +01:00
Viktor Hofer 49dc7ba85c
Update convention on how to ref and pack analyzers (#78845)
d3af4921f3 made it possible to reference
and package an analyzer via the same msbuild item by setting custom
metadata.

While reviewing other places that could use the AnalyzerReference item,
I realized that using this custom item doesn't provide much value and
creates an artificial difference to the rest of the stack and our customers
[as we don't adhere to our own documentation](https://devblogs.microsoft.com/dotnet/introducing-c-source-generators/#hello-world-source-generator-edition).

Instead, IMHO it makes much more sense to keep using a
`ProjectReference` item with the documented set of required metadata, to
reference an analyzer and just define an additional custom metadata to
support packaging the analyzer: `PackAsAnalyzer`.
The reason for that is that the additional metadata explains how the
reference works (no assembly output reference, added as an Analyzer
output item) vs. the `AnalyzerReference` which is a repo custom item
that doesn't tell you that behind the scenes it actually gets converted
to a `ProjectReference` with the same metadata as if you would declare
that yourself as a P2P.

To summarize the change:

1. Consume an analyzer
```xml
<!-- Before -->
<AnalyzerReference Include="..." />
<!-- After -->
<ProjectReference Include="..." ReferenceOutputAssembly="false" OutputItemType="Analyzer" />
```

2. Pack an analyzer and consume it
```xml
<!-- Before -->
<AnalyzerReference Include="..." Pack="true" />
<!-- After -->
<ProjectReference Include="..." ReferenceOutputAssembly="false" OutputItemType="Analyzer" PackAsAnalyzer="true" />
```

3. Pack an analyzer without consuming it
```xml
<!-- Before -->
<AnalyzerReference Include="..." Pack="true" ReferenceAnalyzer="false" />
<!-- After -->
<ProjectReference Include="..." ReferenceOutputAssembly="false" PackAsAnalyzer="true" />
```
2022-11-25 17:06:25 +01:00
Viktor Hofer 960e4d723c
Leverage the shipping, roslyn based ApiCompat in dotnet/runtime (#73263)
* ApiCompat infra changes

* Convert baseline to suppression files

* ApiCompat.proj

* update suppressions

* sorted suppressions

* rebase and update suppressions

* enable attribute and param rules

* Enable optional rules

* WebAssemblyThreading proj

* CompatSuppression for XmlREaderWriter

* Enable optional rules correctly...

* ThreadPool UnsupportedOSPlatformAttribute

* VBCore CP0017

* Migrate all CoreLibs over

* Update ApiCompat.proj

* Add ApiCompat.proj baselines

* Update ApiCompat.proj

* Clean-up suppression files with nint/IntPtr fix

* Clean-up CoreLib suppression

* Update suppression files with latest apicompat fix

* Update suppression files

* update suppressions

* Update suppression files

* Clean-up obsolete suppression files

* Update suppression files

* update suppressions

* huge reduction in suppression file size

* update suppressions

* more suppressions removed

* update suppressions

* Update dependencies and clean-up

* Add suppression files for CoreLib and fix path

* Update CoreLib coreclr suppression file

* Update coreclr suppression files

* Suppression file fixes and Linux path fixes

* Update coreclr suppression again)

* Fix suppression file path calculation

* Fix previous mistake

* Diagnostics.Tracing suppression file

* Threading suppression file fix

* use global suppression for CryptoSignedXmlRecursionException

* Add Specification.Tests suppression

* Disable NoTargets ref copying

* Fix for coreclr build

* Avoid duplicate project evals

Co-authored-by: smasher164 <akhilindurti@microsoft.com>
Co-authored-by: Akhil Indurti <aindurti@gmail.com>
2022-10-16 15:15:28 +02:00
Jan Kotas 32ac664fca
Replace net7 with net8 in dogfooding and workflow docs (#75453) 2022-09-12 20:40:44 -07:00
Jan Kotas f49851cad9
Delete NGen flavor of JIT configs (#73383)
* Delete NGen flavor of JIT configs

We do not need them anymore since the JIT configs are specified on AOT tool command line now.

* Update docs
2022-08-04 13:17:18 -07:00
Alexander Köplinger 8762a02634
Add reference assembly for System.Private.CoreLib.dll (#72143)
We now compile against the reference assembly in all places where we were compiling against the mono/coreclr System.Private.CoreLib.dll implementation assembly before.

The new reference assembly consumes sources from the existing contracts to avoid checking in a generated version of SPC.dll (this would add ~20k lines of .cs which is mostly duplicated with System.Runtime.cs)

Since a few contracts have only partially moved types to SPC we wrap contract types with `#if !BUILDING_CORELIB_REFERENCE` so we can hide them when compiling the SPC reference assembly. This needed a few GenAPI changes which are implemented here: https://github.com/dotnet/arcade/pull/10003.

Note that this means that the types which live in CoreLib are moved to the end of the ref .cs file which causes a GitHub diff to show up, but it is actually a no-op.

Regenerating the ref .cs files works the same way as before, by running the `GenerateReferenceAssemblySource` target in the contract's src\ folder.

Fixes https://github.com/dotnet/runtime/issues/67660

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
2022-08-02 17:58:13 +02:00
Adeel Mujahid 9d6396deb0
Fix typos (#72709) 2022-07-23 20:24:28 -07:00
Adeel Mujahid 3ea30ed321
Fix typos (#72314)
* Fix typos

* Cleanup trailing whitespaces in committed files

* Revert a macro for win32 compat

* Disambiguate test data method

* Revert XMLPath test which rely on external assets

* Revert whitespace change in Xml tests

* Revert ClrEtwAl and ILLink.Shared

* Revert crossgen2 props/targets and *.wxl
2022-07-16 22:11:11 -07:00
Huo Yaoyuan f9999cc1aa
Fix typo in GC_FORBID doc (#71050) 2022-06-21 14:11:10 +02:00
Aleksey Kliger (λgeek) 08692dcf6b
Mono Code Guidelines (#70507)
* Mono Code Guidelines

* markdownlint

* Add "Naming" and "public API" sections

* Add a section on assertions

* Fix sentence fragment; add threading design doc link

* Apply suggestions from code review

Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
2022-06-10 17:37:39 -04:00
Aaron Robinson 2747f30e53
Update updating-ref-source.md (#70169)
Update flags for using GenAPI.
2022-06-02 13:54:51 -07:00
Adeel Mujahid 55e2378d86
Fix typos (#69537)
* Fix typos

* Fix typo: seperate -> separate

* Rename ApplicationNameSetFromArgument

* Update src/coreclr/vm/methodtablebuilder.cpp

* Update docs/coding-guidelines/clr-code-guide.md

Co-authored-by: Dan Moseley <danmose@microsoft.com>

* Update src/mono/mono/tests/verifier/make_tests.sh

Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2022-05-23 10:14:58 -07:00
Viktor Hofer d3af4921f3
Define convention to consume and/or package analyzers (#69069)
* Define convention to include analyzers in ref pack

Fixes https://github.com/dotnet/runtime/issues/61321

Until now we required source libraries to define ProjectReferences when
an analyzer should be part of the shared framework. That strategy causes
analyzer projects to leak into the ProjectReference closure and by that
into a solution file.

As an example:
When another library references the source library that references the
analyzer, the analyzer is part of the dependency closure even though it
might not be required.

This change makes it possible to define the shared framework analyzer
projects in the NetCoreAppLibrary.props file for both the .NETCoreApp,
and the AspNetCoreApp shared framework.

Out-of-band projects which ship analyzers inside their produced package,
continue to reference the analyzers via the `AnalyzerProject` item.

* Use AnalyzerReference consistently

* Don't reference analyzer when its packaged

* Fix P2P reference

* Fix multi target roslyn component target condition
2022-05-12 09:22:26 +02:00
Adeel Mujahid 4141913109
Fix typos (#69011) 2022-05-07 11:55:53 -07:00
Jan Kotas b59c6491dd
Rename CoreRT to NativeAOT (1/N) (#68888)
Co-authored-by: Theodore Tsirpanis <teo@tsirpanis.gr>
2022-05-05 18:14:28 -07:00
Igor Velikorossov 3088b0549d
Update breaking-change-rules.md (#66978)
* Update breaking-change-rules.md

Add the rule for the removal of finalizers

* Update breaking-change-rules.md

* Update breaking-change-rules.md

* Update breaking-change-rules.md

* Update breaking-change-rules.md
2022-04-14 17:19:47 -07:00
Viktor Hofer 538934c25f
Only add placeholder pkg file if folder is empty (#67647)
* Only add placeholder pkg file if folder is empty

Originally reported in https://github.com/dotnet/runtime/issues/63413,
placeholder files are added unconditionally by the .NETStandard compat
error packaging infrastructure, even if the
buildTransitive/$(SupportedTFM) folder isn't empty.

That hinders our libraries to package their own set of buildTransitive
props and targets files for the supported set of tfms.

This change makes sure that placeholder files are added only if no None
or Content items are declared that point to the same package folder.

Adding documentation that explains the .NETStandard compatibility
packaging infrasturcture and how to correctly package hand-authored
msbuild files next to the generated targets files.

* Fix NETStandardCompatError empty cases

* Update packaging.targets
2022-04-12 22:16:00 +02:00
Adeel Mujahid 1094cee781
Update coding-style.md (#67801)
* Remove mention of outdated formatting script and C++ language that was removed from libraries.
* Move C# coding style at the top of document.
2022-04-09 06:37:05 -07:00
Eric Erhardt 7508080ebc
Update coding-style to include target-typed new() guideline (#67061)
* Update coding-style to include target-typed new guideline

Similar to `var` usage, `new()` usage is only allowed when the Type can be understood from the same line.

Fix #53369

* Fix coding style violations
2022-03-23 18:54:51 -06:00
Elinor Fung c2ec86b1c5
Rename `GeneratedDllImportAttribute` -> `LibraryImportAttribute` (#66307) 2022-03-09 18:07:52 -08:00
Jan Kotas 17662fc30c
Replace TargetFrameworks with TargetFramework where possible (#66198) 2022-03-04 22:21:59 -08:00
Elinor Fung a0635832f1
Rename `DllImportGenerator` project to `LibraryImportGenerator` (#66029) 2022-03-03 22:17:23 -08:00
Viktor Hofer 9ebe0efa48 sfx+oob split, shim project refactoring, P2Ps
Split the build of shared framework and out-of-band projects so that
it's possible to just build the shard framework projects, which was
requested by the CLR teams. In the next infrastructure rollout, the
current "libs.ref+libs.src" subsets should be removed. Generate the
targeting pack with an incomplete (without shims) frameworklist as part
of the "libs.sfx" subset.

Build the shim projects after the shared framework and oob projects and
re-generate the targeting pack's frameworklist to include the shims.

Refactor the shims so that they aren't grouped anymore by generated &
manual. Instead group them by "ref" and "src" same as other libraries
in the tree which allows to reference the source project shims and read
from the ReferenceAssembly metadata.

Use ProjectReferences in traversal projects and shim projects instead
of named references that point to binplace directories (see graph below)
This allows to build parts of the product dynamically, i.e. the shim
projects, apicompat.proj, sfx.proj and oob.proj.
2022-02-24 12:32:04 +01:00