Commit Graph

74 Commits

Author SHA1 Message Date
Nate McMaster ca2d5738d6
Automatically generate binding redirects assembly attributes for the Razor VSIX 2018-06-27 16:42:02 -07:00
Pranav K cdbcfb7a05 Fixup references to versions in vsix 2018-05-29 15:17:01 -07:00
Ryan Nowak 881fb49f73 Merge branch 'rel/vs15.7' into release/2.1 2018-03-22 18:36:32 -07:00
Ryan Nowak 0a450d2f53 Add a version to the Razor about dialog entry 2018-03-22 14:54:20 -07:00
N. Taylor Mullen 5c456fbd04 Merge branch 'rel/vs15.7' into dev
# Conflicts:
#	build/dependencies.props
#	src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/DefaultProjectSnapshot.cs
#	src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/DefaultProjectSnapshotManager.cs
#	src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/DefaultProjectSnapshotWorker.cs
#	src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/DefaultProjectSnapshotWorkerFactory.cs
#	src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/ProjectSnapshot.cs
#	src/Microsoft.CodeAnalysis.Razor.Workspaces/ProjectSystem/ProjectSnapshotUpdateContext.cs
#	src/Microsoft.VisualStudio.Editor.Razor/DefaultVisualStudioDocumentTracker.cs
#	src/Microsoft.VisualStudio.LanguageServices.Razor/Legacy/LegacyTagHelperResolver.cs
#	src/Microsoft.VisualStudio.LanguageServices.Razor/Microsoft.VisualStudio.LanguageServices.Razor.csproj
#	src/Microsoft.VisualStudio.LanguageServices.Razor/ProjectSystem/Rules/RazorConfiguration.cs
#	src/Microsoft.VisualStudio.LanguageServices.Razor/ProjectSystem/Rules/RazorExtension.cs
#	src/Microsoft.VisualStudio.LanguageServices.Razor/ProjectSystem/Rules/RazorGeneral.cs
#	src/Microsoft.VisualStudio.LanguageServices.Razor/ProjectSystem/Rules/RazorProjectProperties.cs
#	test/Microsoft.CodeAnalysis.Razor.Workspaces.Test/ProjectSystem/DefaultProjectSnapshotTest.cs
#	test/Microsoft.VisualStudio.Editor.Razor.Test/Microsoft.VisualStudio.Editor.Razor.Test.csproj
2018-03-05 22:58:07 -08:00
Pranav K 33e60ae363 Separate VS/DesignTime properties from general SDK properties
Fixes #2069
2018-02-21 11:55:36 -08:00
Ryan Nowak 0b777dad3f Decouple tooling from MVC assemblies 2018-02-19 14:39:19 -08:00
Ryan Nowak 5008c7803c Add a project system
Step 1: Add HostProject

This is a somewhat complex addition to the ProjectSnapshotManager. Now
that we accept updates from the underlying IDE project system we need to
coordinate those with the Workspace.

This means that ProjectSnapshot itself now also has a version concept.

Step 2: Introduce a new project system based on CPS

We use project capabilities defined by the Razor SDK to determine
whether to rely on MSBuild evaluation to detect the configuration or
whether to fallback to assembly-based detection.

Step 3: Flow RazorConfiguration everywhere

We use now expose the RazorConfiguration to the language service and
editor. This means that we no longer need to detect the project's
configuration asynchronously, it happens much faster now.
2018-02-19 14:39:19 -08:00
Nate McMaster 13824c418e Catch 15.7 up with dev
This change integrates most of the non-breaking work that we did in 2.1
including the updates to make Razor less coupled to MVC.
2018-02-19 10:46:16 -08:00
N. Taylor Mullen 6c75f29419 Include VSIX symbols in build output.
#2037
2018-02-08 14:36:07 -08:00
N. Taylor Mullen c1b0f10d04 Update RazorExtensions VSIX version to 15.8 2018-01-23 12:13:31 -08:00
N. Taylor Mullen 748fe8adc8 Merge branch 'rel/vs15.7' into dev 2018-01-23 12:10:18 -08:00
N. Taylor Mullen af12a455ff Update RazorExtensions VSIX version to 15.7. 2018-01-23 12:08:15 -08:00
N. Taylor Mullen 1e1630068f Make DefaultTagHelperResolver use the correct GetTagHelpersAsync.
- Prior to this we weren't overriding the `GetTagHelpersAsync` method resulting in our TagHelper discovery being executed in-process.
- Removed legacy `ITagHelperResolver` legacy types.
2017-12-12 16:26:55 -08:00
Nate McMaster 4d737af167 Pin tool and package versions to make builds more repeatable
Part of aspnet/Universe#575
2017-11-01 18:12:08 -07:00
N. Taylor Mullen 212d97e511 Manage VisualStudioRazorParser lifetime.
- Exposed `VisualStudioRazorParser`, `DocumentStructureChangedEventArgs` and `ICanHasContextChangedListener` as ways to consume the new parser for a Razor document.
- Split the `VisualStudioRazorParser` into an abstract base and an implementation to avoid internal constructors.
- Changed the parser and corresponding smart indenter to take in document trackers, template engine factories and parser context change listeners. Of these additions the parser context change listeners will be deprecated once we own the TagHelper discovery mechanisms.
- Changed how the parser manages its internal parsing life cycle. It now creates template engines when the document tracker tells it to. So when project changes happen or new documents are opened the parser will re-instantiate its internal parser to ensure that it is parsing against the correct configurations.
- Removed all accessor services in favor of a singular RazorEditorFactoryService. This service is responsible for retrieving/creating various Razor components.
- Changed the code document provider to now use the parser provider in order to locate code documents associated with buffers. Prior to this that logic was hard coded.
- Removed old template engine reconstruction logic in the document tracker now that the parser owns that piece.
- Updated tracker to notify listeners when it's unsubscribing. This is how listeners can know when to tear bits down.
- Refactored/added pieces to the `DefaultVisualStudioRazorParser` in order to improve its unit/integration testing ability.
- Updated existing tests to react to new signatures.
- Added new visual studio razor parser tests, uncommented existing ones, and re-enforced ones that were previously flakey.
- Added various tests for the new services added, i.e. text buffer factory service tests.

