Commit Graph

80 Commits

Author SHA1 Message Date
Ajay Bhargav Baaskaran b87b984902 Merge branch 'release/vs16.0-preview3'
\n\nCommit migrated from 77532db903
2019-02-01 10:59:34 -08:00
Ajay Bhargav Baaskaran 57211a33db Fix: Exception for empty data- attributes in tag helpers (dotnet/aspnetcore-tooling#173)
\n\nCommit migrated from 6d71b6a265
2019-01-30 09:12:37 -08:00
Pranav K 4505f76987 Ensure TagHelpers from the current project are discovered for projects targeting 2.x
As part of migrating the CodeGeneration targets in to the Razor.Sdk,
the SDK broke the contract that RazorReferencePaths includes the full closure
of assemblies during tag helper discovery.

This change restores the behavior to be compatible with the 2.x Razor.Design
package and adds tests to verify TagHelper discovery works in a range of projects.

Fixes https://github.com/aspnet/AspNetCore/issues/6825
\n\nCommit migrated from 99938c9b7e
2019-01-29 11:21:27 -08:00
Ryan Nowak d4c3a2fbd9 Fix dependency to aspnet/AspNetCore-Tooling (dotnet/aspnetcore-tooling#170)
* Remove unused package versions
* Remove references to Html.Abstractions
Removing this package since it's from the aspnet/AspNetCore.

* Remove System.ValueTuple package inside remove
* Add versions.details.xml items from corefx
* Add Microsoft.NETCore.App
* Fill up Version.Details.xml
* Update dependencies
* Fix failing test
\n\nCommit migrated from bd7fc9ddf6
2019-01-24 16:57:16 -08:00
Ajay Bhargav Baaskaran 642a2f5789 Final cleanup to remove all traces of ParseBlockTest (dotnet/aspnetcore-tooling#169)
\n\nCommit migrated from e160872142
2019-01-24 12:42:10 -08:00
N. Taylor Mullen 67588374aa Convert HtmlAttributeTest to use ParseDocument
aspnet/AspNetCoredotnet/aspnetcore-tooling#6470
\n\nCommit migrated from 61b7265bed
2019-01-24 09:05:52 -08:00
Ajay Bhargav Baaskaran 18ef06a442 Merge branch 'release/vs16.0-preview3'
\n\nCommit migrated from 5e05f5ff63
2019-01-22 16:09:47 -08:00
Ajay Bhargav Baaskaran cdaad2964d Fix tag grouping for tags with no name
\n\nCommit migrated from f5c1068d88
2019-01-22 15:32:22 -08:00
Ajay Bhargav Baaskaran 6c6e048dcc Fix missing transition in using keyword
\n\nCommit migrated from 02781b17cd
2019-01-22 15:32:22 -08:00
Ajay Bhargav Baaskaran 542d17bbfa Fix tag grouping for tags with no name
\n\nCommit migrated from e24c9b25a4
2019-01-22 14:49:21 -08:00
Ajay Bhargav Baaskaran f97ab076b5 Fix missing transition in using keyword
\n\nCommit migrated from dd45375f72
2019-01-22 14:38:28 -08:00
Ajay Bhargav Baaskaran 12ec14327f Convert CSharpTemplateTest, CSharpToMarkupSwitchTest, CSharpVerbatimBlockTest and CSharpWhitespaceHandlingTest to use ParseDocument (dotnet/aspnetcore-tooling#151)
\n\nCommit migrated from ca891b4101
2019-01-22 10:45:53 -08:00
Pranav K ada61cf03d Ensure updates to Razor components trigger design time build
* Use _RazorComponentInclude to determine the set of files to set Generator property for
* Run RazorGenerateComponentDeclarationDesignTime instead of RazorComponentGenerate during design time builds
* Update design time targets to set Generator for content files with .razor extension.

Fixes https://github.com/aspnet/AspNetCore/issues/6859
Fixes https://github.com/aspnet/AspNetCore/issues/6860
\n\nCommit migrated from 37d96aa417
2019-01-22 09:37:18 -08:00
Ajay Bhargav Baaskaran 2bbd247b13 Convert CSharpNestedStatementsTest, CSharpReservedWordsTest, CSharpSpecialBlockTest and CSharpStatementTest to use ParseDocumentTest (dotnet/aspnetcore-tooling#148)
\n\nCommit migrated from 45b304a348
2019-01-18 13:26:58 -08:00
Ajay Bhargav Baaskaran e7d5ee95ed Port: Fix failing file comparison tests (dotnet/aspnetcore-tooling#135)
\n\nCommit migrated from 5166fec846
2019-01-18 08:50:22 -08:00
NTaylorMullen 237d2ec515 Merge branch 'release/vs16.0-preview3'
# Conflicts:
#	eng/AfterSigning.targets
\n\nCommit migrated from 1dd62799dd
2019-01-17 19:41:34 -08:00
Ajay Bhargav Baaskaran 31e2271134 Enable full fidelity check for ParseBlock tests as well (dotnet/aspnetcore-tooling#137)
\n\nCommit migrated from 6ca6a37f9b
2019-01-17 17:30:15 -08:00
Ajay Bhargav Baaskaran 299db398fe Merge pull request dotnet/aspnetcore-tooling#136 from aspnet/release/vs16.0-preview3
Merge branch release/vs16.0-preview3 to master\n\nCommit migrated from abb01b0653
2019-01-17 14:15:35 -08:00
Ajay Bhargav Baaskaran e6b8c86a48 Better structure for Tag helper start/end tags (dotnet/aspnetcore-tooling#132)
\n\nCommit migrated from f6ab4cc1d1
2019-01-17 13:38:17 -08:00
NTaylorMullen 060c8e63b1 Remove RazorTemplateEngine and friends.
- Also nuked tests and resource entries specific to the template engine.

Addresses aspnet/AspNetCoredotnet/aspnetcore-tooling#5079
\n\nCommit migrated from d5f0b4c0b4
2019-01-16 14:26:31 -08:00
N. Taylor Mullen 439349899b Prioritize local dotnet when running SDK Razor tests.
- The SDK tests were occasionally failing with access denied due to the test using the machines dotnet.exe (instead of the local projects dotnet.exe).

dotnet/aspnetcore-tooling#1667
\n\nCommit migrated from bb2134a536
2019-01-15 15:38:52 -08:00
N. Taylor Mullen 7eb90cbbbd Remove obsolete RazorProject ViewEngine based create method.
aspnet/AspNetCoredotnet/aspnetcore-tooling#4876
\n\nCommit migrated from 57df0ea9cf
2019-01-15 15:36:02 -08:00
Ajay Bhargav Baaskaran ceb4d0853a Some minor cleanup (dotnet/aspnetcore-tooling#123)
\n\nCommit migrated from 97930b91f8
2019-01-15 15:26:44 -08:00
Ryan Nowak 40633dde21 Add attribute only bindings and fix dotnet/aspnetcore-tooling#6373
Adds a new API for WTE to call given a TagHelperBinding to determine if
the binding should colorize/classify only the attributes of the HTML
element in source code. This is driven by a new metadata item that the
Components 'directive attributes' all set. There's no way for a user to
access this feature via tag helpers currently, but it could be added
easily in the future.

Also fixing dotnet/aspnetcore-tooling#6376 while I'm in there. 👍
\n\nCommit migrated from df449beea9
2019-01-14 15:25:49 -08:00
Pranav K 148bc99cce Use a property to allow specifying component globbing pattern
Workaround for https://github.com/aspnet/AspNetCore/issues/6500
\n\nCommit migrated from cee0223732
2019-01-14 14:53:24 -08:00
Ajay Bhargav Baaskaran 56695d17c9 Set ParserContext.StartOfLine to true when parsing starts (dotnet/aspnetcore-tooling#116)
* Set ParserContext.StartOfLine to true when parsing starts

* Missed baselines
\n\nCommit migrated from a80c3a981a
2019-01-14 14:17:22 -08:00
Ajay Bhargav Baaskaran d5e9a153c7 Correctly handle whitespace that precedes a Razor directive (dotnet/aspnetcore-tooling#117)
\n\nCommit migrated from 15556c8ff3
2019-01-14 11:59:37 -08:00
Ryan Nowak 9541938327 Fix A VS issue
The issue here is that the downlevel SDK (2.1/2.2) don't define the
component-related targets needed for the component design time build.
Depending on the ordering of targets, this can break all features in VS
that depend on the design-time build.

Since we want this to noop in those cases, the best fix is to make our
targets depend on a target property that will be empty in the downlevel
SDKS, but will contain our targets in the 3.0 SDK.

(cherry picked from commit dotnet/aspnetcore-tooling@b88b32c73a)
\n\nCommit migrated from 1c4b19ae88
2019-01-14 08:55:39 -08:00
Ajay Bhargav Baaskaran b0e2dc2add Added check to ensure we generate syntax tree with full fidelity (dotnet/aspnetcore-tooling#111)
* Added check to ensure we generate syntax tree with full fidelity

* Better check

* Feedback
\n\nCommit migrated from 88653fc348
2019-01-10 13:55:28 -08:00
Ajay Bhargav Baaskaran b449a44440 Fix void tags grouping logic (dotnet/aspnetcore-tooling#110)
* Fix void tags grouping logic

* Handle bang in tag name
\n\nCommit migrated from 2c41ae9550
2019-01-09 11:41:10 -08:00
Ajay Bhargav Baaskaran 14afcc3eaf Reenable skipped test (dotnet/aspnetcore-tooling#99)
\n\nCommit migrated from 2ad0641b1e
2019-01-09 11:39:02 -08:00
Ajay Bhargav Baaskaran e1245d874f Fix: Missing void end tag when targeted by TH with WithoutEndTag structure (dotnet/aspnetcore-tooling#105)
\n\nCommit migrated from 33bf2691d5
2019-01-08 16:11:18 -08:00
Ryan Nowak 5b5aa6837f Properly handle attr-value prefix in markup pass
Fixes aspnet/AspNetCoredotnet/aspnetcore-tooling#6480

We were missing handling for the attribute value prefix of a markup
attribute during the markup block rewrite pass. This is properly handled
inside the runtime code writer so you wouldn't see this bug if the
contents of the element were dynamic (and thus could not be rewritten).

Most of the churn here is due to renaming classes. We generally prefer
the term *markup* over *html* in code artifacts, and this was one piece
of new code that refers to html.
\n\nCommit migrated from d16eafd667
2019-01-08 10:10:29 -08:00
Ajay Bhargav Baaskaran 77bd9d343c Fixed exception with non taghelper start/end void tags
\n\nCommit migrated from ee8fdae756
2019-01-07 21:02:10 -08:00
Ajay Bhargav Baaskaran f87d9b5335 Fix null ref in the parser (dotnet/aspnetcore-tooling#103)
\n\nCommit migrated from 8e1629b60b
2019-01-07 20:18:39 -08:00
Ryan Nowak 32a8a7485e Remove workarounds for missing 3.0 support
Leading up the release of VS 16.0p1 we added workarounds to the SDK to
make Razor fall back to the 2.1 configuration for design-time. Since
we're adding the 3.0 language support to preview2 we can remove these
workarounds. These features have been available in internal builds for
some time.
\n\nCommit migrated from e6be8a7a3e
2019-01-07 16:53:55 -08:00
Ryan Nowak d46aa2e2bd Enabling features for Components in VS
This is the final set of enabling features for VS.. including:
- Adding component types to IDE project engine
- Using file kind in the editor
- Enabling component documents in the project system
- Fixing some bugs in the xaml/msbuild authoring
- Adding a missing capability for component projects

The only thing here that probably bears explaining is the class name
mangling. This is a carry over from Blazor, basically because the
generated code is part of the workspace, we have to mangle the class
name to avoid collisions. The work to resolve this is tracked
separately, and will require coordination from a few teams to resolve.
\n\nCommit migrated from d0a8aa3f97
2019-01-07 16:28:48 -08:00
Ryan Nowak 9c10b29f87 Merge pull request dotnet/aspnetcore-tooling#101 from aspnet/nimullen/merge16.0tomaster
Merging changes into master\n\nCommit migrated from 1041e8be71
2019-01-07 16:28:36 -08:00
N. Taylor Mullen 6552d950e0 Merge branch 'release/vs16.0'
\n\nCommit migrated from c331867311
2019-01-07 15:45:17 -08:00
Pranav K 4e909515a7 PR changes
\n\nCommit migrated from ef1a7507c9
2019-01-07 15:43:28 -08:00
Pranav K 500bdc1fd4 Exclude RazorComponent items from RazorGenerate item group
Interim solution to allow components to share the .cshtml extension. When declared in
the project file, the SDK will prevent RazorComponent items from being included
in the RazorGenerate itemgroup.
\n\nCommit migrated from 92e2c70b69
2019-01-07 15:17:41 -08:00
Ryan Nowak b10374a368 SDK updates for components tooling
This is a bug fix for the RazorComponentWithTargetPath xaml rule. We
need to have separate targets for components and views.

The other fix here is a change to the set of workarounds we're using for
components currently. We need this project capability for the correct
project host to be used when loading the project.

(cherry picked from commit dotnet/aspnetcore-tooling@78163f7e4f)
\n\nCommit migrated from f8835ce7a8
2019-01-04 13:12:47 -08:00
Ryan Nowak e6e8fba39c SDK updates for components tooling
This is a bug fix for the RazorComponentWithTargetPath xaml rule. We
need to have separate targets for components and views.

The other fix here is a change to the set of workarounds we're using for
components currently. We need this project capability for the correct
project host to be used when loading the project.
\n\nCommit migrated from 78163f7e4f
2019-01-04 13:08:05 -08:00
Pranav K 49dfd7dacc Add a test using 2.2 project with current Sdk (dotnet/aspnetcore-tooling#91)
* Add a test using 2.2 project with current Sdk

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

* Do not reference Microsoft.AspNetCore.App in test apps
\n\nCommit migrated from 9b4fd448d4
2019-01-04 10:36:41 -08:00
Ajay Bhargav Baaskaran 07a62871d0 Make whitespace in extensible directives be SpanKind.None (dotnet/aspnetcore-tooling#90)
\n\nCommit migrated from 9035677e46
2019-01-03 15:58:48 -08:00
Ryan Nowak 19bc651858 Add design-time MSBuild support for components
\n\nCommit migrated from f6f6e16467
2019-01-03 08:50:15 -08:00
Ryan Nowak 14abd88648 Clean up usage of FileKinds
\n\nCommit migrated from b45125a755
2019-01-03 08:50:15 -08:00
Ajay Bhargav Baaskaran 053121e0b7 Refined Start tag and End tag structure (dotnet/aspnetcore-tooling#62)
Regenerated baselines\n\nCommit migrated from d54460296f
2019-01-02 15:32:55 -08:00
Ryan Nowak 583113686c Test cleanup for component tests
This code all got dumped here during the port. This change deletes tests
that have already **moved** to the aspnet/AspNetCore repo.

Also fixed the markup rewriter tests for components.
\n\nCommit migrated from 86cc904004
2019-01-01 22:30:04 -08:00
Ryan Nowak 74d56ce024 Ignore markup comments in components
Fixes: aspnet/AspNetCoredotnet/aspnetcore-tooling#6184

This gives us parity with the current behavior. Since comments aren't
meaningful in a component/render-tree context, we ignore everything
inside of them for codegen/lowering.
\n\nCommit migrated from 7250dd2624
2019-01-01 20:06:32 -08:00