* Enable DllImport generator for all source projects.
* Convert OleDb to only use GeneratedDllImport.
* Update source generator to distinguish between "no marshalling info"
which can cause a failure vs "missing support" which enables us to
fallback to the marshalling forwarder.
* Remove unused DllImports.
* Reuse existing P/Invoke definitions.
* First round of converting System.Data.OleDb to COMWrappers
This change just remove warning from ILLink and do not make attempt
to convert other COM object creation to use ComWrappers
Also I have to add target net5.0-windows where ComWrappers would be
used. Same concerns regarding testing as in
https://github.com/dotnet/runtime/pull/54636
Two calls inside OleDbDataAdapter call GetErrorInfo but do not do anything with results. That's probably mistake from previous refactoring. These parts does not touched and left as is. Need advice on that specific parts how to proceed.
* Update src/libraries/System.Data.OleDb/src/OleDbComWrappers.cs
Co-authored-by: Aaron Robinson <[email protected]>
* Update src/libraries/System.Data.OleDb/src/OleDbComWrappers.cs
Co-authored-by: Aaron Robinson <[email protected]>
* Apply PR recommendations
* Make closer to original
* One more change
* Apply PR feedback
* Update src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj
Co-authored-by: Viktor Hofer <[email protected]>
* Update src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj
Co-authored-by: Viktor Hofer <[email protected]>
* Fix compilation errors
* Fix errors
* Consolidate code
* Fix compilation warnings
* Fix compilation error
* Fix compilation error
* Address PR feedback
* Update PR feedback
* Address PR feedback
* Direct cast
* Ask wrapper to implement IDisposable
* Update src/libraries/System.Data.OleDb/src/OleDbConnection.COMWrappers.cs
Co-authored-by: Eric Erhardt <[email protected]>
* Update src/libraries/System.Data.OleDb/src/OleDbComWrappers.cs
Co-authored-by: Eric Erhardt <[email protected]>
* Update src/libraries/System.Data.OleDb/src/OleDbComWrappers.cs
Co-authored-by: Eric Erhardt <[email protected]>
* Update src/libraries/System.Data.OleDb/src/DbPropSet.COMWrappers.cs
Co-authored-by: Eric Erhardt <[email protected]>
* Restore changes in OnInfoMessage
* Consolidate different part of code
* Remove junk (probably from merge)
* Found that last commit was a mess
* Remove no longer needed annotations
* Apply suggestions from code review
Co-authored-by: Aaron Robinson <[email protected]>
* Update src/libraries/System.Data.OleDb/src/OleDbComWrappers.cs
Co-authored-by: Aaron Robinson <[email protected]>
* Free BSTR
* Remove reference to no longer used files in this PR
* Add data
* Fix compilation errors
* Last blow to compiler
Co-authored-by: Aaron Robinson <[email protected]>
Co-authored-by: Viktor Hofer <[email protected]>
Co-authored-by: Eric Erhardt <[email protected]>
* Simplfy .NETFramework tfms
Libraries which target .NET Framework usually have rid agnostic tfms,
i.e. net461. If the library targets netstandard2.0-windows as well,
the .NET Framework tfm must be rid specific, as rid specific
.NET Framework apps would otherwise pick the .NETStandard asset over
the .NETFramework one (based on the RID compatibility rules)
There is yet another reason that requires .NETFramework tfms to be RID
specific, which is when a project P2Ps other projects which are
rid-specific. Without the RID specific .NETFramework tfm, a compatible
.NETStandard asset would be picked instead.
NuGet doesn't support setting a TargetPlatform in the TargetFramework
alias when targeting .NETFramework or .NETStandard. Any such tfms in
dotnet/runtime are currently leveraging a hack that strips the
TargetPlatform / TargetFrameworkSuffix away during restore and packaging
(as NuGet Pack uses the project.assets.json file).
As NuGet will likely never support RID specific .NETFramework tfm
aliases, the distinction between a RID specific and a RID agnostic
.NETFramework tfm is unnecessary.
Remove all "TargetFrameworkSuffixes" / TargetPlatforms / RIDs
(whatever you would like to call them) from .NETFramework tfms and let
the packaging targets handle the cases where a RID specific asset is
required in the package.
Explictly don't set TargetsWindows to true for .NETFramework builds as
the Targets* properties are infered from the platform / suffix and
many projects make the assumption that net461
(without the "-windows" part) doesn't set TargetsWindows=true.
Fixes https://github.com/dotnet/runtime/issues/58495
* Warn on .NETFramework duplicate runtime assets
* Ignore .NEtFramework non Windows and non empty RIDs
Also cleaning up the packaging.targets file and removing
the ExcludeFromPackage option which isn't needed anymore as
target frameworks aren't excluded from packages produced in
dotnet/runtime anymore.
* Remove EOL tfms and upgrade to net7.0
* Make linker tests net7 aware
Make installer tests run on net7.0
Don't attempt to use live apphost
Fix payloads
Regenerate test files
Fix package testing
With the newest udpate of slngen, the order of elements (configuration, folders, etc.) is in sync with how Visual Studio arranges them.
Also the order is now deterministic.
Based on that, updating all solution files to have the correct ordering of elements. This change also unblocks adding CI protection for
making sure that solution files are up-to-date in regards to their dependencies as slngen is now generating the files deterministically.
* Update dependencies from https://github.com/mono/linker build 20210811.1
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21409.3 -> To Version 6.0.100-preview.6.21411.1
* Update dependencies from https://github.com/mono/linker build 20210811.2
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21409.3 -> To Version 6.0.100-preview.6.21411.2
* Update dependencies from https://github.com/mono/linker build 20210811.3
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21409.3 -> To Version 6.0.100-preview.6.21411.3
* Suppress trimmer warning
* Fix warning code value
* Fix netstandard build of libs
* Revert the code fix and just fix the XML suppression
* Revert project change
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: vitek-karas <[email protected]>
* Automatically generate .NETStandard compat errors
Before this change, a project had to explicitly add a
NETStandardCompatError item to declare that a given tfm range
shouldn't be supported when packaging.
Automate this logic so that projects don't need to specify the item
themselves anymore. Instead condition the NETStandardCompatError target
calcuation logic on the existence of both a .NETStandard and a
.NETCoreApp tfm.
* Update Directory.Build.targets
* Update packaging.targets
* Update eng/packaging.targets
Co-authored-by: Santiago Fernandez Madero <[email protected]>
Co-authored-by: Santiago Fernandez Madero <[email protected]>
* Remove old fwlink from Obsolete messages and make message improvements
* Thorough review and update of Obsolete messages
* Cleanup
* Make messages about unsupported APIs more consistent
* Update RequiresUnreferencedCodeAttribute messages to be consistent between ref and src
* Cleanup
* Cleanup
* Use 'not supported' instead of 'no longer supported'
* Omit unnecessary error:false from Obsolete attributes. Fix message typo.
* Remove old comment
* PR feedback
* Update linker warning suppressions
https://github.com/mono/linker/pull/2145 warns when accessing members
annotated with DynamicallyAccessedMembers using reflection, and
https://github.com/mono/linker/pull/2162 updates the warning origin of
warnings for DynamicallyAccessedMembers on types.
This adds suppressions for the new warnings.
* Add windows-specific suppressions
* Update dependencies from https://github.com/mono/linker build 20210729.2
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21379.2
* Fix failures and address feedback
- Annotate mono's EnumBuilder and TypeBuilder
- Add (non-unique) readable short names to the warning codes
* Update dependencies from https://github.com/mono/linker build 20210730.2
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21380.2
* Suppress IL2111
* Update dependencies from https://github.com/mono/linker build 20210802.2
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21402.2
* Feedback
- Suppress IL2111 in trimming tests
- Remove unnecessary DynamicDependency
- Fix indentation
* Update readable warning names
Co-authored-by: Sven Boemer <[email protected]>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
* Use property to indicate NetCoreApp min version
* Add NetCoreAppCurrent to S.Numerics.Tensors
* Add NetCoreAppCurrent to S.T.AccessControl
* Add NetCoreAppCurrent to System.Memory.Data
* Add NetCoreAppCurrent to S.Composition.* projects
* Add NetCoreAppCurrent to System.IO.Packaging
* Add NetCoreAppCurrent config to System.IO.Ports
Adding a NetCoreAppCurrent configuration to System.IO.Ports and
reducing package size, build times and platform specific assets by
using runtime checks on Unix derivates for the slightly diverging
SerialPort implementation.
Contributes to https://github.com/dotnet/runtime/issues/54012
* Add NetCoreAppCurrent to System.Data.OleDb
* Add NetCoreAppCurrent to M.W32.Registry.AccessControl
* Add NetCoreAppCurrent to S.Reflection.Context
* Add NetCoreAppCurrent to S.C.Composition.Registration
* Add NetCoreAppCurrent to S.Resources.Extensions
* Add NetCoreAppCurrent to S.N.H.WinHttpHandler
* Expose missing refs from runtime in targeting pack
The platform analyzers warns for usages of APIs which aren't available
on specific platforms. Exposing the missing reference assemblies which
are already part of the runtime pack in the targeting pack.
The big benefit of doing so is that customers don't need to reference
the corresponding packages to target these APIs and that these five
packages can be dead-ended.
For more in-depth reasoning, see the detailed summary:
https://github.com/dotnet/runtime/issues/53892#issuecomment-858542280
Fixes https://github.com/dotnet/runtime/issues/53892
* Update dependents of dead-ended packages
Update depents by referencing the latest available package. Making sure
that packages are never used on NetCoreAppCurrent by applying
.NETCoreApp version conditions.
* Fixes
* Remove pkg validation suppression file
* Update Windows Compatibility pack
* Fix DirectoryServices pkg references
* Fix netfx Pkcs restore/build
* Fix version conflict
* Packageindex and nits
* nits
* Remove the use of IsPartialFacadeAssembly in refererences
This flag requires assembly-re-writing to replace type-defs in reference
assemblies with type forwards, when the same type exists in references.
We've pretty much exclusively used this on .NETFramework, since it's
not friendly to source build (CCI isn't part of source build).
.NETFramework isn't going to be changing so it doesn't save us much
to generate these typeforwards in the build.
We also used these to make sure the netstandard surface area was
compatible with .NETFramework facades (we'd use the pre-rewritten
reference assemblies for contract), but this need goes away now that we
have package validation based APICompat that compares netstandard refs
to net4x facades.
* Fix some projects I missed after changing naming convention
* Fixup another project
* Fix build of System.System.Threading.AccessControl
* Adding a section to ref-source docs on .NETFramework facades
* Address feedback
* Adding infrastructure to run the linker on OOB Assemblies manually
* Refactoring to abstract shared infrastructure
* Add OOB ignore list
* Address PR comments
* Rename properties so they don't intentionally get reused
* Addressing PR Feedback
* Addressing PR Feedback
Mostly just replacing string.Format calls with equivalent interpolated string uses. In some cases, I replaced lots of string creations with a StringBuilder or equivalent.
* Update public SafeHandle types to have public parameterless constructors.
Remove now-unneeded ILLink trim files.
Make public abstract SafeHandle constructors protected.
Remove comment on SafeWaitHandle
* Make SafeHandle constructors public for internal types.
Make internal abstract SafeHandle default constructors protected. Make non-abstract internal SafeHandles sealed when possible.
More internal SafeHandle types.
* Add new Marshal.InitHandle API.
Fix SetHandle accessibility
Fix test.
Use Marshal.InitHandle.
* PR feedback.
* Remove trailing whitespace.
* disable vs restore in vs for projects targeting platform specific older frameworks
* Add infra to auto-update solution files for restore
* Add NuGet.config files for solutions affected by restore issue
Co-authored-by: Viktor Hofer <[email protected]>
* Add transitive CompilerServices.Unsafe dependency
for System.Memory and System.Threading.Tasks.Extensions package
references. Adding the dependency as a P2P to prefer the live asset
over the prebuilt.
* Move EditorAttribute to System.ComponentModel.Primitives
* Add EditorAttribute to types that had it in netfx and fix some DesignerSerializableAttributes
* PR Feedback
* PR Feedback
* Move DesignerSerializerAttribute to S.CM.Primitives and add to StringDictionary
* Add TolboxItemAttribute to types that had it in Desktop
* Remove TypeDescriptionProviderAttribute from DefaultGenApiDocIds
* PR Feedback, fix build
* mark System.Data.OleDb assembly as Windows-specific
* mark System.Windows.Extensions assembly as Windows-specific
* mark System.IO.FileInfo Encrypt and Decrypt methods as Windows-specific
* System.Runtime.InteropServices
* VB
* mark entire ComWrappers type as Windows-specific
* mark CspParameters class as Windows-specific
* Add DesignerAttribute to types that had it in full framework
* Move DesignerAttributeTests to Primitives and fix test errors
* Remove DesignerAttribute.cs from TypeConverter
* Annotate System.Data.Odbc for nullability
* Annotate System.Data.OleDb for nullability
* Suppress nullable warnings on netcoreapp < 3.0
* Mark System.Data.DataSetExtensions as null-annotated
* Fix null-check bug in System.Data.OleDb
- Remove depprojs which currently binplace external references into the RefPath folders in favor of PackageReference and PackageDownload items.
- Build all configurations by default when building an individual project (either on the CLI or inside VS) same as with the official SDK. This enables .NETFramework Test Explorer support.
- Centrally define libraries that compose the shared framework instead of in each Directory.Build.props file to be able to build the targeting pack first and consume it in the OOB libraries.
- Use ProjectReferences to reference OOB projects. Compile against the reference assembly but use the implementation assembly app-local during runtime.
- Remove OOBs from the testhost and remove the testhost folder for .NETFramework as it isn't required anymore.
- Only binplace for $(NetCoreAppCurrent) to compose a) the targeting pack, b) the runtime pack, c) the testhost, d) a full closure for the shims.
- Use Targeting Packs for OOB projects (with their implicit assembly references) but still explicitly define granular references for .NETCoreApp configurations (DisableImplicitAssemblyReferences switch). Use the implicit targeting pack references in some Microsoft.Extensions.* cases.
- Remove placeholder configurations as they aren't needed anymore with explicit P2Ps vs Targeting Pack references.
- Remove implicit assembly references (ie for .NETFramework, mscorlib)
- Remove AssemblySearchPath hacks that were introduced with b7c4cb7 as the targeting pack is now used by default.
- Reduce unnecessary .NETFramework configurations that were added to run tests in favor of the already existing ref&src configurations.
- Stop hardcoding the paths for wasm assemblies and use the returned TargetPath of the ProjectReferences.
- Addressed formatting (ItemGroups, References at the bottom of the project file, ordering of references, use LibrariesProjectRoot instead of a relative path, unnecessary AssemblyName and RootNamespace properties which are identical to the project name, ordering of tfms)
- Revert "fix clean (#33758)"