Граф коммитов

2166 Коммитов

Автор SHA1 Сообщение Дата
Immo Landwerth e0d566c7a1
Merge pull request #425 from terrajobst/add-security-md
Add SECURITY.md
2024-09-13 00:33:52 -07:00
Immo Landwerth ac13758d83 Update wording as this isn't a .NET Core related project 2024-09-12 10:57:40 -07:00
Immo Landwerth a815d5d356 Add SECURITY.md 2024-09-10 16:52:47 -07:00
William Godbe db8df4a7f2
Create tsaoptions.json (#422) 2024-07-31 10:10:08 -07:00
William Godbe d3c4055b36
Switch to 1es template (#416)
* Remove Codeql3000

* Switch to 1es templates

* Fix publish

* Fix nuget.config

* ^

* BL

* public stage

* No binlog

* params

* Fix it again
2024-03-07 17:24:33 -08:00
William Godbe 4844a3c7d1
Create azure-pipelines-public.yml (#415) 2024-03-07 15:06:47 -08:00
William Godbe 1231b77d79
Prepare for 5.3.0-preview1 (#401)
* Prepare for 5.3.0-preview1

* Update AssemblyVersions for formatting
2023-03-16 12:56:48 -07:00
Doug Bunting 509661e54f
Separate Microsoft.TestCommon more (#400)
- pre-restore and prebuild the project before anything that depends on it
  - avoid references from other test projects doing any real work
- make ordering even more explicit
  - avoid confusion between batching builds and `$(BuildInParallel)`
- turns out this also reduces the number of double writes binary logs show significantly
2023-03-15 15:20:25 -07:00
Doug Bunting 6949d439be
Restore `pushd` and `popd` (#397)
- oops, needed on TeamCity to find global.json
- left this unconditional, mostly for the odd local build from another folder
2023-03-07 16:39:29 -08:00
Doug Bunting 2da072a141
Use `msbuild` from VS 2022 if available (#395)
* Use `msbuild` from VS 2022 if available
  - should ease local and TeamCity builds
  - make `%InstallDir%` unquoted (unlike `%vswhere%`)
    - shorten `%Path%` slightly
  - nits:
    - use script location more; no need to change directories

* React to new build issues
  - follow up to #396
    (unsure why new FxCop and "spelling" errors didn't fail that PR)

* Put `PortReserver` users into an xUnit collection
2023-03-06 22:07:37 -08:00
Doug Bunting 6451d777f7
Throw `PlatformNotSupportedException` in `netstandard1.3` (#396)
- stop trying to use DCS in the JSON and XML formatters
- if `UseDataContractSerializer` or `!UseXmlSerializer`:
  - `CanReadType(...)` and `CanWriteType(...)` always return `false`
  - `ReadFromStreamAsync(...)` and `WriteToStreamAsync(...)` always `throw`
- change default XML formatter configuration to use `XmlSerializer`
- adjust and disable tests in reaction
- add tests of new `netstandard1.3` behavior
- nits:
  - correct namespace of `SerializerConsistencyTests`; was alone in previous namespace
  - s/DataContractFormatter/XmlSerializerFormatter/ to reflect actual `XmlMediaTypeFormatter` test actions
2023-03-06 17:26:11 -08:00
Doug Bunting cb7628ff70
Support `DBNull` in `netstandard1.3` assembly (#394)
* Support `DBNull` in `netstandard1.3` assembly
- available from the System.Data.Common package
- extend `DBNull` testing to include `net6.0`
  - s/NETCOREAPP/NETCOREAPP2_1/ where possible
- fix comments in `HttpValueCollectionTest`
  - comments about `DBNull` there were incorrect

* !fixup! Add `$(System.JobId)` to artifact names
- `publish` / `PublishPipelineArtifact@1` task doesn't overwrite an existing build artifact
  - bit different from `PublishBuildArtifacts@1`
- follow guidance at <https://learn.microsoft.com/en-us/azure/devops/pipelines/artifacts/pipeline-artifacts?view=azure-devops&tabs=yaml-task#q-can-i-delete-pipeline-artifacts-when-re-running-failed-jobs>
2023-03-01 16:53:44 -08:00
Doug Bunting d56a97f593
Rename Formatting projects and more (#392)
* Rename `netstandard` Formatting projects
  - Formatting.NetCore and Formatting.NetStandard names no longer make sense

* Adjust `netstandard` Formatting output paths
  - align w/ new project names

* Use `NETSTANDARD1_3` and `Testing_NetStandard1_3`
  - `NETFX_CORE` name no longer makes much sense
  - remove both `NETFX_CORE` C# defined constant and `msbuild` property
    - manually-defined constant completely unnecessary in src/ code

* Remove RuntimePortable.sln
  - solution name no longer makes much sense and division adds little or no value
  - add .NET Standard projects to Runtime.sln
  - add solution filters for .NET Framework and .NET Standard projects
  - remove `$(BuildPortable)` property and `@(SolutionsToBuild)` item group
2023-02-28 11:52:52 -08:00
Doug Bunting eae75d6044
Correct `ValidateStreamForReading(...)` (#390)
- fix #389
- check `Stream` before first read attempt
- check `CanRead` (not `CanSeek`) before second or later read attempts
- add lots of tests of related scenarios
- nit: correct a recent `HttpContentMessageExtensions` comment

Apply suggestions from code review
- specifically, correct an `HttpMessageContent` comment

Co-authored-by: Chris Ross <Tratcher@Outlook.com>
2023-02-24 04:06:51 +00:00
Doug Bunting 30c4ecee2f
Use -Svc pools from here on out (#388)
- we _only_ service this repo
2023-02-21 12:36:28 -08:00
Doug Bunting 979e6ac663
Add `Content` to all `HttpResponseMessage`s (#387)
- fix #386
  - reenable `net6.0` tests disabled in #384 for this issue
- also, check `Stream.CanSeek` less when calculating `HttpMessageContent.ContentLength` value
  - use inner `HttpContent.Headers.ContentLength` if available
  - this changes behaviour slightly for both requests and responses
    - observable as `HttpMessageContent.Headers.ContentLength!=null` for empty messages
  - for responses, avoids `ContentLength==null` versus `ContentLength==0` inconsistencies (depending on platform)
  - `ContentLength==null` may still occur in some corner cases (which existed before)
    - e.g. when inner `HttpContent` doesn't know its length and `ReadAsStreamAsync()` hasn't completed
- main change means `HttpResponseMessage`s we expose to user code are consistent across platforms
  - note: user code won't see `EmptyContent` in `HttpResponseMessage`s we create
2023-02-17 12:14:39 -08:00
Doug Bunting 0f4c62480b
Test Formatting assemblies w/ `net6.0` (#384)
- expand our text matrix to include a modern (and LTS) TFM
- change how Formatting test assemblies are found
  - `netcoreapp` is no longer the only relevant folder prefix
- use the latest .NET 6 SDK
  - install the 2.1.x runtime in the pipeline
- don't require .NET in VS
  - will use binplaced `msbuild` instead
  - have `git` ignore the new .msbuild/ folder
- react to new `Exception.Message`s in `netcoreapp3.1`
  - handle different formatting of argument info in `ArgumentException.Message`s
  - handle slightly greater `decimal` precision in a `JsonReaderException.Message`
- react to new `Exception.Message`s and other changes in `net6.0`
  - handle different `Message` in `InvalidOperationException`s about invalid request URIs
- react to other changes in `net6.0`
  - handle inability to mock a `Stream` if a writer passes a `ReadOnlySpan<byte>` in `net6.0`
    - see moq/moq4#829, moq/moq4#979, and dotnet/runtime#45152 about the issue
  - skip tests failing due to `HttpResponseMessage` changes
    - see #386 and dotnet/runtime@b48900f3b3 (which introduced this)
    - fix coming **Real Soon Now™️** 😁
- nits:
  - simplify define use now that `NETCOREAPP3_1_OR_GREATER` and so on are available
  - clean up .gitignore
  - clean up a few comments and tighten scripting up
2023-02-13 12:39:52 -08:00
Doug Bunting 169d95fc06
Bump test project dependencies (#383)
Bump test project dependencies
- Castle.Core, Moq, and xUnit versions were all out of date
- hold xunit.runner.visualstudio version back in .NET SDK test projects
  - can be moved to latest version after we stop testing on netcoreapp2.1
- add missing xunit.analyzers reference to System.Web.Razor.Test project
- move all test projects to .NET v4.6.2 (a supported framework)
  - remove `netstandard` reference in System.Net.Http.Formatting.Test; not needed w/ new TFM & updated references
- further separate build of Microsoft.TestCommon project when invoked from NetCore.Test project
  - special case `RestorePackages` for this case
  - add System.Net.Http references to avoid conflicting versions e.g. src/ and test/ TFMs differ

React to changed xUnit APIs
- adjust Microsoft.TestCommon code
- nit: use `Array.Empty<byte>()` in `TranscodingStreamTests`
  - `TranscodingStream` `internal`s can be `private` instead

Resolve xUnit issues new analyzers find
- address xUnit2000 warnings
  - pass expected values to `Assert.Equal(...)` as correct (left) argument
- make generic method types explicit to avoid
  `error CS0121: The call is ambiguous between the following methods or properties: ...`
- note: cannot remove unnecessary xUnit1013 suppression
  - related bug (xunit/xunit#1466) apparently not fixed in 1.0.0 analyzers package
  - was xunit/xunit.analyzers#82 fix (in 2017) insufficient?

React to new Moq changes
- avoid `ProtectedMock\`1.ThrowIfPublicMethod(...)` `throw`ing
  - use new overloads introduced in the Moq 4.11.0 release
- adjust to Moq hiding the `ObjectProxy` type better
- update `ControllerContext` mocking to avoid NREs
  - setting `HttpContext.User` on the `Object` left `get` value `null` (did nothing)
- nit: use `SetupGet(...)` for another property
2023-01-30 20:52:17 -08:00
Doug Bunting 2ed73bc49d
Move NetCore project to use .NET SDK (#380)
Move NetCore project to use .NET SDK
- Formatting.NetCore now targets `netstandard1.3`
  - was `Profile259` aka `portable-net45+wp80+win8+wpa81`, approximately `netstandard1.0`
  - but Newtonsoft.Json.Bson supports `netstandard1.3` and up
- use Newtonsoft.Json.Bson in NetCore projects
- can now multi-target NetCore.Test as well
- nits:
  - align src/ Formatting projects as much as possible
  - align test/ Formatting projects as much as possible
  - clean up the Microsoft.TestCommon project slightly
- note: NetCore project names make no sense but I'm leaving them alone for this PR

React to using Newtonsoft.Json.Bson everywhere
- remove deprecated `BsonWriter` mentions entirely
- remove legacy BSON writer test workaround

Remove unnecessary `ConcurrentDictionary` class
- was not available in `Profile259`
- leave tests to confirm correct operation w/ "real" class

Remove `UriQueryUtility` because `WebUtility` is available everywhere
- leave test to confirm `WebUtility` continues to behave about the same
  - handle `WebUtility` being a `public` class
- change other tests to handle `WebUtility.UrlEncode(...)` encoding to uppercase
  - unlike `UriQueryUtility.UrlEncode(...)`

Add simple classes to NetCore project
- use `ICloneable` copy to get more classes compiling
  - helps NetCore in similar way to existing `MediaTypeHeaderValueExtensions`
- use `InvalidEnumArgumentException` copy to simplify code and testing
- both not available in `netstandard1.3` (or available packages) but easily duplicated

Remove unnecessary NetCore-specific GlobalSuppressions.cs file

Use `NameValueCollection` everywhere
- available (but not serializable) in `netstandard1.3`

Add `MaxDepth` support in NetCore assembly
- remove an unnecessary suppression about `MaxDepth` in `BaseJsonMediaTypeFormatter`

Add `UseDataContractJsonSerializer` support in NetCore assembly
- `XsdDataContractExporter` remains unavailable
  - update XML DCS tests to handle this (previously not in NetCore assembly)
- try various workarounds
  - `ReadOnlyStreamWithEncodingPreamble` causes tests to hit dotnet/runtime#80160
  - restriction to UTF8 when writing is a significant issue

Copy `TranscodingStream` and related files from dotnet/runtime
- my runtime clone was at 88868b7a781f4e5b9037b8721f30440207a7aa42

Adjust `TranscodingStream` and related code to compile and run here
- add conditions to avoid references to version-specific API
- remove references to internal dotnet/runtime code
  - rewrite some code more generically if performance impact likely minor
- use Microsoft.TestCommon instead of directly relying on Xunit in tests
- use C# 9.0

Use `TranscodingStream` in JSON and XML formatters
- remove `ReadOnlyStreamWithEncodingPreamble` and its tests
  - was insufficient in general and doesn't work correctly in `netstandard1.3`
  - see dotnet/runtime#80160
- now support a much broader set of encodings in JSON and XML formatters
  - not just UTF8, UTF16BE, and UTF16LE
  - JSON formatter already supported every encoding when `UseDataContractJsonSerializer` was `false`
    - no longer have this downside when property is `true`
    - however, quotas remain unsupported in `netstandard1.3` version of this formatter when property is `true`
  - XML formatter requirement for an XML declaration in non-UTF8 content was general and is no longer an issue

Add `MediaTypeMappings` support in NetCore assembly

Add `IRequiredMemberSelector` support in NetCore assembly

Remove unnecessary NETFX_CORE workarounds
- use `DefaultContractResolver`, `GuidAttribute`, `TypeDescriptor`, `XmlElement`, `XmlNode` classes
- use `IRequiredMemberSelector` interface
- use `RequestMessage.CreateResponse()` extension method
  - all available in `netstandard1.3`
- `JsonContractResolver` use is something of a late Newtonsoft.Json version reaction
  - was held back by missing `IRequiredMemberSelector`

Work around missing features in `netstandard1.3`
- get classes now included in NetCore assembly compiling
- `SerializationAttribute` is not available
  - therefore `Exception` is not serializable
  - therefore `DefaultContractResolver.IgnoreSerializableAttribute` is not available
- `Stream.(Begin|End)(Read|Write)` and `Stream.Close()` are not available
- nit: clean up `MultipartFormDataStreamProvider` whitespace
2023-01-28 13:39:45 -08:00
Doug Bunting fc1cf70d82
Use latest 2.1.x .NET SDK (#381)
- noticed CI builds were using old 2.1.500
  - `UseDotNet@2` seems to ignore `rollForward` when using global.json :frown:
- nits:
  - quiet `dotnet` in CI (where `dotnet` is always new)
  - complain about all potentially missing components when VS isn't found
  - add a missing blank line
2023-01-24 15:42:49 -08:00
Doug Bunting 8515e0bedd
Address a few more nits (#378)
- avoid repeated NuGet.exe downloads
  - remove extra bits in modern file versions before parsing
- suppress warnings about targeting `netcoreapp2.1`
2023-01-20 10:45:23 -08:00
Doug Bunting 1e2a82c42c
Use .NET SDK in two test projects (#371)
- Use .NET SDK in NetCore.Test project
  - for now, unable to target `netcoreapp2.1` in NetCore.Test project
    - Microsoft.Net.Http is not compatible
    - System.Net.Http types have different identities, causing compilation failures
  - switch to use `dotnet vstest` for any .NET Core assemblies (just one currently)
    - can use `Xunit` target for all .NET Framework assemblies
  - make XunitXml.TestLogger available for .NET Core App testing
    - use above test logger in repo-level testing
    - integrate w/ tests that use the `Xunit` target
  - don't import from xunit.msbuild.runner when targeting .NET Core; not needed
  - add `$(CopyLocalLockFileAssemblies)` to these (now both .NET SDK) test projects
    - xUnit assemblies were not copied (when they should have been) w/o this

- Use .NET SDK in Microsoft.TestCommon
  - allows reference in .NET SDK test projects

- Create general `TestAssembly` target
  - rename WebStack.xunit.targets -> WebStack.testing.targets
  - rename `Xunit` target -> `TestAssembly`
  - move `dotnet vstest` use into new target
    - handle exit codes more consistently
2022-12-12 16:13:35 -08:00
Doug Bunting c98af896fc
Build w/ VS 2019; restore w/ `msbuild` (#375)
- handle both SDK-style and legacy projects in one way
  - set `$(RestorePackagesConfig)` to cover both project types
- allow newer .NET SDKs to align w/ VS components
- make a few `<import/>`s conditional to avoid problems in `Restore` target evaluation
- restore global packages.config before building to make StyleCop available
- move second copies of packages.config packages into packages/ folder
- update FxCop TFM
  - .NET 4.0 not supported because current FxCopSdk is built against .NET 4.7.2
- suppress new warnings about old FxCop approach and not using `IFormatProvider`
2022-12-12 11:16:33 -08:00
Doug Bunting feb9b134b0
Move NuGet.config to repo root (#374)
- not sure why this wasn't done ages ago
2022-12-11 21:22:42 -08:00
Doug Bunting b943c83b3f
Autodetect CI environment (#373)
- check for CI environment variables in build.cmd
2022-12-11 21:22:19 -08:00
Doug Bunting 3e2e11b5a1
Use Newtonsoft.Json.Bson except in NetCore projects (#370)
- avoid obsolete `BsonReader` and `BsonWriter` classes
  - use `NETFX_CORE` for remaining legacy case (for now)
- remove `NEWTONSOFTJSON10` define; need only `NETFX_CORE` now
2022-11-23 19:26:49 -08:00
Doug Bunting d2c666066d
Bump Newtonsoft.Json to 13.0.1 (#369)
* Bump Newtonsoft.Json to 13.0.1
- also bump Newtonsoft.Json.Bson to 1.0.2 in System.Net.Http.Formatting.NetStandard
- incorporates changes from 23 Dependabot PRs; they are now obsolete
  - Dependabot also left `@(Reference)` items alone in project files 😦
  - fixed what Dependabot didn't do i.e. corrected paths and assembly identities in those items

<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/JamesNK/Newtonsoft.Json/releases">Newtonsoft.Json's releases</a>.</em></p>
<blockquote>
<h2>13.0.1</h2>
<ul>
<li>New feature - Add JsonSelectSettings with configuration for a regex timeout</li>
<li>Change - Remove portable assemblies from NuGet package</li>
<li>Change - JsonReader and JsonSerializer MaxDepth defaults to 64</li>
<li>Fix - Fixed throwing missing member error on ignored fields</li>
<li>Fix - Fixed various nullable annotations</li>
<li>Fix - Fixed annotations not being copied when tokens are cloned</li>
<li>Fix - Fixed naming strategy not being used when deserializing dictionary enum keys</li>
<li>Fix - Fixed serializing nullable struct dictionaries</li>
<li>Fix - Fixed JsonWriter.WriteToken to allow null with string token</li>
<li>Fix - Fixed missing error when deserializing JToken with a contract type mismatch</li>
<li>Fix - Fixed JTokenWriter when writing comment to an object</li>
</ul>
<h2>12.0.3</h2>
<ul>
<li>New feature - Added support for nullable reference types</li>
<li>New feature - Added KebabCaseNamingStrategy</li>
<li>Change - Package now uses embedded package icon</li>
<li>Fix - Fixed bug when merging JToken with itself</li>
<li>Fix - Fixed performance of calling ICustomTypeDescriptor.GetProperties</li>
<li>Fix - Fixed serializing Enumerable.Empty and empty arrays on .NET Core 3.0</li>
<li>Fix - Fixed deserializing some collection types with constructor</li>
<li>Fix - Fixed deserializing IImmutableSet to ImmutableHashSet instead of ImmutableSortedSet</li>
<li>Fix - Fixed deserializing IImmutableDictionary to ImmutableDictionary instead of ImmutableSortedDictionary</li>
<li>Fix - Fixed deserializing into constructors with more than 256 parameters</li>
<li>Fix - Fixed hang when deserializing JTokenReader with preceding comment</li>
<li>Fix - Fixed JSONPath scanning with nested indexer</li>
<li>Fix - Fixed deserializing incomplete JSON object to JObject</li>
<li>Fix - Fixed using StringEnumConverter with naming strategy and specified values</li>
</ul>
<h2>12.0.2</h2>
<ul>
<li>New feature - Added MissingMemberHandling to JsonObjectAttribute and JsonObjectContract</li>
<li>New feature - Added constructor to JTokenReader to specify initial path</li>
<li>New feature - Added JsonProperty.IsRequiredSpecified</li>
<li>New feature - Added JsonContract.InternalConverter</li>
<li>Change - Moved embedded debug symbols in NuGet package to a symbol package on NuGet.org</li>
<li>Fix - Fixed deserializing nullable struct collections</li>
<li>Fix - Fixed memory link when serializing enums to named values</li>
<li>Fix - Fixed error when setting JsonLoadSettings.DuplicatePropertyNameHandling to Replace</li>
</ul>
<h2>12.0.1</h2>
<ul>
<li>New feature - Added NuGet package signing</li>
<li>New feature - Added Authenticode assembly signing</li>
<li>New feature - Added SourceLink support</li>
<li>New feature - Added constructors to StringEnumConverter for setting AllowIntegerValue</li>
<li>New feature - Added JsonNameTable and JsonTextReader.PropertyNameTable</li>
<li>New feature - Added line information to JsonSerializationException</li>
<li>New feature - Added JObject.Property overload with a StringComparison</li>
<li>New feature - Added JsonMergeSettings.PropertyNameComparison</li>
<li>New feature - Added support for multiple Date constructors with JavaScriptDateTimeConverter</li>
<li>New feature - Added support for strict equals and strict not equals in JSON Path queries</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="ae9fe44e13"><code>ae9fe44</code></a> Remove compiler package and update sourcelink (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2498">#2498</a>)</li>
<li><a href="8ef662189d"><code>8ef6621</code></a> Remove prerelease for 13.0.1</li>
<li><a href="11331f50fd"><code>11331f5</code></a> Update SDK to 5.0.200 (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2495">#2495</a>)</li>
<li><a href="c7e8abc09d"><code>c7e8abc</code></a> Update to 13.0.1-beta2</li>
<li><a href="1745d7c14e"><code>1745d7c</code></a> Fix JTokenWriter when writing comment to an object (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2493">#2493</a>)</li>
<li><a href="583eb12015"><code>583eb12</code></a> Fix missing error when deserializing JToken with a contract type mismatch (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2">#2</a>...</li>
<li><a href="b6dc05be5a"><code>b6dc05b</code></a> Change MaxDepth default to 64 (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2473">#2473</a>)</li>
<li><a href="15525f1c44"><code>15525f1</code></a> Fix JsonWriter.WriteToken to allow null with string token (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2472">#2472</a>)</li>
<li><a href="926d2f0f42"><code>926d2f0</code></a> Enable embed untracked sources (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2471">#2471</a>)</li>
<li><a href="0a56633b6c"><code>0a56633</code></a> Fixes <a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2372">#2372</a> - variable typos (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2465">#2465</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/JamesNK/Newtonsoft.Json/compare/6.0.4...13.0.1">compare view</a></li>
</ul>
</details>

* React to Newtonsoft.Json changes
- react to `BsonReader`, `BsonWriter` deprecation
- one of our `DateTime` tests now consistently hits `5` errors
- `s/True/true/` also consistent now in another test
- `decimal` overflow now `throw`s a `JsonReaderException`

* Remove Newtonsoft.Json binding redirects
- where possible, entirely remove app.config files
- w/ consistent Newtonsoft.Json versions, these special cases are mostly not needed
  - auto-generation of .config file handles the special case just fine in
  System.Net.Http.Formatting.NetStandard.Test.csproj and System.Web.Http.SignalR.Test.csproj
2022-11-23 17:55:12 -08:00
Doug Bunting 06589fb442
Do not fail tests immediately (#368)
- combine `RegexReplace` into `PrintTestRunSummary` task
  - remove unused `WarnOnNoMatch` parameter; inline other parameters
  - capture test summary in `msbuild` logs
    - avoid `System.Console` use in the task
  - fail task if any tests fail
- collect `xunit` task exit codes in case of catastrophic problems (not test failures)
  - fail build if `PrintTestRunSummary` doesn't but errors occurred

also:
- do not test assemblies in parallel; reduce port contention issues
- avoid `CallTarget` task

nits:
- clean some trailing whitespace in C# sources
  - mostly files I expect to update soon
- reduce `NuGet.exe restore` verbosity; no longer debugging that
- add console summary when using build.cmd
- reduce duplication in `RestorePackages` target
  - only restore NetCore projects when `$(BuildPortable)` is `true`
  - restore src NetStandard project transitively through NetStandard.Test project
- pass more properties w/ `Restore` target invocation
2022-11-23 17:07:19 -08:00
Doug Bunting 0b0f6bf068
Enable public Azure DevOps builds (#366)
- add azure-pipelines.yml
  - clean workspace when checking out the repo
  - build about the same matrix as we have on TeamCity in Main.Integration builds
    - run tests only in Release job by default
  - do component governance work only in Release job
  - do not inject CodeQL3000 tasks (when building main)
  - publish test results
  - jobs usually take less than 10 minutes
- change build.cmd to enable overrides of its command line parameters

nits:
- touch up .codeql.yml to avoid test code and include portable projects
2022-11-22 14:33:37 -08:00
William Godbe 587d433f21
Enable CodeQl3000 (#365)
* Add CodeQL pipeline
* Fixup
* Fix image
* myget feeds
* Fix nuget.config
* Fix build invocation
* fix nuget.config
* Fix build steps
* Spacing
* Remove .DS_Store files
2022-11-21 11:08:42 -08:00
Doug Bunting 871710e99a
Ease builds on CI and locally (#364)
- react to a smallish breaking change in newer Owin packages
  - add new test of `%` decoding to URI
- do not restore RuntimePortable.sln directly
- ignore binary logs
- ensure the .NET Core 2.1 VS component is installed
  - allow use of any 2.1.5xx .NET SDK
- add a few words to code analysis dictionary
- exclude files generated for `net45` legacy projects don't cause problems when compiling for `netstandard2.0`
- handle additional `ReflectionTypeLoadException`s when using the xUnit `msbuild` runner

nits:
- capitalize "MSBuild" consistently
- reduce indentation slightly
2022-11-19 15:34:20 -08:00
Doug Bunting eae5661279
Ease builds on CI and locally (#364)
react to a smallish breaking change in newer Owin packages
  - add new test of `%` decoding to URI
- do not restore RuntimePortable.sln directly
  - NuGet.exe is no longer happy w/ that solution
- ignore binary logs
- ensure the .NET Core 2.1 VS component is installed
  - allow use of any 2.1.5xx .NET SDK
- add a few words to code analysis dictionary
- exclude files generated for `net45` legacy projects don't cause problems when compiling for `netstandard2.0`
- handle additional `ReflectionTypeLoadException`s when using the xUnit `msbuild` runner

nits:
- capitalize "MSBuild" consistently
- reduce indentation slightly
2022-11-19 15:32:34 -08:00
Doug Bunting cd0186268b
Move `Microsoft.Owin*` packages to 4.2.2 (#360)
- follow on from #358
- use the latest versions consistently
- correct `%(Hintpath)` metadata
  - Dependabot doesn't fix this information automatically
2022-08-29 19:28:52 -07:00
dependabot[bot] f9e0cef755
Bump Microsoft.Owin from 2.0.2 to 4.1.1 in /src/System.Web.Http.Owin (#359)
Bumps [Microsoft.Owin](https://github.com/aspnet/AspNetKatana) from 2.0.2 to 4.1.1.
- [Release notes](https://github.com/aspnet/AspNetKatana/releases)
- [Commits](https://github.com/aspnet/AspNetKatana/compare/v2.0.2...v4.1.1)

---
updated-dependencies:
- dependency-name: Microsoft.Owin
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-26 15:23:13 -07:00
dependabot[bot] 2d70c7ebea
Bump Microsoft.Owin in /test/System.Web.Http.Owin.Test (#358)
Bumps [Microsoft.Owin](https://github.com/aspnet/AspNetKatana) from 2.0.2 to 4.1.1.
- [Release notes](https://github.com/aspnet/AspNetKatana/releases)
- [Commits](https://github.com/aspnet/AspNetKatana/compare/v2.0.2...v4.1.1)

---
updated-dependencies:
- dependency-name: Microsoft.Owin
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-26 15:22:06 -07:00
独揽九天-小辉辉 0c55c2eada
Fix code bug (#356)
- address #357
2022-08-01 18:31:08 -07:00
Doug Bunting 2fa23f210c
Merge tag 'v3.2.8' into 'main' (#320)
- redo merge to restore the complete history
- no files changed because I accidentally squashed the commits in #319
2022-04-14 21:37:30 -07:00
Doug Bunting 4f5ebd611f
Merge tag 'v3.2.8' into dougbu/merge/v3.2.8
- redo merge to restore the complete history
- I accidentally squashed in #319 / 646f45271e
2022-04-14 18:40:41 -07:00
Doug Bunting 646f45271e
Merge tag 'v3.2.8' into 'main' (#319)
- see https://github.com/aspnet/AspNetWebStack/releases/tag/v3.2.8 for prominent issues resolved as well as a more detailed list of changes

Co-authored-by: Pranav Krishnamoorthy <prkrishn@microsoft.com>
Co-authored-by: Pranav K <prkrishn@hotmail.com>
Co-authored-by: dotnet-bot <dotnet-bot@microsoft.com>
2022-04-14 18:35:46 -07:00
Doug Bunting f7321b3bc1
Update README now 3.2.8 is live (#318)
- remove mention of MyGet.org since we currently do not have available nightly builds
  - we hope to restore this availability soon though it's likely builds will remain infrequent
2022-04-14 17:53:25 -07:00
dotnet-bot 005f94e123 Merge in 'release/3.2.8' changes 2022-03-30 22:34:11 +00:00
Doug Bunting 362b7be1e6
Remove deprecated `<licenseUrl />` element (#315)
- remove `<requireLicenseAcceptance/>` as well
  - can't require a license w/o `<license/>` or `<licenseUrl/>`
- also, don't need to ignore NU5125 anymore
2022-03-30 14:02:44 -07:00
dotnet-bot 20c076c437 Merge in 'release/3.2.8' changes 2022-01-14 21:48:15 +00:00
Pranav K ef4296eff8
Configure max request line size limits to be the same as maxHeaderSize (#312)
* Configure max request line size limits to be the same as maxHeaderSize

As part of ReadAsHttpRequestMessageAsync, the parsing of the HTTP request line is limited
by a non-configurable 2k limit. The size does not affect buffer sizes, only the maximum allowed length.

This PR updates the ReadAsHttpRequestMessageAsync API to use the same limits for HTTP request line
as the HTTP header line, the latter which is configurable by user code.
In the default case, this means the HTTP request line size now supports a 16k limit before it throws.

Fixes https://github.com/aspnet/AspNetWebStack/issues/307
2022-01-14 13:47:15 -08:00
dotnet-bot 664af54ea2 Merge in 'release/3.2.8' changes 2022-01-13 23:51:01 +00:00
Pranav K d1df0c8297
Clean up doc comments for PushStreamContent (#311)
Fixes https://github.com/aspnet/AspNetWebStack/issues/310
2022-01-13 15:49:37 -08:00
Pranav Krishnamoorthy 8c4e5b5da1 Merged PR 18778: Constrain the MemoryStream size
Constrain the MemoryStream size
2021-10-06 23:37:15 +00:00
Doug Bunting c55dd95aeb
[releaes/3.2.8] Get builds working again (#302)
- test using netcoreapp2.1
- react to .NET Core breaking change
  - see https://docs.microsoft.com/en-us/dotnet/core/compatibility/2.1#path-apis-dont-throw-an-exception-for-invalid-characters
- suppress NU5125 warnings
  - break the build because warnings are treated as errors
- do not validate Expires header values
  - #263
2021-07-29 11:35:00 -07:00
Doug Bunting a68a57535d
Rebrand to v3.2.9 / v5.2.9 (#299)
* Move to a current .NET SDK
- cherry-picked from release/3.2.8 commit ffbf707ddd

* Rebrand to v3.2.9 / v5.2.9
- cherry-picked from release/3.2.8 commit bc83a3a7ec (#298)
- then, switched to 3.2.9 instead of 3.2.8

- reformat README.md
  - merge 'Git tag' and 'Git branch' columns
  - remove old v3.2.4 / v5.2.4 information
  - add v3.2.7 / v5.2.7 information
2021-05-10 09:23:22 -07:00
Doug Bunting bc83a3a7ec
Rebrand to v3.2.8 / v5.2.8 (#298)
- reformat README.md
  - merge 'Git tag' and 'Git branch' columns
  - remove old v3.2.4 / v5.2.4 information
  - add v3.2.7 / v5.2.7 information
2021-05-02 11:00:40 -07:00