Commit Graph

158 Commits

Author SHA1 Message Date
Ajay Bhargav Baaskaran 5f462346c6 Added support for @namespace directive in Blazor (dotnet/aspnetcore-tooling#504)
* Added support for @namespace directive in Blazor
\n\nCommit migrated from 7f6c1422dd
2019-04-30 17:58:13 -07:00
Steve Sanderson ed04f3ebb8 'key' directive attribute for components (dotnet/aspnetcore-tooling#508)
\n\nCommit migrated from 0803d3bbed
2019-04-29 16:16:05 +01:00
Ryan Nowak 9deb4401e4 Fix dotnet/aspnetcore-tooling#5709
Enables the correct processing of data- attributes for components.
\n\nCommit migrated from 7ae8a8c842
2019-04-25 08:27:43 -07:00
Ajay Bhargav Baaskaran 43824a4c12 Verify line pragmas on generated code (dotnet/aspnetcore-tooling#392)
* Verify line pragmas on generated code
\n\nCommit migrated from ca33b2d51b
2019-04-22 14:43:13 -07:00
Ajay Bhargav Baaskaran 956606ee5d Fix TypeInference code gen for non-generic parameter (dotnet/aspnetcore-tooling#433)
\n\nCommit migrated from 4233bc593c
2019-04-19 10:06:13 -07:00
dotnet-maestro[bot] dd5dac97e5 [master] Update dependencies from aspnet/Extensions (dotnet/aspnetcore-tooling#409)
* Update dependencies from https://github.com/aspnet/Extensions build 20190410.2

- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview5.19210.2
- Microsoft.AspNetCore.Testing - 3.0.0-preview5.19210.2
- Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview5.19210.2
- Microsoft.Extensions.NonCapturingTimer.Sources - 3.0.0-preview5.19210.2
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview5.19210.2
- Microsoft.Extensions.Logging - 3.0.0-preview5.19210.2

Dependency coherency updates

- System.Diagnostics.DiagnosticSource - 4.6.0-preview5.19208.5 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27608-16 (parent: Microsoft.Extensions.Logging)
- System.Text.Encodings.Web - 4.6.0-preview5.19208.5 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27608-16 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.DependencyModel - 3.0.0-preview5-27608-16 (parent: Microsoft.Extensions.Logging)
- Microsoft.NETCore.Platforms - 3.0.0-preview5.19208.5 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27608-16 (parent: Microsoft.Extensions.Logging)

* Try a coherent SDK and Runtime

* Try again

* Fix codecheck

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

- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview5.19210.2
- Microsoft.AspNetCore.Testing - 3.0.0-preview5.19210.2
- Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview5.19210.2
- Microsoft.Extensions.NonCapturingTimer.Sources - 3.0.0-preview5.19210.2
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview5.19210.2
- Microsoft.Extensions.Logging - 3.0.0-preview5.19210.2

Dependency coherency updates

- System.Diagnostics.DiagnosticSource - 4.6.0-preview5.19208.5 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27608-16 (parent: Microsoft.Extensions.Logging)
- System.Text.Encodings.Web - 4.6.0-preview5.19208.5 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27608-16 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.DependencyModel - 3.0.0-preview5-27608-16 (parent: Microsoft.Extensions.Logging)
- Microsoft.NETCore.Platforms - 3.0.0-preview5.19208.5 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27608-16 (parent: Microsoft.Extensions.Logging)

* Try again

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

- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview5.19210.2
- Microsoft.AspNetCore.Testing - 3.0.0-preview5.19210.2
- Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview5.19210.2
- Microsoft.Extensions.NonCapturingTimer.Sources - 3.0.0-preview5.19210.2
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview5.19210.2
- Microsoft.Extensions.Logging - 3.0.0-preview5.19210.2

Dependency coherency updates

- System.Diagnostics.DiagnosticSource - 4.6.0-preview5.19208.5 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27608-16 (parent: Microsoft.Extensions.Logging)
- System.Text.Encodings.Web - 4.6.0-preview5.19208.5 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27608-16 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.DependencyModel - 3.0.0-preview5-27608-16 (parent: Microsoft.Extensions.Logging)
- Microsoft.NETCore.Platforms - 3.0.0-preview5.19208.5 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27608-16 (parent: Microsoft.Extensions.Logging)

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

- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview5.19212.9
- Microsoft.AspNetCore.Testing - 3.0.0-preview5.19212.9
- Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview5.19212.9
- Microsoft.Extensions.NonCapturingTimer.Sources - 3.0.0-preview5.19212.9
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview5.19212.9
- Microsoft.Extensions.Logging - 3.0.0-preview5.19212.9

Dependency coherency updates

- System.Diagnostics.DiagnosticSource - 4.6.0-preview5.19211.22 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27611-18 (parent: Microsoft.Extensions.Logging)
- System.Text.Encodings.Web - 4.6.0-preview5.19211.22 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27611-18 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.DependencyModel - 3.0.0-preview5-27611-18 (parent: Microsoft.Extensions.Logging)
- Microsoft.NETCore.Platforms - 3.0.0-preview5.19211.22 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27611-18 (parent: Microsoft.Extensions.Logging)

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

- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview5.19213.4
- Microsoft.AspNetCore.Testing - 3.0.0-preview5.19213.4
- Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview5.19213.4
- Microsoft.Extensions.NonCapturingTimer.Sources - 3.0.0-preview5.19213.4
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview5.19213.4
- Microsoft.Extensions.Logging - 3.0.0-preview5.19213.4

Dependency coherency updates

- System.Diagnostics.DiagnosticSource - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-02 (parent: Microsoft.Extensions.Logging)
- System.Text.Encodings.Web - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-02 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.DependencyModel - 3.0.0-preview5-27613-02 (parent: Microsoft.Extensions.Logging)
- Microsoft.NETCore.Platforms - 3.0.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-02 (parent: Microsoft.Extensions.Logging)

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

- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview5.19214.1
- Microsoft.AspNetCore.Testing - 3.0.0-preview5.19214.1
- Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview5.19214.1
- Microsoft.Extensions.NonCapturingTimer.Sources - 3.0.0-preview5.19214.1
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview5.19214.1
- Microsoft.Extensions.Logging - 3.0.0-preview5.19214.1

Dependency coherency updates

- System.Diagnostics.DiagnosticSource - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- System.Text.Encodings.Web - 4.6.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.DependencyModel - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)
- Microsoft.NETCore.Platforms - 3.0.0-preview5.19212.14 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27613-11 (parent: Microsoft.Extensions.Logging)

* Restore with the appropriate RuntimeFrameworkVersion before building or publishing

* Fix incremental test

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

- Microsoft.AspNetCore.BenchmarkRunner.Sources - 3.0.0-preview5.19216.8
- Microsoft.AspNetCore.Testing - 3.0.0-preview5.19216.8
- Microsoft.Extensions.CommandLineUtils.Sources - 3.0.0-preview5.19216.8
- Microsoft.Extensions.NonCapturingTimer.Sources - 3.0.0-preview5.19216.8
- Microsoft.Extensions.HashCodeCombiner.Sources - 3.0.0-preview5.19216.8
- Microsoft.Extensions.Logging - 3.0.0-preview5.19216.8

Dependency coherency updates

- System.Diagnostics.DiagnosticSource - 4.6.0-preview5.19215.16 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27616-01 (parent: Microsoft.Extensions.Logging)
- System.Text.Encodings.Web - 4.6.0-preview5.19215.16 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27616-01 (parent: Microsoft.Extensions.Logging)
- Microsoft.Extensions.DependencyModel - 3.0.0-preview5-27616-01 (parent: Microsoft.Extensions.Logging)
- Microsoft.NETCore.Platforms - 3.0.0-preview5.19215.16 (parent: Microsoft.NETCore.App)
- Microsoft.NETCore.App - 3.0.0-preview5-27616-01 (parent: Microsoft.Extensions.Logging)
\n\nCommit migrated from f9c222d305
2019-04-17 16:16:34 +00:00
Pranav K 2309e56de8 Do not split warning message across multiple lines (dotnet/aspnetcore-tooling#432)
The newline in the warning messages causes the warning message to appear as two separate warnings in the build output:

Microsoft.NET.Sdk.Razor\build\netstandard2.0\Sdk.Razor.CurrentVersion.targets(805,5): warning RAZORSDK1004: One or more Razor view or page files were found, but the project is not configured to add Razor support for MVC. The MSBuild property 'AddRazorSupportForMvc' must be set to correctly
Microsoft.NET.Sdk.Razor\build\netstandard2.0\Sdk.Razor.CurrentVersion.targets(805,5): warning RAZORSDK1004:  compile Razor files that target MVC. For more information, see https://go.microsoft.com/fwlink/?linkid=868374.

This change fixes the warning message to appear as a single warning:

Microsoft.NET.Sdk.Razor\build\netstandard2.0\Sdk.Razor.CurrentVersion.targets(805,5): warning RAZORSDK1004: One or more Razor view or page files were found, but the project is not configured to add Razor support for MVC. The MSBuild property 'AddRazorSupportForMvc' must be set to correctly compile Razor files that target MVC. For more information, see https://go.microsoft.com/fwlink/?linkid=868374.\n\nCommit migrated from 373bf2b74f
2019-04-16 20:44:34 -07:00
Pranav K 92e86f9d02 Check for TargetFramework in addition to version (dotnet/aspnetcore-tooling#428)
* Check for TargetFramework in addition to version

\n\nCommit migrated from a4ed82f823
2019-04-16 11:13:26 -07:00
Doug Bunting ae4af3d154 Shorten Microsoft.AspNetCore.Razor.Language.Test paths (dotnet/aspnetcore-tooling#425)
* Shorten Microsoft.AspNetCore.Razor.Language.Test paths
- aspnet/AspNetCoredotnet/aspnetcore-tooling#9358 and aspnet/AspNetCoredotnet/aspnetcore-tooling#7882
- do 4046 renames
- adjust solutions to renamed directory
- special-case directory of the Microsoft.AspNetCore.Razor.Language.Test project in `TestProject`\n\nCommit migrated from 72b939d855
2019-04-15 10:46:17 -07:00
Pranav K 90eb9e8535 Fixup SDK workarounds (dotnet/aspnetcore-tooling#413)
* Correctly update the .NET Core SDK used in Razor
* Replace LangVersion 8.0 with LangVersion Preview
* Remove AddRazorSupportForMvc from projects that do not require it
* Cleanup how AspNetCore.App is not referenced in the project
* Remove uses of _RazorComponentInclude from tests\n\nCommit migrated from 81ea07caf7
2019-04-12 11:17:09 -07:00
Ajay Bhargav Baaskaran 607f64b386 Don't render text tags for component documents (dotnet/aspnetcore-tooling#391)
\n\nCommit migrated from cb6f5d0dc7
2019-04-06 19:46:24 -07:00
dotnet-maestro[bot] 7957c11d02 [master] Update dependencies from dotnet/arcade (dotnet/aspnetcore-tooling#346)
* Update dependencies from https://github.com/dotnet/arcade build 20190317.10

This change updates the following dependencies
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19167.10

* Update dependencies from https://github.com/dotnet/arcade build 20190320.2

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19170.2

* Update dependencies from https://github.com/dotnet/arcade build 20190321.3

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19171.3

* Update dependencies from https://github.com/dotnet/arcade build 20190321.6

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19171.6

* Update dependencies from https://github.com/dotnet/arcade build 20190325.9

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19175.9

* Update dependencies from https://github.com/dotnet/arcade build 20190326.14

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19176.14

* Update dependencies from https://github.com/dotnet/arcade build 20190327.11

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19177.11

* Update dependencies from https://github.com/dotnet/arcade build 20190329.1

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19179.1

* Update dependencies from https://github.com/dotnet/arcade build 20190329.2

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19179.2

* Update dependencies from https://github.com/dotnet/arcade build 20190401.12

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19201.12

* Update dependencies from https://github.com/dotnet/arcade build 20190402.13

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19202.13

* Update dependencies from https://github.com/dotnet/arcade build 20190403.10

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19203.10

* Update dependencies from https://github.com/dotnet/arcade build 20190404.16

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19204.16

* Update dependencies from https://github.com/dotnet/arcade build 20190405.6

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19205.6

* Use updated Arcade NuSpec helpers
- provide `InitializeStandardNuspecProperties` with expected information
- use `$CommonMetadataElements$` in Microsoft.NET.Sdk.Razor.nuspec

nits:
- correct a typo or two
\n\nCommit migrated from c60b63e296
2019-04-07 00:22:02 +00:00
Ajay Bhargav Baaskaran 35edb562c5 Match component childcontent tag helper from a different namespace (dotnet/aspnetcore-tooling#390)
\n\nCommit migrated from 8a815a1882
2019-04-05 16:00:29 -07:00
Pranav K 5b71a24b4f Fixup
\n\nCommit migrated from f6dd261211
2019-04-04 06:05:46 -07:00
Pranav K 37275e5fd5 Do not generate MVC attributes unless necessary
Fixes https://github.com/aspnet/AspNetCore/issues/8161
\n\nCommit migrated from a976b80c7c
2019-04-03 21:57:08 -07:00
Ajay Bhargav Baaskaran 01e9d70207 Decode HTML entities (dotnet/aspnetcore-tooling#379)
* Decode HTML entities
\n\nCommit migrated from 6b7b9a3bc3
2019-04-03 10:03:42 -07:00
Ajay Bhargav Baaskaran 249752087e Fix csharp intellisense in _Imports.razor (dotnet/aspnetcore-tooling#387)
* Fix csharp intellisense in _Imports.razor

* Feedback
\n\nCommit migrated from 229951a5c8
2019-04-02 21:55:37 -07:00
N. Taylor Mullen ea5d10509e Expand RazorProject.GetItem to take in FileKinds when getting items.
- Obsoleted old `GetItem` API.
- Updated tests to take new API.
- Added a new test to verify the broken scenario.

dotnet/aspnetcore-tooling#8972
\n\nCommit migrated from 2dd34b8dd8
2019-04-02 13:32:35 -07:00
Pranav K d365a92ca4 Ensure _TargetingNETCoreApp30OrLater is available for older design time targets (dotnet/aspnetcore-tooling#386)
* Ensure _TargetingNETCoreApp30OrLater is available for design time targets

\n\nCommit migrated from 9d7fd089a6
2019-04-02 13:00:22 -07:00
Pranav K 8bc448e255 Prevent build failures and warnings when building 2.x projects (dotnet/aspnetcore-tooling#382)
* Move targets for component design time generation to
Components.targets

* Provide a better error message when referencing a 2.x Razor.Design
package in a 3.0 project

* Do not produce a warning for unresolved configuration when building
2.x projects\n\nCommit migrated from b5b1647646
2019-04-01 22:38:09 -07:00
Ryan Nowak 2ff5e7301e Fixes: dotnet/aspnetcore-tooling#5640 FormatException from diagnostic
This was just a badly written diagnostic format string
\n\nCommit migrated from ef7d82a7ff
2019-04-01 20:44:26 -07:00
Ajay Bhargav Baaskaran 8bb16c28aa Prevent newlines from being encoded in the output (dotnet/aspnetcore-tooling#374)
* Prevent newlines from being encoded in the output
\n\nCommit migrated from 5f74fae0d2
2019-03-29 13:04:15 -07:00
Steve Sanderson 8a8e144653 Remove base.BuildRenderTree calls (dotnet/aspnetcore-tooling#368)
\n\nCommit migrated from bcc77db762
2019-03-28 12:46:36 +00:00
Ajay Bhargav Baaskaran 8eee2d5bc4 Skip running ModelDirective pass for component documents (dotnet/aspnetcore-tooling#372)
\n\nCommit migrated from 6824620cb0
2019-03-27 09:52:34 -07:00
Ajay Bhargav Baaskaran 730f3cdc6b Better support for _Imports.razor (dotnet/aspnetcore-tooling#357)
* Better support for _Imports.razor

* Special case component imports when generating code

* Prevent a future VS crash

* Rebased and updated

* update

* Removed unnecessary newline
\n\nCommit migrated from abbfe00bdc
2019-03-26 17:58:37 -07:00
N. Taylor Mullen 784596aba6 Add support for C# 8 using variable declarations and add more C# 8 coverage.
- When adding additional C# 8 tests found that we didn't fully support this.
- Updated the C# 8.0 test to fully encompass everything C# 8.0.
- Added a feature flag to control using variable declaration errors when not top level.
- Added using variable declaration specific tests.

aspnet/AspNetCoredotnet/aspnetcore-tooling#5092
\n\nCommit migrated from ac08ad3659
2019-03-26 17:37:12 -07:00
Pranav K 6eb9044660 Fixup invalid configuration error message (dotnet/aspnetcore-tooling#365)
* Fix invalid parameter used in error message
* Re-organize test code\n\nCommit migrated from 5a73c2abe9
2019-03-26 08:58:38 -07:00
Javier Calvarro Nelson 9c35c07a0b bind-Value on EditText often results in the wrong thing (dotnet/aspnetcore-tooling#364)
Updates the bindtaghelperdescriptorprovider to use the changed event property type name on the bound attribute instead of the value property type attribute.\n\nCommit migrated from 3009045206
2019-03-26 10:06:18 +01:00
N. Taylor Mullen f98ffcd759 Update more test files.
\n\nCommit migrated from 76c1352d2c
2019-03-25 20:26:36 -07:00
N. Taylor Mullen 40340e9b91 Design update.
\n\nCommit migrated from c9e0d2a60f
2019-03-25 20:26:36 -07:00
N. Taylor Mullen f33e1fca53 Enforce nullability for user code.
- Expanded the `ProjectWorkspaceStateGenerator` to extract the C# language version when building the `ProjectWorkspaceState`. This approach enables all platforms to get nullability support without any changes (as long as they support `ProjectWorkspaceState`, which they do). Also, Roslyn suggested that we avoid dealing with LangVersion directly because there are several factors that impact its "effective" value on a project when run in tooling.
- Updated the `LinePragma` code generation to include `#nullable restore` and `#nullable disable` lines to allow for project restored nullability state for user code.
- Added a new `RazorProjectEngineBuilderExtensions` class that adds Roslyn specific project engine modifications. In this case it allows us to set the C# language version for a project engine and configure underlying features accordingly.
- Added a `SuppressNullabilityEnforcement` flag that only turns on if C# < 8 is specified.
- Updated LiveShare, VS4Mac and RazorGenerate to understand CSharpLanguageVersion.
- Added a single test output to show the change.

dotnet/aspnetcore-tooling#5092
\n\nCommit migrated from 1df8128b87
2019-03-25 20:26:36 -07:00
Pranav K 31e916cdfd Add .razor files to UpToDateCheckInput (dotnet/aspnetcore-tooling#359)
Fixes https://github.com/aspnet/AspNetCore/issues/8181\n\nCommit migrated from da168188b4
2019-03-23 14:05:21 -07:00
Ajay Bhargav Baaskaran 1d53925b8e Fixed generic components with fully qualified names (dotnet/aspnetcore-tooling#356)
\n\nCommit migrated from b7392f1f84
2019-03-22 14:22:12 -07:00
Ajay Bhargav Baaskaran 92d931c229 Support importing components with @using directives (dotnet/aspnetcore-tooling#276)
* Support importing components with @using directives

* Suppress taghelper directive completion in component documents

* feedback

* More feedback

* Update tests

* Update CodeAnalysis.Razor tests

* Flow filekind

* Changes

* More code gen tests

* More tests

* fix

* Added more tests

* Made stuff internal

* Filter out temporary tag helper descriptors

* update

* Do the needful
\n\nCommit migrated from 343f37748e
2019-03-22 10:29:38 -07:00
Ajay Bhargav Baaskaran 91a383ad3b Add support for _Imports.razor (dotnet/aspnetcore-tooling#354)
* Added support _Imports.razor

* Feedback
\n\nCommit migrated from 14704054f2
2019-03-22 09:19:56 -07:00
Ajay Bhargav Baaskaran 62199e2195 Bring back errors for missing tags in component documents (dotnet/aspnetcore-tooling#351)
\n\nCommit migrated from ca1e656f6b
2019-03-21 12:22:28 -07:00
Pranav K b2b207faa1 Allow some warnings (dotnet/aspnetcore-tooling#353)
Fixes https://github.com/aspnet/AspNetCore-Internal/issues/2050\n\nCommit migrated from e2b1df744e
2019-03-21 12:10:16 -07:00
Pranav K cf116d619b Do not restore as part of test (dotnet/aspnetcore-tooling#350)
\n\nCommit migrated from 84bc53671f
2019-03-21 09:28:44 -07:00
N. Taylor Mullen e5064d3c76 Allow markup in local functions and @functions.
- Allow markup to exist in all code blocks. Prior to this change whenever we'd see nested curly braces we would do dumb brace matching to skip over any potentially risky code; now we treat every curly brace as an opportunity to intermingle Markup.
- One fix I had to introduce was now that functions blocks are parsed like `@{}` blocks I ran into cases where certain reserved keywords would get improperly parsed. This exposed a bug in our parsing where we’d treat **class** and **namespace** as directives without a transition in a `@{}` block. For instance this:
```
@{
    class
}
```
would barf in the old parser by treating the `class` piece as a directive even though it did not have a transition. To account for this I changed our reserved directives to be parsed as directives instead of keywords (it's how they should have been parsed anyhow). This isn't a breaking change because the directive parsing logic is a subset of how keywords get parsed.

- One quirk this change introduces is a difference in behavior in regards to one error case. Before this change if you were to have `@if (foo)) { var bar = foo; }` the entire statement would be classified as C# and you'd get a C# error on the trailing `)`. With my changes we try to keep group statements together more closely and allow for HTML in unexpected or end of statement scenarios. So, with these new changes the above example would only have `@if (foo))` classified as C# and the rest as markup because the original was invalid.
- Added lots of tests,
- Modified the feature flag to maintain the old behavior when disabled.

aspnet/AspNetCoredotnet/aspnetcore-tooling#5110
\n\nCommit migrated from 5ffd84e56d
2019-03-20 10:38:50 -07:00
Pranav K 25e5a4ffab Infer Razor Configuration \ RazorLangVersion based on TFM (dotnet/aspnetcore-tooling#343)
* Infer Razor Configuration \ RazorLangVersion based on TFM

Fixes https://github.com/aspnet/AspNetCore/issues/6392
\n\nCommit migrated from cfee40a19e
2019-03-19 16:33:26 -07:00
Ajay Bhargav Baaskaran 2c39457306 Flow RootNamespace from MSBuild (dotnet/aspnetcore-tooling#331)
- Flow Root namespace through in command line builds

- Flow Root namespace through in design time builds

- Feedback\n\nCommit migrated from 057d4f3570
2019-03-13 14:18:07 -07:00
Andrew Stanton-Nurse eeabe9ee71 skip flaky razor build integration test (dotnet/aspnetcore-tooling#326)
mitigates aspnet/AspNetCore-Internaldotnet/aspnetcore-tooling#1931\n\nCommit migrated from 128efdd177
2019-03-12 09:51:35 -07:00
Ajay Bhargav Baaskaran c5c30e460e Preserve diagnostics when rewriting Red nodes (dotnet/aspnetcore-tooling#319)
\n\nCommit migrated from 276532454e
2019-03-11 10:31:37 -07:00
N. Taylor Mullen b3d727b631 Enable IntelliSense for new component parameters.
- Added a `FilePathComparison` object since not all string methods allow a comparer.
- Updated `RazorDirectiveCompletionProvider` to also understand `.razor` files. This is an edge case scenario where users have disabled modern completion and are using Razor components (you need a reg key to disable the modern completion or MS needs to disable it).
- Tested this in VS by referencing the latest Razor SDK (preview 3) from NuGet and then replacing the Razor design time targets in VS to be the ones from the preview 3 package.
- Added workspace project state change detector tests.

dotnet/aspnetcore-tooling#8064
\n\nCommit migrated from 6a83ed13fc
2019-03-08 09:01:03 -08:00
Ajay Bhargav Baaskaran 1657080589 Correctly normalize file path from network shares (dotnet/aspnetcore-tooling#298)
* Correctly normalize file path from network shares

* Feedback
\n\nCommit migrated from 8ee676d84c
2019-03-05 15:13:54 -08:00
Ajay Bhargav Baaskaran 8775af3309 Re-enable skipped test (dotnet/aspnetcore-tooling#303)
\n\nCommit migrated from 14eee079bf
2019-03-05 12:22:21 -08:00
N. Taylor Mullen 9ffd08c061 Remove rarely used public obsolete public API.
- The `DocumentWriter` case should never be called because you need to override a lot of the internals of the RazorEngine to get to the document writer. Therefore, little harm in removing the method.
- `ProjectChangeEventArgs` used to be uised by the LiveShare extension. We've since taken ownership of those bits and no longer need to maintain those constructors.
- `DefaultTagHelperDescriptorProvider.DesignTime` didn't actually do anything. Removing since the code was truly dead and did nothing functionally.

dotnet/aspnetcore-tooling#7146
\n\nCommit migrated from ba6450a695
2019-03-04 19:35:17 -08:00
N. Taylor Mullen 53392ba761 Add LanguageServer Common IVTs
\n\nCommit migrated from 29b0e92bcd
2019-03-04 15:08:49 -08:00
Ajay Bhargav Baaskaran ede3a6809e Temporarily skip test (dotnet/aspnetcore-tooling#288)
\n\nCommit migrated from 0598ec4497
2019-03-01 11:48:46 -08:00
Pranav K 1af49ef26f Reference the SDK project to make build time restore actually work (dotnet/aspnetcore-tooling#278)
\n\nCommit migrated from 22f4c134c1
2019-03-01 09:35:52 -08:00