Commit Graph

331 Commits

Author SHA1 Message Date
William Godbe b8575a5098 Merge branch 'release/3.1' into merge/release/3.0-to-release/3.1\n\nCommit migrated from 68f7376ef6 2019-09-26 10:18:00 -07:00
Ajay Bhargav Baaskaran c05fca5137 Remove 1.x tests (dotnet/aspnetcore-tooling#1169)
\n\nCommit migrated from bd71bcf87b
2019-09-25 10:50:13 -07:00
dotnet-maestro-bot b30d6fda91 Capture process dumps for child dotnet processes (dotnet/aspnetcore-tooling#1170) (dotnet/aspnetcore-tooling#1171)
\n\nCommit migrated from 00e5f3e4d1
2019-09-25 19:10:33 +02:00
Javier Calvarro Nelson f6c5aa73c1 Capture process dumps for child dotnet processes (dotnet/aspnetcore-tooling#1170)
\n\nCommit migrated from e283d0be15
2019-09-25 18:11:35 +02:00
Pranav K b553f8a08d Remove empty lines
\n\nCommit migrated from f925f138ef
2019-09-24 18:13:26 -07:00
Pranav K 5ac56229e1 Fixup build errors
\n\nCommit migrated from 83b434dfc3
2019-09-24 18:12:16 -07:00
wtgodbe bc9f13b3ef Merge branches
\n\nCommit migrated from 973448284c
2019-09-24 13:20:39 -07:00
wtgodbe fd7b5b6604 Switch to embedded PackageIcon
\n\nCommit migrated from 2aee3e23bb
2019-09-24 13:19:08 -07:00
N. Taylor Mullen 31dbdaec1f Merge branch 'release/3.1'
\n\nCommit migrated from 3eeb3ff068
2019-09-20 15:21:07 -07:00
N. Taylor Mullen d0d09a2c61 Merge branch 'nimullen/13494.prereq' into release/3.1
\n\nCommit migrated from e980416506
2019-09-20 11:46:12 -07:00
N. Taylor Mullen 5bb36d86f1 Integrate Razor VSCode extension functional tests into src/Razor.
- Added the `.vscode-test` to `.gitignore` because that's the VSCode folder that gets created when dynamically downloading VSCode for CI purposes.
- Migrated functional tests to use the non-deprecated VSCode functional testing APIs. This involved creating a runTest file to control downloading VSCode and passing in appropriate parameters as well as creating an index that discovers tests that should be run.
- Changed functional tests to operate on the existing Razor testapps (instead of the old ones).
- Updated the "default" completion tests to be latest Razor/Blazor.
- Added VSCode launch configurations to enable easy debugging via F5.

aspnet/AspNetCoredotnet/aspnetcore-tooling#13494
\n\nCommit migrated from 66e4e8a169
2019-09-20 11:44:08 -07:00
N. Taylor Mullen 66f2aac299 Integrate Razor LanguageServer (without plugin) into src/Razor.
- Added tests for both the language server and the common language server projects.
- Updated publish MSBuild bits to publish to `artifacts/LanguageServer/$(Configuration)/TFM`
- Updated the language server to be netcoreapp3.0

aspnet/AspNetCoredotnet/aspnetcore-tooling#13494
\n\nCommit migrated from 984c638b37
2019-09-20 11:44:08 -07:00
Javier Calvarro Nelson 228f8f878a Merge pull request dotnet/aspnetcore-tooling#1154 from dotnet-maestro-bot/merge/release/3.1-to-master
[automated] Merge branch 'release/3.1' => 'master'\n\nCommit migrated from 04146ad860
2019-09-20 11:36:32 +02:00
Javier Calvarro Nelson dfbb36ee10 [Infrastructure] Fix invalid variable names
ProcDumpPath -> ProcDumpToolPath
_BuildConfiguration -> _BuildConfig\n\nCommit migrated from f283e4a7c0
2019-09-20 11:09:22 +02:00
Doug Bunting 8d0881794a Merge branch 'master' into merge/release/3.1-to-master\n\nCommit migrated from d65ede7ef1 2019-09-19 12:02:36 -07:00
Javier Calvarro Nelson bcd542a1bb [Infrastructure] Install procdump and capture dumps on build hangs (dotnet/aspnetcore-tooling#1146)
* Captures process dumps when the build hangs.
* Captures process dumps when a child process hangs inside a test.
\n\nCommit migrated from a9b7e24791
2019-09-19 18:36:02 +02:00
John Luo 19b84ed7a4 Merge branch 'release/3.1'
\n\nCommit migrated from 7ff56a9e0d
2019-09-18 14:03:50 -07:00
John Luo a2081d584f Fix razor tool assembly path (dotnet/aspnetcore-tooling#1138)
\n\nCommit migrated from 88cd749f38
2019-09-15 08:05:47 -07:00
Doug Bunting 51ec2760aa Merge branch 'release/3.1' into merge/release/3.0-to-release/3.1\n\nCommit migrated from 683059f2cb 2019-09-14 17:12:43 -07:00
dotnet-maestro[bot] 901f8aa76d [release/3.0] Update dependencies from aspnet/Extensions (dotnet/aspnetcore-tooling#1132)
* Update dependencies from https://github.com/aspnet/Extensions build 20190913.2

- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-rc2.19463.2
- Microsoft.AspNetCore.Testing - 3.0.0-rc2.19463.2
- Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-rc2.19463.2
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-rc2.19463.2
- Microsoft.Extensions.NonCapturingTimer.Sources - 3.0.0-rc2.19463.2
- Microsoft.Extensions.Logging - 3.0.0-rc2.19463.2

Dependency coherency updates

- System.Diagnostics.DiagnosticSource - 4.6.0 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0 (parent: Microsoft.Extensions.Logging)
- System.Reflection.Metadata - 1.7.0 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- System.Text.Encodings.Web - 4.6.0 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.Extensions.DependencyModel - 3.0.0 (parent: Microsoft.Extensions.Logging)
- Microsoft.NETCore.App.Ref - 3.0.0 (parent: Microsoft.Extensions.Logging)
- Microsoft.NETCore.Platforms - 3.0.0 (parent: Microsoft.NETCore.App.Runtime.win-x64)

* Update dependencies from https://github.com/aspnet/Extensions build 20190913.3

- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-rc2.19463.3
- Microsoft.AspNetCore.Testing - 3.0.0-rc2.19463.3
- Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-rc2.19463.3
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-rc2.19463.3
- Microsoft.Extensions.NonCapturingTimer.Sources - 3.0.0-rc2.19463.3
- Microsoft.Extensions.Logging - 3.0.0

Dependency coherency updates

- System.Diagnostics.DiagnosticSource - 4.6.0 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0 (parent: Microsoft.Extensions.Logging)
- System.Reflection.Metadata - 1.7.0 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- System.Text.Encodings.Web - 4.6.0 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.Extensions.DependencyModel - 3.0.0 (parent: Microsoft.Extensions.Logging)
- Microsoft.NETCore.App.Ref - 3.0.0 (parent: Microsoft.Extensions.Logging)
- Microsoft.NETCore.Platforms - 3.0.0 (parent: Microsoft.NETCore.App.Runtime.win-x64)

* Update dependencies from https://github.com/aspnet/Extensions build 20190913.5

- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-rc2.19463.5
- Microsoft.AspNetCore.Testing - 3.0.0-rc2.19463.5
- Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-rc2.19463.5
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-rc2.19463.5
- Microsoft.Extensions.NonCapturingTimer.Sources - 3.0.0-rc2.19463.5
- Microsoft.Extensions.Logging - 3.0.0

Dependency coherency updates

- System.Diagnostics.DiagnosticSource - 4.6.0 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0 (parent: Microsoft.Extensions.Logging)
- System.Reflection.Metadata - 1.7.0 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- System.Text.Encodings.Web - 4.6.0 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.Extensions.DependencyModel - 3.0.0 (parent: Microsoft.Extensions.Logging)
- Microsoft.NETCore.App.Ref - 3.0.0 (parent: Microsoft.Extensions.Logging)
- Microsoft.NETCore.Platforms - 3.0.0 (parent: Microsoft.NETCore.App.Runtime.win-x64)
- Microsoft.Net.Compilers.Toolset - 3.3.1-beta4-19462-11 (parent: Microsoft.Extensions.Logging)

* Restore test projects prior to running SDK tests (dotnet/aspnetcore-tooling#1078)

* Fix 3.0 tests
\n\nCommit migrated from eaf897c542
2019-09-14 19:38:15 +00:00
John Luo 1606d9b0d3 Support netcoreapp3.1 TFM (dotnet/aspnetcore-tooling#1122)
* Support netcoreapp3.1 TFM

* Update branding to preview1

* Skip failing 1.1 test
\n\nCommit migrated from 133b252f09
2019-09-12 22:02:18 -07:00
Doug Bunting a163dbe04f Merge branch 'master' into merge/release/3.1-to-master\n\nCommit migrated from 9aba77ea68 2019-09-11 10:21:21 -07:00
Ajay Bhargav Baaskaran 61726ae9df Restore test projects prior to running SDK tests (dotnet/aspnetcore-tooling#1078)
\n\nCommit migrated from e6bb507271
2019-09-10 17:45:59 -07:00
William Godbe bfc93b0876 Merge pull request dotnet/aspnetcore-tooling#995 from dotnet-maestro-bot/merge/release/3.0-to-master
[automated] Merge branch 'release/3.0' => 'master'\n\nCommit migrated from 3ed4e87179
2019-08-22 09:47:17 -07:00
Pranav K ce19e27b00 Retarget to netcoreapp5.0 (dotnet/aspnetcore-tooling#996)
\n\nCommit migrated from 5908616812
2019-08-22 08:37:01 -07:00
John Luo d5c2d17c11 Merge pull request dotnet/aspnetcore-tooling#983 from aspnet/johluo/sdk
Update SDK to preview 8\n\nCommit migrated from 62d5ccbd6a
2019-08-21 15:42:29 -07:00
= 5f7c8d9d74 Apply fix for NuGet warning
\n\nCommit migrated from fb3187b34f
2019-08-21 13:30:21 -07:00
Kevin Pilch ad0cf9c6e7 Merge pull request dotnet/aspnetcore-tooling#974 from nguerrera/link-views
Pass views assembly to linker\n\nCommit migrated from ddb72ebdb1
2019-08-20 13:58:59 -07:00
Ryan Nowak cb35a0aa40 Reaction to API review changes
This change updates the snapshot of components APIs used in compiler
tests and updates the tests to react tot hose changes.
\n\nCommit migrated from c8cc588bca
2019-08-20 08:20:36 -07:00
Nick Guerrera e18cc9a776 Pass views assembly to linker
1. Re-schedule target to run before linker
2. Add additional linker input item
\n\nCommit migrated from 88b5f29a63
2019-08-18 23:29:50 -07:00
Ajay Bhargav Baaskaran 2873952822 Set LangVersion the same way as roslyn (dotnet/aspnetcore-tooling#979)
* Set LangVersion the same way as roslyn

* Update commit link
\n\nCommit migrated from b82d4f9583
2019-08-15 15:27:12 -07:00
N. Taylor Mullen f3536ca403 Revert "Fix: dotnet/aspnetcore-tooling#11197 automatic backing-field for @ref (dotnet/aspnetcore-tooling#707)"
This reverts commit dadf9fa.
\n\nCommit migrated from afddfcb49e
2019-08-15 14:35:26 -07:00
N. Taylor Mullen 9584c7e34f Revert "Fix a bug with ref and declaration phase"
This reverts commit dotnet/aspnetcore-tooling@09b50151ef.

# Conflicts:
#	src/Razor/test/RazorLanguage.Test/IntegrationTests/ComponentDeclarationIntegrationTest.cs
\n\nCommit migrated from c0e934ed7c
2019-08-15 14:35:26 -07:00
dotnet-maestro[bot] 781743fa30 [release/3.0] Update dependencies from aspnet/Extensions (dotnet/aspnetcore-tooling#975)
* Update dependencies from https://github.com/aspnet/Extensions build 20190815.2

- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview9.19415.2
- Microsoft.AspNetCore.Testing - 3.0.0-preview9.19415.2
- Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview9.19415.2
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview9.19415.2
- Microsoft.Extensions.NonCapturingTimer.Sources - 3.0.0-preview9.19415.2
- Microsoft.Extensions.Logging - 3.0.0-preview9.19415.2

Dependency coherency updates

- Microsoft.NETCore.App.Runtime.win-x64 - 3.0.0-preview9-19414-17 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.DependencyModel - 3.0.0-preview9-19414-17 (parent: Microsoft.Extensions.Logging)
- Microsoft.NETCore.App.Ref - 3.0.0-preview9-19414-17 (parent: Microsoft.Extensions.Logging)
- Microsoft.Net.Compilers.Toolset - 3.3.0-beta3-19415-01 (parent: Microsoft.Extensions.Logging)

* Update dependencies from https://github.com/aspnet/Extensions build 20190814.4

- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview9.19414.4
- Microsoft.AspNetCore.Testing - 3.0.0-preview9.19414.4
- Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview9.19414.4
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview9.19414.4
- Microsoft.Extensions.NonCapturingTimer.Sources - 3.0.0-preview9.19414.4
- Microsoft.Extensions.Logging - 3.0.0-preview9.19414.4

* Update dependencies from https://github.com/aspnet/Extensions build 20190815.2

- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview9.19415.2
- Microsoft.AspNetCore.Testing - 3.0.0-preview9.19415.2
- Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview9.19415.2
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview9.19415.2
- Microsoft.Extensions.NonCapturingTimer.Sources - 3.0.0-preview9.19415.2
- Microsoft.Extensions.Logging - 3.0.0-preview9.19415.2

* React to namespace removal
\n\nCommit migrated from 543a1ae2a3
2019-08-15 20:12:47 +00:00
Pranav K 778246c674 Add tooling support for TypeScript files to RazorSDK (dotnet/aspnetcore-tooling#971)
Fixes https://github.com/aspnet/AspNetCore/issues/12840\n\nCommit migrated from 304cafcffe
2019-08-14 14:22:46 -07:00
Javier Calvarro Nelson 70268e7c82 [Blazor][Fixes dotnet/aspnetcore-tooling#12933] Remove the need for a custom property when resolving static web assets from referenced projects
* Removes the need for a custom property when resolving static web assets from referenced projects
* Rolls in several improvements suggested by the MSBuild folks to improve performance.\n\nCommit migrated from 5335245b08
2019-08-14 15:59:44 +02:00
Pranav K 2317fc9687 Fixup tests
\n\nCommit migrated from 5707808e9f
2019-08-13 12:39:55 -07:00
Pranav K 80d6dfea89 Give "builder" a less discoverable name
Fixes https://github.com/aspnet/AspNetCore/issues/12991
\n\nCommit migrated from 7e974693b6
2019-08-13 12:39:55 -07:00
Pranav K 32196f8023 Use globally qualified type name when generating TypeInference (dotnet/aspnetcore-tooling#946)
The code-generated TypeInference type resides in a custom namespace.
Any types that it refers to in user code must be qualified using the "global::" prefix
to avoid type \ namespace conflicts.

Fixes https://github.com/aspnet/AspNetCore/issues/12116\n\nCommit migrated from f0e09e4a97
2019-08-13 12:35:37 -07:00
Ajay Bhargav Baaskaran 7e8807ae64 Print warning when reference assembly is not found (dotnet/aspnetcore-tooling#953)
* Print warning when reference assembly is not found

* Added test
\n\nCommit migrated from d8a5e39739
2019-08-12 21:30:22 -07:00
Ajay Bhargav Baaskaran 2abbff5b3b Don't coalesce <option> tag in ComponentMarkupBlockPass
\n\nCommit migrated from 728a7230b0
2019-08-12 09:10:09 -07:00
Ajay Bhargav Baaskaran 7fc5972613 Fix @inject intellisense (dotnet/aspnetcore-tooling#949)
* Fix @inject intellisense

* update
\n\nCommit migrated from d953ec40c3
2019-08-09 13:13:18 -07:00
N. Taylor Mullen 88a002a918 Enable Component parameter delegates to not require @() at design time.
- The core issue is that the Razor parser splits attribute values based on whitespace. Therefore, when it encounters `@onclick="() => Foo()"` it breaks it into three different tokens based on the spaces involved. This separation results in multiple adjacent classified spans for C# which is currently unsupported by WTE due to multiple seams overlapping. All that being said we have the opportunity to be smarter when generating attribute values that we feel can be simplified or collapsed; because of this in this PR I changed the `TagHelperBlockRewriter` phase to understand "simple" collapsible blocks and to then collapse them. In the future a goal would be to take a collapsing approach to all potential attributes and then to re-inspect each token individually at higher layers in order to decouple our TagHelper phases from what the parser initially parses.
- Added an integration and parser test to validate the new functionality. Most of the testing is from the fact that no other tests had to change because of this (it doesn't break anything).
- Added a new SyntaxNode method `GetTokens` that flattens a node into only its token representation.

aspnet/AspNetCoredotnet/aspnetcore-tooling#11826
\n\nCommit migrated from 80f1bc76a4
2019-08-07 10:57:52 -07:00
Pranav K 56a440ec9d Make launchSettings.json a content item that does not get copied to b… (dotnet/aspnetcore-tooling#928)
* Make launchSettings.json a content item that does not get copied to build or publish directory

Fixes https://github.com/aspnet/AspNetCore/issues/12841

\n\nCommit migrated from d0dc8140e2
2019-08-06 13:00:16 -07:00
Pranav K 2699268bc3 Prevent StackOverflows when assemblies have recursive references (dotnet/aspnetcore-tooling#901)
* Prevent StackOverflows when assemblies have recursive references

https://github.com/aspnet/AspNetCore/issues/12693

\n\nCommit migrated from 43776c1864
2019-08-05 09:19:26 -07:00
Ryan Nowak 7312e7cc38 Move RenderTreeBuilder to another castle
Don't even try to review this xD

This change moves RenderTreeBuilder to the .Rendering namespace and then
updates literally every component baseline.
\n\nCommit migrated from aa8624f46e
2019-08-04 20:43:21 -07:00
Pranav K f31e951f5d Fixup test
\n\nCommit migrated from 5eb86992f4
2019-08-03 17:29:13 -07:00
Pranav K a202e6cfa6 Update
\n\nCommit migrated from 98d9bda3a2
2019-08-03 16:59:08 -07:00
N. Taylor Mullen e2d476cc6f Associate C# version with each Razor extension version.
- Roslyn now default to 8.0 C# so it's no longer specified in a users project file. Because of this restriction we can no longer see the projects `LangVersion` when generating Razor files. Meaning, we can't conditionally generate C# 8.0 aware code because our Razor default is not C# 8.0. Therefore, when we detect that the C# lang version hasn't been provided we don't set a C# version and instead rely on what the default configuration for the Razor project is. In practice this looks like:
  - MVC1.X = C# 7.3
  - MVC2.X = C# 7.3
  - MVC Latest = C# 8.0
- I thought about adding a feature flags variant for `RazorCodeGenerationOptions` but decided not to since C# features are all configurable options that are based on more than just the `RazorLangVersion`.
- Added integration tests to ensure that command line builds with implicit `LangVersion`s result in proper C# nullability handling.

aspnet/AspNetCoredotnet/aspnetcore-tooling#12594
\n\nCommit migrated from f039aa9354
2019-08-02 17:14:10 -07:00
Pranav K 9d594e41c5 Make launchSettings.json a content item that does not get copied to build or publish directory
Fixes https://github.com/aspnet/AspNetCore/issues/12841
\n\nCommit migrated from 34628d3066
2019-08-02 12:15:23 -07:00
Ajay Bhargav Baaskaran 6ad8b96f3e Don't fail the build on warnings (dotnet/aspnetcore-tooling#922)
* Don't fail the build on warnings

* update

* update
\n\nCommit migrated from 450a780f40
2019-08-01 13:16:33 -07:00
N. Taylor Mullen ccf56256d9 Add support for non-numeric CSharpLanguageVersions.
- We would default to improper C# language versions when given non-numeric `LangVersion`s. For instance when given `CSharpLanguageVersion.Latest` we'd default to 7.3 which was inconsistent with how the rest of the C# world functioned.
- Added a test.

aspnet/AspNetCoredotnet/aspnetcore-tooling#11139
\n\nCommit migrated from a08d0b0673
2019-07-31 11:06:52 -07:00
N. Taylor Mullen 5ea6ba40cd Update Roslyn dependencies to align with SDK and VS.
- Updated instances of our code to no longer use reference type checks on `ISymbol`s. This was a new restriction added by Roslyn [here](https://github.com/dotnet/roslyn-analyzers/issues/2084). We also have a follow up AspNetCore issue [here](https://github.com/aspnet/AspNetCore/issues/12747) to bring these level of changes to AspNetCore.
- Had to pin `Microsoft.CodeAnalysis.Analyzers` in our VSIX projects in order to workaround version conflicts of `Microsoft.CodeAnalysis.Analyzers`. The version conflict is introduced from our dependency on `Microsoft.VisualStudio.ProjectSystem.Managed.VS`. It transitively depends on `Microsoft.CodeAnalysis.Analyzers` `2.6.3` where as our latest Roslyn bits transitively depend on `Microsoft.CodeAnlalysis.Analyzers` `2.9.4`. Tried updating to the latest, private, `Microsoft.VisualStudio.ProjectSystem.Managed.VS` but it also had the version conflict.
- Pinned our runtime bits to the latest public Roslyn NuGet package and pinned our tooling bits to the latest private NuGet package (both are compatible flavors of 3.3.0).
\n\nCommit migrated from 83d5e2c36f
2019-07-31 10:52:21 -07:00
N. Taylor Mullen c1d2914398 Require public component parameters and remove private metadata workaround
- Prior to this a user could have private, protected or public parameters. We now require public and plan to update analyzers to enforce good usage of public component parameters.
- Removed private `ComponentTagHelperDescriptorProvider` workaround. meta data workaround since we no longer operate on private parameters.
- Updated existing tests to not have private parameter setters. I missed these in my last pass.
- Added two new tests to validate parameters which are private or have private setters are ignored.

aspnet/AspNetCoredotnet/aspnetcore-tooling#12291
\n\nCommit migrated from bb543aa166
2019-07-31 10:03:03 -07:00
N. Taylor Mullen 36420ad55f Forgive nullability violation in directive syntax helpers.
- Directives utilize helpers to add to colorization errors, etc. in Razor files. These helpers typically look like `MyType __something = default(MyType)`. The issue with this approach is that `default(MyType)` can be `null` yet `MyType` is a non-nullable type. To workaround this restriction I added nulllability forgiveness operators to the type and member directive tokens (the only two that could possibly generate `null` based output).
- Updated baselines to reflect new forgiveness operator.

aspnet/AspNetCoredotnet/aspnetcore-tooling#10919
aspnet/AspNetCoredotnet/aspnetcore-tooling#11478
\n\nCommit migrated from d0617ed578
2019-07-30 16:22:32 -07:00
N. Taylor Mullen 1345358266 Enable Razor integration tests to use repos Roslyn version.
- Updated `BuildVariables` to lift the `Microsoft.Net.Compilers.Toolset` package version into C# so we can pass it as a parameter to our testapps when building them.
- Flowed the `MicrosoftNetCompilersToolsetPackageVersion` to transitive testapp projects on restore. This enables `build.cmd` to properly pre-build our `testapp` projects with the latest version of Roslyn.
- Added several conditions to detect if a user is attempting to independently build a `testapp` at which point we fallback to using the SDKs Roslyn compiler toolset version.

aspnet/AspNetCoredotnet/aspnetcore-tooling#12268
\n\nCommit migrated from 57a72ecc46
2019-07-26 16:10:00 -07:00
N. Taylor Mullen 4b6a5b26f6 Revert "Update test projects to use latest Roslyn."
This reverts commit dotnet/aspnetcore-tooling@cff58c01ae.
\n\nCommit migrated from 7388cde7ea
2019-07-26 16:10:00 -07:00
Ajay Bhargav Baaskaran e189edcd27 Increase timeout in attempt to fix test flakiness (dotnet/aspnetcore-tooling#867)
\n\nCommit migrated from 6383999d6a
2019-07-23 15:01:38 -07:00
Pranav K c9ed74d84a Correctly set UpToDateReloadFileTypes (dotnet/aspnetcore-tooling#858)
* Correctly set UpToDateReloadFileTypes

UpToDateReloadFileTypes was incorrectly set in the preview6 DesignTime targets and this was worked
around in the SDK's targets. Unfortunately the updated copy of DesignTime targets (current as of 7/13)
also has a bug.

This fixes the issue and adds some tests to verify we're correct with the past, present & future.

Fixes https://github.com/aspnet/AspNetCore/issues/11873

\n\nCommit migrated from 525d0c1ad3
2019-07-22 09:16:09 -07:00
Ryan Nowak d30eb2f58e Fix serialization of SourceSpan
I noticed this while debugging something else in VS. It looks like the
service hub is using camelCase, which wasn't covered with a diagnostic
in our tests. As a result we would fail to read the data from the OOP
host, and fall back to in-process tag helper discovery.
\n\nCommit migrated from 63b25dbd2d
2019-07-19 13:41:27 -07:00
Ryan Nowak 09b2c7d81a Fix weakly-typed component bind (dotnet/aspnetcore-tooling#853)
* Fix weakly-typed component bind

The globalization change regressed this. For weakly typed component bind
we don't want to do any conversions, we need the values to match
exactly.

Note that there's no compiler-generated type checks because its
weakly-typed.

* pr feedback
\n\nCommit migrated from 2d74721815
2019-07-18 16:48:53 -07:00
Ryan Nowak 35daeda2bf React to ElementReference change
\n\nCommit migrated from 2f35d24cb8
2019-07-17 13:48:43 -07:00
Pranav K 8757c7da16 More test
\n\nCommit migrated from 0e750a6764
2019-07-17 11:16:15 -07:00
Pranav K 9b05f240ae Fixup desktop tests again
\n\nCommit migrated from bd5a57c0e8
2019-07-17 09:20:43 -07:00
Pranav K de8aa5bffa Desktop tests
\n\nCommit migrated from 6f5da448ef
2019-07-17 09:20:43 -07:00
Pranav K 4eb4cef18c Limit PreserveCompilationReferences to netcoreapp (<2.x)and net4x projects
\n\nCommit migrated from b9c695c2d5
2019-07-17 09:20:43 -07:00
Pranav K 8dcf4b37f5 Ensure compilation references are copied during build for netcoreapp2.x targeting projects
Fixes https://github.com/aspnet/AspNetCore/issues/12048
\n\nCommit migrated from f17a62c044
2019-07-17 09:20:43 -07:00
N. Taylor Mullen d62381d659 Update test projects to use latest Roslyn.
- This is a temporary workaround until we're able to get on the latest SDK which includes the latest Roslyn bits. Without them we can't properly publish testapps in a standalone fashion without investing in temporary infrastructure.
\n\nCommit migrated from 21fcd9c2f5
2019-07-16 22:15:59 -07:00
N. Taylor Mullen b724885f38 React to Roslyn rename of `NullableContextOptions` to `Nullable`.
- Verified the fix with VS16.2-preview2 + latest CLI with modified `Nullable` entry on disk
- Updated tests.
- Note: This change will not pass the build until we have a new CLI that has an updated Roslyn that understands `Nullable`.

aspnet/AspNetCoredotnet/aspnetcore-tooling#10218
\n\nCommit migrated from fee9c35bee
2019-07-16 22:15:59 -07:00
Ryan Nowak fde8f98d7e Reactions to API review changes + Globalisation support (dotnet/aspnetcore-tooling#829)
* Update ref assembly APIs

There are some impactful changes here for the compiler that are part of the API review.

The next few commits will implement all of the required changes.

* React to API review + globalization changes

* Updates to generated baselines

* Add missed file

* Update src/Razor/src/Microsoft.CodeAnalysis.Razor/EventHandlerTagHelperDescriptorProvider.cs

Co-Authored-By: Steve Sanderson <SteveSandersonMS@users.noreply.github.com>

* more baseline updates
\n\nCommit migrated from d955be5013
2019-07-16 14:55:06 -07:00
Ajay Bhargav Baaskaran f2f0bed885 Support [Parameter] attribute on base class of overridden properties (dotnet/aspnetcore-tooling#835)
* Support [Parameter] attribute on base class of overridden properties

* Fix test
\n\nCommit migrated from c228339bb3
2019-07-16 13:11:15 -07:00
David Fowler 53841f90f9 Make some tweaks to the default content globs (dotnet/aspnetcore-tooling#820)
* Make some tweaks to the default content globs
- Don't publish/copy launchSettings.json
- Make sure static content and configuration work with single file turned on
- Added test

\n\nCommit migrated from 63e8681fff
2019-07-16 00:24:38 -07:00
Ajay Bhargav Baaskaran 7aeaa72f25 Modify tag helper infrastructure to configure case sensitivity (dotnet/aspnetcore-tooling#793)
* Modify tag helper infrastructure to configure case sensitivity

* Cleanup and added more tests

* More cleanup and added necessary diagnostics

* More feedback

* Added more tests
\n\nCommit migrated from 20b8286751
2019-07-15 17:07:27 -07:00
N. Taylor Mullen 810e32ffc4 Update tests to specify public [Parameter]
- Updated existing tests to use `public` accessibility for parameters. As part of this also updated baselines.
- We now recommend that `[Parameter]`'s should be `public`. In the future this will be a requirement.

aspnet/AspNetCoredotnet/aspnetcore-tooling#8825
\n\nCommit migrated from 2ceb597f82
2019-07-12 11:48:54 -07:00
N. Taylor Mullen c76ac7e7b0 Don't pass Analyzers to Razor declaration compilation Csc task invocation.
- Without this any diagnostics from Analyzers will be doubly reported. One for the declaration compilation and one for the view compilation.

aspnet/AspNetCoredotnet/aspnetcore-tooling#8825
\n\nCommit migrated from 6d115d460b
2019-07-10 16:04:59 -07:00
Ryan Nowak cd8ec7ae66 Move [Layout]
This will be coordinated with the equivalent change in the runtime repo.
\n\nCommit migrated from c82d53eaaa
2019-07-04 15:36:21 -07:00
N. Taylor Mullen d9f35d4482 Add support for C# 8 nullable forgiveness operator.
- Added a feature flag to ensure this functionality does not impact pre-3.0 applications. This change is in fact a breaking change because some less-common scenarios will no longer be valid. For instance, `@Name!.Hello`used to treat the `!.Hello` as markup, now it will be treated as part of the expression.ExpressionChunkGenerator
- Updated parser flags tests
- Updated parser tests
- Updated the C# 8.0 integration tests to include the new nullable forgiveness scenarios.

aspnet/AspNetCoredotnet/aspnetcore-tooling#11188
\n\nCommit migrated from 625c605607
2019-07-02 10:17:18 -07:00
Javier Calvarro Nelson 9ac7cb8f00 Unconditionally enable content in RCLs (dotnet/aspnetcore-tooling#723)
\n\nCommit migrated from 50f6b2d4d6
2019-07-02 18:35:03 +02:00
Ryan Nowak bfbb9a78a2 Fix a bug with ref and declaration phase
This fixes a regression in the new `@ref` support, where the build will
fail during the declaration pass.

The problem is that the EliminateMethodBodyPass runs really early and
wipes out the usage of `@ref` before we have a chance to see it. The
solution is to make it run really late. This makes sense because we
basically just use this pass to do cleanup.
\n\nCommit migrated from 09b50151ef
2019-07-01 17:26:14 -07:00
Ryan Nowak dbf5b80f97 PR feedback
\n\nCommit migrated from bfc2485b67
2019-07-01 15:29:08 -07:00
Ryan Nowak e9ac371854 General cleanup of bind code
Removed support for more obsolete cases and cleaned up some out-of-date
comments.
\n\nCommit migrated from 19c6a6fa4b
2019-07-01 15:29:08 -07:00
Ryan Nowak 8d6e13082d Remove handling of pre-directive-attribute cases
\n\nCommit migrated from 2e34a6ace6
2019-07-01 15:29:08 -07:00
Ryan Nowak e1f53b4bd6 Add code generation support for culture
Adds the code generation support for culture + bind.

Some additonal changes are needed for the compiler support for bind, we
need to pass the culture into the code that unwraps the value as well.

There's no need to eagerly push these changes into the runtime (can wait
for the compiler change to go in) because nothing in our runtime tests
use the new feature.
\n\nCommit migrated from 6aad9748e8
2019-07-01 15:29:08 -07:00
Ryan Nowak 04d7e63b79 Add culture parameter to element-bind tag helpers
\n\nCommit migrated from 7515e2ce49
2019-07-01 15:29:08 -07:00
Ryan Nowak 66cb243807 Add codegen for default format
\n\nCommit migrated from e5be8d4673
2019-07-01 15:29:08 -07:00
Ryan Nowak 3c84c57c61 Add the ability to specify invariant and format
Adds the ability to specify that an `<input type="..." />` for some
specific value of `type` maps to the invariant culture and/or provides
a default format.

The primary examples of usage would be the number field which wants to
use invariant culture, or datetime which wants to use invariant culture
and a format string.
\n\nCommit migrated from 60f2d563a6
2019-07-01 15:29:08 -07:00
Ryan Nowak 2c6e1dacac Use ref-assembly code in shim
Updates our Components shim to use the ref assembly code. This is just
cleanup and will help us keep up-to-date with API review changes since
we can just copy-past the files.

I made two modifications to make this simple.
- Removed our built-in components
- Removed the HTTP stuff

This makes it easier for us to maintain the shim. You can see cases
where I had to update tests because they diverged from what the real
APIs look like (no product bugs).

I'd still like to improve this workflow so suggestions wanted xD
\n\nCommit migrated from 8517be2bac
2019-07-01 14:22:26 -07:00
Ryan Nowak 895ad896c7 Fix: dotnet/aspnetcore-tooling#11197 automatic backing-field for @ref (dotnet/aspnetcore-tooling#707)
This change makes @ref define a field for you by default. We didn't do
this originally because we weren't sure if the compiler generating a
field would always be what you want, and more importantly,
we didn't have the expressiveness to add an opt-out.

Now that we have directive attributes, it's easy to create an opt-out
for the field generation. The special thing about it is that where
you opt-out has to be static. For this reason the @bind:suppressField
attribute cannot be used with a value, you either have the flag or not.

Additionally, we don't support automatic field generation for
generics, because usually we can't write the field name. If we
want to in the future could make this work when the generic
type arguments are specified. So in the case of generics,
you have to opt-out, and you will get a diagnostic
that tells you so.\n\nCommit migrated from dadf9faf22
2019-07-01 13:58:25 -07:00
Ajay Bhargav Baaskaran 0659180119 Do case insensitive comparison in DefaultRazorProjectFileSystem.GetItem (dotnet/aspnetcore-tooling#709)
\n\nCommit migrated from ff305c700f
2019-06-28 11:02:55 -07:00
Pranav K 4e16cfd4da Use LogErrorFromException when FindAssembliesWithReferencesTo throws (dotnet/aspnetcore-tooling#702)
Currently FindAssembliesWithReferencesTo produces a stacktrace when P2P builds fail - for instance
if the referenced project has a compiler error. This changes it to use LogErrorFromException.

In addition, there was a typo in the property that disabled the feature.

Fixes https://github.com/aspnet/AspNetCore/issues/11226\n\nCommit migrated from 87c12a116c
2019-06-26 11:18:54 -07:00
Javier Calvarro Nelson 19d9dbcd43 Removes the logic for sanitizing the base path for static web assets (dotnet/aspnetcore-tooling#700)
Removes the logic for sanitizing the base path for static web assets\n\nCommit migrated from 98b168c894
2019-06-25 18:35:38 +02:00
Doug Bunting adfe6f09e4 Move to 3.0 Preview 6 SDK and 2.1.11 runtime (dotnet/aspnetcore-tooling#695)
- add feeds that SDK no longer provides automatically when building test apps
- add another allowed build warning in some integration tests\n\nCommit migrated from cfd4698381
2019-06-24 10:51:23 -07:00
Ryan Nowak ef4773a2d5 Add attribute splatting compiler support (dotnet/aspnetcore-tooling#640)
* Add TagHelperDescriptorProvider

* Remove bad life-choice

* Add some AddRange love

* Add splatting lowering and codegen

* PR feedback
\n\nCommit migrated from 9c8dd1cae7
2019-06-21 14:48:09 -07:00
Ajay Bhargav Baaskaran fa65b30dce Don't require preceding @ for event handler directive attributes (dotnet/aspnetcore-tooling#658)
* Don't require preceding @ for event handler directive attributes

* updated event handler th attribute type
\n\nCommit migrated from 6dce1532be
2019-06-20 17:05:59 -07:00
Ajay Bhargav Baaskaran ab867ec5e2 Allow @bind:event override when used with @bind (dotnet/aspnetcore-tooling#687)
* Allow @bind:event override when used with @bind

* Added more tests to cover standalone @bind-value=... case

* fix
\n\nCommit migrated from a399bd072e
2019-06-20 16:01:29 -07:00
Pranav K 7a510b311d Fixup incremental builds with ApplicationPartsDiscovery (dotnet/aspnetcore-tooling#693)
\n\nCommit migrated from df3c4d533a
2019-06-20 13:53:35 -07:00
Steve Sanderson 64f56b7607 For bind on element, also write the updated attribute name to the render tree builder (dotnet/aspnetcore-tooling#689)
\n\nCommit migrated from 6e5490049d
2019-06-20 09:54:06 +02:00
Pranav K 060ff0d878 Ensure ApplicationPart attributes are added during incremental builds (dotnet/aspnetcore-tooling#686)
Fixes https://github.com/aspnet/AspNetCore/issues/11315\n\nCommit migrated from 1a7a74bce8
2019-06-19 11:43:07 -07:00
N. Taylor Mullen c16d55c63f Allow `content`, `output` and `context` as keywords to VC params.
- It looks that when we first did VCTH we never put in the effort to reduce our footprint on available parameters for `ViewComponentTagHelper`s. I went ahead and added several underscores to the generated fields/parameters to reduce collisions.
- Updated tests to reflect the new codegen.

aspnet/AspNetCoredotnet/aspnetcore-tooling#8645
\n\nCommit migrated from b545a4de75
2019-06-19 11:19:16 -07:00
N. Taylor Mullen 261b256cf8 Fix error spacing.
\n\nCommit migrated from 1fdb3f3fdb
2019-06-06 13:22:33 -07:00