Commit Graph
35 Commits
Author SHA1 Message Date
Viktor Hofer ef7a0e676a Enable XUnit Analyzers (dotnet/corefx#38676)
* Enable XUnit Analyzers


Commit migrated from https://github.com/dotnet/corefx/commit/b8a7f34e1b64e5c594f591aa8683f34506eb9736
2019-07-05 22:50:57 +02:00
Vatsan Madhavan 94941c9367 Move XamlAccessLevel to System.Windows.Extensions.dll
WPF needs continued access to XamlAccessLevel type. System.Xaml.Permissions.XamlLoadPermission also needs to use XamlAccessLevel.

WPF is trying to remove its references to System.Security.Permissions. In order to complete this work, XamlAccessLevel is being moved to System.Windows.Extensions.dll (while leaving XamlLoadPermission in System.Permission.dll as-is). This will allow WindowsDesktop.App to bundle System.Windows.Extensions.dll (but not carry System.Security.Permissions.dll).



Commit migrated from https://github.com/dotnet/corefx/commit/758b1bfe0693801c3ac3e1b3b103a3b5e64be14a
2019-07-03 16:27:05 -07:00
Anirudh Agnihotry 64b32f4a7b Font converter implementation made similar to netfx (dotnet/corefx#39098)
* Font converter implementation made similar to netfx

* addressing feedback and fixing tests for spanish ci leg

* name changes and checking the paramter name in argument Exception

* fixing netfx failures and removing some redundant code


Commit migrated from https://github.com/dotnet/corefx/commit/9635883cfc69eee3161693715a522ddecca05794
2019-07-03 15:59:39 -07:00
Dan Moseley cf46ce735f Disable some tests for Windows IoT (dotnet/corefx#38912)
* Disable for IoT

* IconConverter tests

* S.DS

* S.DS.AM

* typo

* Fact to Theory


Commit migrated from https://github.com/dotnet/corefx/commit/56e68cff21c62181bb0b8d8d3302cbbbeef8eb57
2019-06-26 09:36:14 -04:00
Viktor Hofer 5f98ba6a2b Enable project restore for test projects (dotnet/corefx#38151)
* Factor out repo restore into seperate props/targets

* Use configuration system msbuild sdk

* Remove XUnit.Runtime.depproj

* Remove TargetGroup usages in test projects

* Fix ILLink configuration

The ILLink package contains netcoreapp2.0 assets which are compatible
with netstandard2.0. Removing the old TargetFramework to restore
successfully.

* Remove usages from TargetGroup in Directory.Build.props

* Remove dead net4* configurations

* Change tests.builds to tests.proj sdk proj

* Make externals dir proj an sdk project

* Consume Microsoft.DotNet.CoreFxTesting as an msbuild sdk

* Use runtimeconfig.template.json

* Remove SupplementalTestData

* Map shared framework version to product version

* Stop binplacing tests

* Move some tool depprojs to targets during restore

* Remove dead code

* Use PackageReference instead of RefFromRuntime in test

* Disable using an apphost

* Copy compression testdata manually cause unicode bug

* Remove target batching in optimizationData

* Reference packaging tools from CoreFx.Private.TestUtilities


Commit migrated from https://github.com/dotnet/corefx/commit/c4c1985531cc1f25c805bbc4801b85c98e0dfee0
2019-06-15 21:27:13 +02:00
Anirudh Agnihotry 7478a2036d fixing image Convertion from icon (dotnet/corefx#38108)
Commit migrated from https://github.com/dotnet/corefx/commit/fd90e2845c688115d1ddb54a05a2c16a7f8710a5
2019-05-31 12:02:41 -07:00
Viktor Hofer ba11d53cc1 Use Arcade DotNetTool and NuGetPackageRoot (dotnet/corefx#37647)
* Use Arcade props

* Use global dotnet if applicable

Commit migrated from https://github.com/dotnet/corefx/commit/f42e04b8d4be76b1818cf263ff06234d0e25ada0
2019-05-17 03:39:21 +02:00
Stephen Toub 17974d4c53 Use better Array.Copy overload (dotnet/corefx#37548)
Just a little cleanup.  When we're working with T[]s, use Array.Copy that takes a lower bound, explicitly passing in 0, rather than forcing the implementation to query GetLowerBound() on each array.

Commit migrated from https://github.com/dotnet/corefx/commit/e72c6c53baddb02a630e8e6592a59d89e30b856b
2019-05-09 12:43:45 -04:00
Eric StJohn 55c73ba75c Add System.Resources.Extensions (dotnet/corefx#36906)
* Add System.Resources.Binary.Reader|Writer

* Fix ResourceWriter tests

* Test fixes and PR feedback

* More test fixes

* Add packages for System.Resources.Binary.*

* Suppress duplicate types in System.Resources.Binary.*

* Test refactoring and adding RuntimeResourceSet

It turns out me must have our own ResourceSet since the CoreLib resource set doesn't
expose a constructor that takes an IResourceReader.

I've shared the code since it does a bit of non-trivial caching.

* Don't use auto-property initializers for platfrom sensitive test data

For some reason I thought these lazy-initialized the properties but they don't.

As a result we were hitting the platform sensitive code even when we never
called the getter.  Switch to an expression instead.

* Only use Drawing converters on Windows

* Fix test failures

* Don't leak System.Private.CoreLib into resources

* Make sure RuntimeResourceSet doesn't call ResourceReader(IResourceReader)

* WIP

* Rename types in System.Resources.Extensions

Leave RuntimeResourceSet internal as it doesn't need to be public.

* Update packages

* Respond to API review feedback

Remove abstraction for ResourceReader/Writer: just reuse the source.

Remove non-essential members.

* Clean up

* Further cleanup

* Further cleanup

* Review feedback

* Ensure we have stable type names in Resources.Extensions

We don't want to use the runtime type identity when doing type checks or writing
types as this may change.  Instead, check-in hard-coded strings that match the
type identity.

Add a test case to ensure the resources we generate match what we
test the reader against in the resource manager case (also to track any
change to the binary format).


Commit migrated from https://github.com/dotnet/corefx/commit/da36ea268c778200dc676d294667eb76146e1a01
2019-04-25 22:05:19 -07:00
Anirudh Agnihotry 13bcbac614 improving error message for non-windows platform (dotnet/corefx#37193)
Commit migrated from https://github.com/dotnet/corefx/commit/3fd90668431a51fc1c0ec330db20d1dfde7c147d
2019-04-25 12:54:10 -07:00
Tanner Gooding 5a5ed7652a Regenerating reference sources in order to reorder enum fields (dotnet/corefx#37045)
Commit migrated from https://github.com/dotnet/corefx/commit/17382def0f680653870c31af1acf086ac41dcc0b
2019-04-23 13:40:45 -07:00
Anirudh Agnihotry 9f77a01a1a Added code for removing oleHeader (dotnet/corefx#36891)
* added code for removing oleHeader and modifiying it to use span

* updating the testdata version and reading only the header signature first

* removing size check on the size of object header as welll as we are catching ArgumentOutOfRangeException

* Updating verison numbers


Commit migrated from https://github.com/dotnet/corefx/commit/eb9b565f13905624ba01464c876dc06a83a3d9e2
2019-04-22 15:14:35 -07:00
Anirudh Agnihotry b36a1514ef adding default encoder as png when we are not able to find encoder (dotnet/corefx#36937)
Commit migrated from https://github.com/dotnet/corefx/commit/dbbabfbf3e5a355b9bde2a01f2effde96631242a
2019-04-16 23:22:12 -07:00
Viktor Hofer ad3bc59e9a Update testdata versions (dotnet/corefx#36938)
* Update testdata versions

* Bump versions in projects and group in TestData

* Fix typo


Commit migrated from https://github.com/dotnet/corefx/commit/e5d2b5291277dbd7444d0a17a2bff4784265d917
2019-04-16 20:40:30 -04:00
Stephen Toub dce7647bbc Clean up lots of string.Format / SR.Format usage (dotnet/corefx#35777)
* Clean up lots of string.Format usage

This PR does a few things:
- Adds new SR.Format overloads, in particular to support accepting an IFormatProvider as the first argument.
- Fixes a bunch of calls to string.Format that should have been using SR.Format.  This not only helps in AOT builds where we want to be able to more cleanly remove resource strings, it enables easier auditing of the remaining string.Format uses to determine whether there are more appropriate implementations.
- Replaces some string.Format uses, in particular in asserts, with easier to read and maintain string interpolation
- Replaces some string.Format uses with string concatenation where it's simple and cheaper
- Fixes a bunch of SR.Format(SR.Something) calls where the SR.Format part is extraneous and should just be removed.
- Replaces a bunch of Debug.Assert(false, ...) calls with Debug.Fail(...).  This isn't directly related to string.Format, but I started this cleanup as part of cleaning up asserts that were using string.Format, and then ended up accidentally merging the chain into the same commit, and decided it was simple enough that I should just leave it rather than trying to separate it out again.

* Address PR feedback

* Fix breaks due to lower netstandard builds


Commit migrated from https://github.com/dotnet/corefx/commit/a6f76f4f620cbe74821c6445af3f13e048361658
2019-03-06 12:03:00 -08:00
Viktor Hofer f8a8530d0f Project msbuild syntax cleanup (dotnet/corefx#35686)
* Remove license header from non-shipping files

* Remove obsolete Project attributes

* Remove xml header and remove DefaultTargets


Commit migrated from https://github.com/dotnet/corefx/commit/c390ce7df50252e11f5d322276e9d19e046d1332
2019-03-03 18:55:25 +01:00
Ahson Khan 4fed6ab881 Auto-generate the reference assemblies and separate type forwards (dotnet/corefx#35557)
* Auto-generate the reference assemblies

* Add back type forwards.

* Revert "Add back type forwards."

This reverts commit dotnet/corefx@3acf74aabb.

* Add back TypeForwardedTo in .Forward.cs files

* Add new type forward files to the csproj files

* Add back if-defs and move TestUtilities comment from ref to source

* Remove duplicate definitions, delete unnecessary manual files,

* Fix build breaks

* Add back missing AsyncMethodBuilderAttr to S.Runtime ref

* Fix typo between XmlDocument and XPath.XDocument

* Add type forward fild missed from previous commit

* Fix ECDiffieHellmanCngPublicKey internal ctor for netfx 4.6.1

* Remove "this type was moved to comments" from the type forwards.

* Add back the Xml and Debugger* attributes to Xml.ReaderWriter

* Add back struct layout attributes

* Add back attributes missing (highlighted from api compat)

* Add missing toolbox item attribute in s.data.common.

* Add missing struct layout attributes and remove unnecessary additions

* Add back InterfaceTypeAttribute


Commit migrated from https://github.com/dotnet/corefx/commit/16689aa0a933517dc45465fc6edb6223222414a6
2019-02-27 19:39:21 -08:00
Krzysztof Wicher 3ed51b67e9 Fix casing of files to get closer to ./build.sh -allConfiguration working on linux (dotnet/corefx#35085)
* Rename directories to use CamelCasing

* Fix CsProj files to match file names and their casing

* fix couple of Compile items which were not in csproj file


Commit migrated from https://github.com/dotnet/corefx/commit/8c5260061b11323dfd97fbab614d54402405513f
2019-02-07 10:41:44 -08:00
Dan Moseley bb0d84f522 Some test fixes (dotnet/corefx#35092)
* Disable Media test on NETFX

* Fix S.R.E for Uapaot

* Disable varargs for PN

* missing method 'AssemblyLoadContext..ctor(bool)

* IO test

* Fix UapAot RuntimeInformation tests

* Set correct tfm for AppDomainTests

* Merge driveonly tests into one

* Revert math


Commit migrated from https://github.com/dotnet/corefx/commit/0a751af9afe28042a720411925e6e6c55bdc10cc
2019-02-06 16:53:59 +01:00
Maryam Ariyan 84fe28a486 Add test using short timeout throws WebException (dotnet/corefx#34856)
* Add test using short timeout throwing WebException

Fixes: dotnet/corefx#34849

* Make test conditional and target internal location

* code cleanup


Commit migrated from https://github.com/dotnet/corefx/commit/a3df534fca15e6053aab748e020006a5cb3b0d31
2019-01-26 09:26:19 -05:00
Stephen Toub 5002206b0e Make more SoundPlayer tests conditional (dotnet/corefx#34854)
Commit migrated from https://github.com/dotnet/corefx/commit/0fee9027bb97aa8dcda5cbc23f15d923e4b19d34
2019-01-25 15:00:33 -05:00
Maryam Ariyan 1914cd17d1 Test Fix: Add IsSoundPlaySupported condition to skip on Nano (dotnet/corefx#34820)
* Test Fix: Add IsSoundPlaySupported condition to skip on Nano

Fixes: dotnet/corefx#34808

* Removed Helpers class


Commit migrated from https://github.com/dotnet/corefx/commit/dfb8fd883963de134fd09b54c61ac8da5ad573bf
2019-01-24 17:06:44 -08:00
Stephen Toub 9481b4fe9c Replace thread aborts in SoundPlayer (dotnet/corefx#34815)
This only addresses the issue of SoundPlayer using Thread.Abort, replacing it with cancellation.

Commit migrated from https://github.com/dotnet/corefx/commit/2100e4f54637c124bdf880c7c036b4c79053e72f
2019-01-24 19:21:39 -05:00
Maryam Ariyan b608d6b368 Expose System.Media.SoundPlayer in System.Windows.Extensions (dotnet/corefx#34649)
* Port System.Media members
* Add System.Media tests

Commit migrated from https://github.com/dotnet/corefx/commit/438e6af0b9d69610b25417da41ea00b2830d1b0d
2019-01-23 17:19:21 -08:00
Stanislav Ushakov 232de53a7c Fixed suppressed XML documentation errors (dotnet/corefx#34020)
* Fixed XML documentation tags for CoreFx.Private.TestUtilities

* Fixed XML documentation tags for System.Diagnostics.Process

* Fixed XML documentation tags for System.ComponentModel.Composition

* Fixed XML documentation tags for System.ComponentModel.Primitives

* Fixed XML documentation tags for System.ComponentModel.TypeConverter

* Fixed XML documentation tags for System.Data.Common

* Fixed XML documentation tags for System.Data.SqlClient

* Fixed XML documentation tags for System.Diagnostics.PerformanceCounter

* Fixed XML documentation tags for System.Diagnostics.StackTrace

* Fixed XML documentation for System.Diagnostics.TraceSource

* Fixed XML documentation for System.IO.Compression.ZipFile

* Fixed XML documentation for System.IO.Compression

* Fixed XMl documentation reference according to review notes

* Fixed XML documentation tags for System.IO.MemoryMappedFiles

* Fixed XML documentation tags for System.IO.Pipes

* Fixed XML documentation tag for OSX interop in System.Diagnostics.Process

* Fixed XML documentation tags for CoreFx.Private.TestUtilities for Unix

* Fixed XML documentation tags for System.Linq.Expressions

* Fixed XML documentation for System.Linq.Parallel

* Fixed XML documentationt ags for System.Linq

* Fixed XML documentation tags for System.Management

* Fixed XMl documentation tags for System.Net.Http (left CS1573)

* Fixed XMl documentation tags for System.Net.Mail

* Fixed XML documentation tags for System.Net.NameResolution

* Fixed XML documentation tags for System.Net.Primitives - added T prefix for Socket as Primitives do not reference System.Net.Sockets

* Fixed XML documentation tags for System.Net.Sockets

* Fixed XML documentation tags for Unix interop files

* Fixed XML documentation tags for System.Net.Http (Unix)

* Fixed XML documentation tags for PlatformDetection.Unix.cs according to review notes

* Fixed XML documentation tags for OSX interop

* Ignore CS1574 for System.Linq as there is no ConcatIterator{TSource}.ToList for uap.

* Fixed XML documentation tags for FreeBSD interop

* Fixed XML documentation tags for System.Net.WebSockets

* Fixed XMLm documentation tags for System.Transactions.Local

* Fixed XML documentation for System.Security.Principal.Windows

* Fixed XML documentation for System.Drawing.Common

* Fixed XML documentation for System.Net.NetworkInformation

* Fixed XML documentation tags for System.Private.XML (left CS1589)

* Fixed XML documentation tags for System.Security.Cryptography

* Fixed XML documentation for System.Runtime.WindowsRuntime

* Fixed XML documentation tags for System.Security.Cryptography.Xml

* Fixed XML documentation tags for System.Security.Cryptography.Primitives
CS3016 was added by mistake as part of dotnet/corefx#32934 so I removed it.

* Fixed XML documentation tags for System.Linq: added M to ToList method as it is not accessible by uap builds.

* Fixed XML documentation tags for System.IO.FileSystem

* Fixed XML documentation tags for System.Security.Cryptography.*

* Fixed XML documentation for System.IO.Ports

* Fixed XML documentation tags for System.Private.Reflection.Metadata.Ecma335

* Fixed XML documentation tags for System.Windows.Extensions

* Fixed XMl documentation tags for System.Console

* Fixed XML documentation for System.IO.FileSystem.DriveInfo

* Fixed XML documentation tags for System.Runtime.Extensions

* Fixed XML documentation tags for System.Drawing.Primitives.
Left CS1589 as there is no 'doc\KnownColor.uex' file.

* Fixed XMl documentation for System.Runtime.WindowsRuntime.
Had to add M prefix to 'Windows.Foundation.IAsyncAction' as Windows.Foundation is not accessible at compilation time.

* Fixed XML documentation tags for System.Private.Xml

* Fixed XML documentation tags for System.Private.Reflection.Metadata.Ecma335
Had to add a prefixes to: 'T:System.Collections.Immutable' and 'M:Enumerable.ToArray{TSource}' as they are not available for uap at compilation time.

* Fixed XML documentation tags for System.Net.WebSockets.WebSocketProtocol

* Fixed XML documentation tags for System.Net.WebSockets.WebSocketProtocol

* XML documentation tags fixes: changes after review.


Commit migrated from https://github.com/dotnet/corefx/commit/f7539b726c4bc2385b7f49e5751c1cff2f2c7368
2018-12-17 09:15:22 -08:00
AraHaan f108845249 Turn on xml documentation validation globally. (dotnet/corefx#32934)
* Turn on xml documentation validation globally.

* Ignore warning 1591 globally.

* Fixed build failures.

* Move the Original DocumentationFile Condition to the Group.

Now NoWarn has no Condition on it.

* Fixed NoWarn overwrite.

* Update Directory.Build.props

* Update System.Runtime.CompilerServices.Unsafe.ilproj

* Update file on github web.

Sadly it seems I can only do this on my phone now. RIP

* Update System.Security.Cryptography.Csp.csproj

* Update Directory.Build.props

* Suppress some warnings.

* Fixed remaining compile errors.

* Update System.Diagnostics.StackTrace.csproj

* Update System.Security.Cryptography.Xml.csproj

* Fixed xml documentation typo in Microsoft.VisualBasic.

* Fixed missing suppressions.

* Suppress more errors.

* Suppress more errors.

* Suppress more errors.

* Suppress even more errors.

* Suppress more errors.

* Update Directory.Build.props

* Suppress more errors.

Also fix a documentation issue specific to OSX.

* Suppress more errors.

* Suppress more errors.

* Disable xml documentation for System.Diagnostics.Process.

* Do not overwrite NoWarn.

* Enable docs for S.D.P


Commit migrated from https://github.com/dotnet/corefx/commit/6abb4cd0bafa2a3c7486fb23bcc611bd211d0f8e
2018-12-08 22:21:50 -08:00
Maryam Ariyan 41e534fd22 Port System.Drawing.Printing.MarginsConverter (dotnet/corefx#33640)
* Exposes System.Drawing.Printing.MarginsConverter

Adds tests for MarginsConverter

Fixes dotnet/corefx#33441

* sort usings

* - nit fixes
- whitespace formatting
- code cleanup

* Fix formatting

* Moves MarginsConverter to System.Windows.Extensions

* Add missing using statement and remove extra line

* Apply PR feedback, undo caching.

* Fixing test failures on netfx

* Add comments and put mono headers

* Replace source code with referencesource content

* Cleanup

* Removing SuppressMessage Attributes

* Keeps FullFramework condition to show subtle differences

* Remove duplication

* Updating test and keeping fullframework code for CreateInstance


Commit migrated from https://github.com/dotnet/corefx/commit/a53d140654fe049036b9e9faee05371ebb6cdcb4
2018-11-30 19:47:12 -06:00
Viktor Hofer 42ab46b3a6 Rename GdiPlusIsAvailable in System.Drawing.Common
Commit migrated from https://github.com/dotnet/corefx/commit/a73fa3bc5c50da7affe9e0624dc8bab29ba720b8
2018-11-19 13:14:44 -08:00
Stano Peťko 2dcd694376 TypeConverters for System.Drawing (dotnet/corefx#33092)
* Moved InvalidAsynchronousStateExceptionTests to the InvalidAsynchronousStateException project.

* Added Font, Icon, Image and ImageFormat converters.

* Source code in "ref" is in one file

* Converters are only for Windows.

* TypeConverter attribute is only for netcoreapp.

* Icon can be converted to Bitmap, some tests skipped on NETFX.

* Bitmap as not supported conversion removed from tests.

* Typo

* TypeConverterAttribute in ref project

* TypeConverterAttribute is with full name in ref project

* IconConverter added to unix Icon

* Add netcoreapp3.0 ref assembly containing TypeConverters in windows.extensions

* Addressed comments: project reference, invalid cast.

* Make all references for netcoreapp project references, delete references for netstandard


Commit migrated from https://github.com/dotnet/corefx/commit/78cf4e450180c62ebbdb8b306b757103bea0cfc5
2018-11-09 11:45:45 -08:00
Wes Haggard 954fb511b3 Rename AssemblyKey properties to StrongNameKeyId as part of arcade work
Commit migrated from https://github.com/dotnet/corefx/commit/7edd861bf2dd59ecdb4284e0fd291d7458198a9d
2018-10-30 15:14:01 -07:00
Wes Haggard fdaa34aa92 Move new packages to 3.0 as supported versions
Commit migrated from https://github.com/dotnet/corefx/commit/b45f4c09123b15a36b1f5633204e5f2c5ab583d6
2018-08-29 09:38:26 -07:00
Dan Moseley 08d3e261af Add VB test project (dotnet/corefx#31455)
* Add VB test project

* Fix VB Guid


Commit migrated from https://github.com/dotnet/corefx/commit/1750822c9e7861c6c0eed02821c809e93cb5ef85
2018-07-29 12:03:18 -07:00
Anirudh Agnihotry d7f0eed749 Added Tests and packaging for System.Windows.Extensions. (dotnet/corefx#31334)
* Adding packaging for System.Windows.Extensions

* Implemenation fixed and tests added

* feedback and dead code removed


Commit migrated from https://github.com/dotnet/corefx/commit/2de91853bcc016958950c42e27cfa40e7d84cabe
2018-07-25 14:58:16 -07:00
Dan Moseley e4a0a6e516 Fix vbproj build in VS and update configurations (dotnet/corefx#31303)
* Update configurations including .vbproj

* merge


Commit migrated from https://github.com/dotnet/corefx/commit/313d0d29725a347b5ef869aa9de0e9b545be0205
2018-07-24 12:47:44 -07:00
Anirudh Agnihotry 6b008468a9 Porting X509Certificate2UI to .Net Core (dotnet/corefx#31111)
* Ref build Successful

* Basic tests proj added

* src build Successful

* Moved from framework

* Moved handles

* build successful

* build successful

* strings added and build fixed

* Interop guidelines followed

* ref and src build properly

* BasicTests

* minor changes

* namespace name change

* Feedback addressed

* fixing reference build

* name of function changed and using using statement

* changing parameter to X509Certificate2


Commit migrated from https://github.com/dotnet/corefx/commit/a6159bb0929b5eb8b297a9a8ebba595d5f3a9bb0
2018-07-19 11:48:43 -07:00