#1630
2017-10-23 14:39:15 -07:00
Ryan Nowak b6d01fda46 Target 15.6 for the VSIX in dev 2017-10-20 14:10:18 -07:00
N. Taylor Mullen 6c8286eed7 Split LanguageServices.Razor.
- Created a new `Microsoft.VisualStudio.Editor.Razor` assembly to contain Visual Studio platform agnostic info.
- Added a new `Microsoft.VisualStudio.Editor.Razor.Test.Common` project to be the centerfold for all VisualStudio agnostic test pieces.
- Added a `Microsoft.VisualStudio.Editor.Razor.Test` project and pulled in LanguageService test files into the the Editor.Razor.Test project to correspond to their movement in the src project.

#1690
2017-09-29 16:26:50 -07:00
N. Taylor Mullen edcf6857d1 Add x64 service hub json.
- Updated corresponding entries in manifest and csproj to reflect the new json addition.

#1705
2017-09-29 12:01:58 -07:00
Ryan Nowak 6e6a24cbb4 Add a background listener for notifications
This change adds an actual background worker for listening to project
change notifications and starts sending updates when the project's razor
dependencies change.

I had to do a litle surgery to get things working. There were plenty of
small bug fixes.

Additionally I got rid of the WeakReferences for tracking listeners. I
was seeing TextBuffers hanging around in VS longer than I expected and
the WeakReferences weren't getting cleaned up. I think it's better that
we just track the lifetime.
2017-09-18 16:56:53 -07:00
Ryan Nowak 00dc95098f Update our diagnostics window
Updates our diagnostics window to use the 'in the box' version of the
assembly/version discovery logic.
2017-09-06 15:37:06 -07:00
Ajay Bhargav Baaskaran 5cb11b9bf4 Implmement a project system for Razor 2017-08-30 12:58:38 -07:00
Ryan Nowak d87e0f7fbd Fixes #1632 - track textviews in the document tracker
I've stripped out some of the dead code and complexity from the document
tracker in an attempt to simplify it. I will bring this back as part of
the multi-targeting work.
2017-08-24 10:47:33 -07:00
Nate McMaster 4094e8b8f3 Use PackageReference instead of project.json in the VSIX project (#1642) 2017-08-24 09:30:29 -07:00
Nate McMaster 4cadee2762 Use Directory.Build.props/targets (#1641) 2017-08-23 12:24:57 -07:00
Ajay Bhargav Baaskaran dbcac41be7 Get the correct version of Mvc for multitargeting 2017-08-07 12:55:37 -07:00
Ryan Nowak 5161ebaf8a Enables the Razor Document Tracker
This enables the tracking of events that change the 'razor' state of a
document that's open in the editor.

Also fixed a crash that can occur when creating a new project with the
Razor Info window open.
2017-08-07 12:36:13 -07:00
N. Taylor Mullen aa980fc67c Roslyn-ize our tooling contracts.
- Added `ILanguageServiceFactory` types for all serviceable contracts.
- Maintained binary compatibility by copy/pasting existing services into a Legacy folder.
- Added a Workspaces.Test project since their implementations moved.
- Updated binary incompatible version of `RazorSyntaxFactsService` to not depend on VisualStudio. Added an extension type to the VS.LanguageServices.Razor project to enable easy-access from VisualStudio.

Below on refers to the binary incompatible copies.
Core services that were **entirely** moved from VisualStudio.Razor => Razor.Workspaces are as follows:
- `RazorSyntaxFactsService`, this included mutating the API to not depend on VisualStudio and moving some primitive types such as `AcceptedCharacters`.
- `TagHelperCompletionService`
- `TagHelperFactsService`
These all have a `ServiceLayer` of `Editor`.

Bits that were partially moved:
- `RazorTemplateEngineFactoryService`. The Default implementation and its corresponding factory still live in VisualStudio.Razor. This way Razor.Workspaces can get by without a reference to Mvc.Razor.Extensions.
- `ITagHelperResolver` used to exist in VisualStudio.Razor. Removed the type and replaced its usage with the already-existing `TagHelperResolver` type in Razor.Workspaces. Both contracts were nearly identical.
These all have a `ServiceLayer` of `Default`.

#1260
2017-08-02 16:58:44 -07:00
Ryan Brandenburg 643efbe660 Change version on Binding redirects 2017-07-24 14:50:30 -07:00
Mike Harder 01fe818dcd Update dependencies to match Visual Studio 15.3 (#1534) 2017-07-11 16:34:32 -07:00
Ryan Nowak 1d5dfcc6b4 Update our VSIX version to 15.5 2017-07-10 08:08:09 -07:00
Ryan Nowak 95c5049dd0 Add DisplayName and Description for directives
Renamed Name -> Directive so that it doesn't overlap with DisplayName.
2017-06-07 13:37:34 -07:00
Ryan Nowak fcb8669c98 Use project.json for the VSIX project
Also did some spring cleaning on redundent references in the language
services package.

Note that the 'immutable' packages are now totally redundant with
Shell.15.0. You're supposed to use one or the other. Since our minimum VS
is 15, I just went with shell 15.0.

Now the VSIX project doesn't have many references in it.
2017-06-03 17:27:35 -07:00
N. Taylor Mullen 5aababce6e Remove magic string keys from TH builders.
- Replaced the magic strings with extension methods that produce the same behavior as the string keys did.
- Added tests to validate new extension methods.

#1307
2017-05-19 11:15:38 -07:00
Ryan Nowak f96b22ffc3 Bump VSIX version up to 15.4.XXXXX 2017-05-17 13:38:32 -07:00
N. Taylor Mullen 577511945b Merge branch 'rel/15.3' into dev 2017-05-16 14:54:36 -07:00
N. Taylor Mullen a18b96cbf3 Suppress unneeded dlls from Razor VSIX
#1349
2017-05-16 14:53:25 -07:00
N. Taylor Mullen 01ec2202b2 Remove assembly name filter from THD API.
- This parameter was always passed `null` by tooling in the past.

#1279
2017-05-16 11:06:07 -07:00
Ryan Nowak b17e506ce8 Some API cleanup around directivest 2017-05-12 13:27:28 -07:00
Ryan Nowak 3969c23316 Adds a tracking system for Razor documents
This is a MEF service that can actively or passively track open ITextViews
and give us information about the Razor initialization state and eventing
when it changes.

The purpose of this is to act as a bridge between the VS mef world and the
roslyn world.

For now this doesn't do any passive tracking of Razor documents, it's only
on demand. That means it will only be initialized and used right now when
you are using the Razor developer tools. This is just to reduce our risk,
it's not ideal to ship code in VS that's doing something without anyone
looking at the result.
2017-05-11 08:24:37 -07:00
Ryan Nowak 8881d73598 Bump our VSIX version to 15.3.XXXXX 2017-04-26 10:06:31 -07:00
Ryan Nowak 27148c05f6 Update our Roslyn dependencies to 15.3 2017-04-24 18:59:06 -07:00
N. Taylor Mullen 1d10293db5 Revert "Uncap version max for vsix manifest."
This reverts commit ee1fd61e64.
2017-04-14 16:19:03 -07:00
N. Taylor Mullen ee1fd61e64 Uncap version max for vsix manifest. 2017-04-14 14:12:47 -07:00
N. Taylor Mullen 1b8a4e704c Rename ITagHelperDescriptorBuilder => TagHelperDescriptorBuilder.
#1210
2017-04-11 17:08:38 -07:00
N. Taylor Mullen 0618bae3bd Rename Microsoft.AspNetCore.Razor.Evolution => Microsoft.AspNetCore.Razor.Language.
- Also updated corresponding test project to go from Evolution => Language.
- Regenerated test files to reflect new file paths.

#1169
2017-04-10 10:20:04 -07:00
Pranav K 1bd31f42c0 Updating versions to 2.0.0-preview1 2017-04-03 22:31:17 -07:00
Pranav K ac176f8671 Revert package version changes
Fixes #1098
2017-04-03 15:46:46 -07:00
Pranav K 468c090272 Update vsix metadata 2017-03-31 14:37:50 -07:00
Ryan Brandenburg 9ffc745e76 Add Mvc.Razor.Extensions to VSIX 2017-03-24 11:45:04 -07:00