Commit Graph

1584 Commits

Author SHA1 Message Date
N. Taylor Mullen 84bc74ea9f Move to RazorProjectFileSystem.
- Changed all existing APIs to utilize `RazorProjectFileSystem`. This was possible because `RazorProjectFileSystem` inherits from RazorProject.
- Renamed `FileSystemRazorProject` to `DefaultRazorProjectFileSystem`.
- Renamed FileSystemRazorProjectItem` to `DefaultRazorProjectItem`.
- Obsoleted `RazorProject.Create`

#1828
2018-02-09 11:49:31 -08:00
Nate McMaster 06c2f0cfd2 Merge branch 'release/2.1' into dev 2018-02-09 10:12:41 -08:00
Nate McMaster 1a77aecf68 Align NETStandard.Library version variable with Universe 2018-02-09 10:08:09 -08:00
Pranav K e537cdd319 Prepare for Razor Sdk to be imported by Web Sdk 2018-02-08 15:14:47 -08:00
N. Taylor Mullen 6c75f29419 Include VSIX symbols in build output.
#2037
2018-02-08 14:36:07 -08:00
Ajay Bhargav Baaskaran 8b78b4f421 Cleaned up logging in build server 2018-02-07 23:52:54 -08:00
Ajay Bhargav Baaskaran f991b9ae48 Better comment 2018-02-07 18:23:33 -08:00
Ryan Nowak 2ae925a0f2 Update SDK with tooling changes
These are some updates to the SDK based on the work going on in the
VS 15.7 branch. I porting the SDK changes here early for ease of
testing.
2018-02-06 18:21:33 -08:00
Ryan Nowak 6d757988c9 Integrate new Sdk
The project file change is a workaround for
https://github.com/Microsoft/msbuild/issues/2874
2018-02-06 15:41:31 -08:00
Ajay Bhargav Baaskaran 0a7edd665e Added another integration test 2018-02-06 14:33:47 -08:00
N. Taylor Mullen 7490b4413c Change GenerateMPACK ItemGroup names to be non-plural. 2018-02-06 12:13:17 -08:00
N. Taylor Mullen 83c31f611f Update GenerateMPACK to capture PDBs.
- VS Mac expects pdbs to sit side-by-side.

#1968
2018-02-06 12:13:17 -08:00
Ajay Bhargav Baaskaran ba7f955afa Split arguments for the build server properly 2018-02-06 11:32:48 -08:00
Pranav K 84beb5985f Add support for relative paths
* Move path munging in to Razor SDK
* Use AssignTargetPath to determine the target path for outputs and embedded resources

Fixes #1829
Fixes #1847
Fixes #1999
2018-02-05 14:19:52 -08:00
Ajay Bhargav Baaskaran 5a93f68ccc Pass through DebugTool to to debug build server creation 2018-02-05 14:10:32 -08:00
Pranav K 0df6bfb839 Change the casing of Sdk to match other Sdks 2018-02-05 11:20:18 -08:00
Ryan Nowak ff82e743ce Merge branch 'rel/vs15.7' into dev 2018-02-03 20:14:56 -08:00
Ryan Nowak 870f023aa9 Add prelimianry support for extensions to Razor (#2012)
* Add prelimianry support for extensions to Razor

This PR adds MSBuild insfrastructure to the SDK that can understand
concepts we need to expose to the project, code generator and runtime
like:
- Language version
- Configuration
- Extensions (plugins)

As an example of how this works, I've done the wireup for MVC. This will
now generate assembly attributes in your application that can act as a
source-of-truth for what should be included in runtime compilation, and
it's all based on the project-file. This means that it can be delivered
and configured by packages.

The next step here is to implement a loader for RazorProjectEngine based
on these primitives, and then use it in our CLI tools and MVC.

The next step after that is to expose it in VS and VS4Mac through the
project system.

(cherry picked from commit 5b28c06d64)
2018-02-03 20:13:24 -08:00
Ryan Nowak 5b28c06d64
Add prelimianry support for extensions to Razor (#2012)
* Add prelimianry support for extensions to Razor

This PR adds MSBuild insfrastructure to the SDK that can understand
concepts we need to expose to the project, code generator and runtime
like:
- Language version
- Configuration
- Extensions (plugins)

As an example of how this works, I've done the wireup for MVC. This will
now generate assembly attributes in your application that can act as a
source-of-truth for what should be included in runtime compilation, and
it's all based on the project-file. This means that it can be delivered
and configured by packages.

The next step here is to implement a loader for RazorProjectEngine based
on these primitives, and then use it in our CLI tools and MVC.

The next step after that is to expose it in VS and VS4Mac through the
project system.
2018-02-02 17:41:14 -08:00
Ryan Brandenburg 8c328edfb2 Skip flaky test 2018-02-02 16:23:38 -08:00
N. Taylor Mullen ca15840d05 Remove VisualStudioWorkspaceAccessor.Workspace.
- This property used to represent a "primary Workspace". Now that we're moving away from having a "primary Workspace" this needs to go away.

#2001
2018-02-02 15:35:07 -08:00
N. Taylor Mullen ea9a74ee3c Change RazorTextViewConnectionListener to not depend on a primary workspace.
- Updated the `DefaultRazorDocumentManager` to also not be a workspace service. It didn't end up having any workspace specific logic so it made sense to have the lifetime of the IDE.

#2010
2018-02-02 14:04:35 -08:00
Nate McMaster b760102148 Merge branch 'release/2.1' into dev 2018-02-02 13:55:28 -08:00
Pranav K 8461158306 Use consistent file casing for Razor Sdk 2018-02-02 13:42:14 -08:00
Ryan Nowak 07f3c5cb50 Merge branch 'rel/vs15.7' into dev 2018-02-02 13:17:27 -08:00
Ryan Nowak eb5abc6ac5 Add CPS dependencies
Getting this in to avoid pain when rebasing/merging.
2018-02-02 13:16:24 -08:00
Ryan Nowak addedca997 Merge branch 'rel/vs15.7' into dev 2018-02-02 13:15:48 -08:00
Pranav K 35779abd9a Rename Microsoft.AspNetCore.Razor.Sdk to Microsoft.NET.Sdk.Razor 2018-02-02 13:12:29 -08:00
N. Taylor Mullen 4eea2f6992 Change DefaultTagHelperFactsService to not expect a primary workspace.
- Removed `TagHelperFactsServiceInternal` since we had no way of retrieving the internal Workspace service given the exposed public API. Not to mention I think the `TagHelperFactsService` made more sense as a MEF service anyhow.
- Moved `TagHelperFactsServiceInternal` tests to `Microsoft.VisualStudio.Editor.Razor.Test` project and changed them to utilize the non-"internal" version.
- Updated completion service API to rely on non-`TagHelperFactsServiceInternal` pieces.

#2004
2018-02-02 12:02:45 -08:00
Nate McMaster d452ff44b3
Include portable symbols in nupkgs (#2009) 2018-02-02 11:14:25 -08:00
N. Taylor Mullen 64f9474eb1 Change RazorCodeDocumentProvider to not be per-workspace.
- Changed the `RazorCodeDocumentProvider` and its `TextBufferCodeDocumentProvider` dependency to be MEF services. This changes their lifetimes from per-workspace to per-IDE.
- Updated `RazorDirectiveCompletionProvider` to get the code document provider via MEF instead of the old primary workspace".
- Removed language service factory types.

#2007
2018-02-01 17:59:23 -08:00
N. Taylor Mullen fff1c01aa0 Add Mac implementation of VisualStudioWorkspaceAccessor new APIs.
- The Mac implementation does not have fallback logic like the windows variant because Workspaces in VS mac world are spun up / torn down regularly. We don't want to be tracking down bugs that involve us adding services or Razor logic to Workspaces that have nothing to do with Razor.
- Added a test for the `DefaultVisualStudioWorkspaceAccessor`. Could not add other tests due to limitations of MonoDevelop's abstractions.

#1989
2018-02-01 14:51:23 -08:00
N. Taylor Mullen 6d2460ae7f Update DefaultRazorEditorFactoryService to be per-workspace.
- Updated the a `VisualStudioWorkspaceAccessor` API in windows to enable the factory to retrieve a workspace given a text buffer.
- Added a way to add test services to `AdhocWorkspace` so we can test against services being retrieved from a `Workspace`. This will be much more common once we rely on services coming from `TextBuffer`s in our other tooling pieces.
- Added tests for the default workspace provider.

#1989
2018-02-01 14:51:23 -08:00
N. Taylor Mullen 5e454a36fa Change TextBufferProjectService to not be per-workspace.
- Updated impacted code to now expect this from MEF.

#1997
2018-02-01 14:51:23 -08:00
Ryan Nowak e3932aa1ec Merge remote-tracking branch 'origin/release/2.1' into dev 2018-02-01 13:36:07 -08:00
Ryan Nowak 818d4256aa Fix #1999
The fix for this for preview1 is to ignore any files with an absolute path. MvcPrecompilation
ignores files outside the project root, and we're aiming for parity.

This will have a proper fix in preview2
2018-02-01 13:05:45 -08:00
ASP.NET CI f3817ef738 Update dependencies.props
[auto-updated: dependencies]
2018-02-01 04:19:14 +00:00
Nate McMaster 8653225b0c Update dependencies.props to 2.1.0-preview-28193, build tools to 2.1.0-preview1-1010 [ci skip]
Scripted changes:
- updated travis and appveyor.yml files to only build dev, ci, and release branches
- updated dependencies.props
- updated korebuild-lock.txt
- updated korebuild.json to release/2.1 channel
2018-01-31 15:01:13 -08:00
Ajay Bhargav Baaskaran 4f5a5854b6 Skipping flaky tests on windows as well 2018-01-31 11:28:07 -08:00
N. Taylor Mullen 99010aaea4 Change EditorSettingsManager to not be per-workspace.
- Lifted `DefaultEditorSettingsManagerInternal`s state / event handling functionality into its `DefaultEditorSettingsManager`.
- Re-purposed `EditorSettingsManagerInternal` into a less-API heavy middleman `WorkspaceEditorSettings` for any workspace services concerned with editor settings to consume.
- Moved `DefaultEditorSettingsManagerInternal` into the Editor.Razor assembly and renamed it to `DefaultWorkspaceEditorSettings` since it needed the `EditorSettingsManager` API to function properly. The contract still exists at the `CodeAnalysis.Razor.Workspace` level.

#1982
2018-01-30 16:01:55 -08:00
Ajay Bhargav Baaskaran 9244383ec7 Modified integration test infrastructure to test build server 2018-01-30 15:55:17 -08:00
Ajay Bhargav Baaskaran b677a9e43f Skip only on non-windows 2018-01-29 18:56:18 -08:00
Ajay Bhargav Baaskaran 399216730a Temporarily skip tests 2018-01-29 18:27:45 -08:00
Pranav K 13388ca6ae Make testapps run without deployment 2018-01-29 18:12:35 -08:00
N. Taylor Mullen c0cb8f009c Update RazorProjectEngine to use RazorConfiguration.
- In this PR we do away with `CreateDesignTime` on the `RazorProjectEngine`. Instead we now have an overload that takes in a configuration and does the right thing.
- Updated `RazorProjectEngineBuilder` to have a configuration.
- Updated `RazorConfiguration` to only have a `Default`. Setting up a razor configuration for design time now requires calling code to construct the configuration manually.
2018-01-29 16:08:17 -08:00
N. Taylor Mullen 80f943caef Flow RazorLanguageVersion to RazorEngine.
- Restructured RazorLanguageVersion to be a sealed concrete type to enable things like `RazorLanguageVersion.Latest`; it also allows us to make broader changes in the future. Also, in the future if we want to add support for overriding operators to enable greater than comparisons we can as well.
- Removed version validity checks because we restrict who can construct a `RazorLanguageVersion` now. This way we don't have to check for valid versions all throughout our code.
- Added a simple `ProjectExtensibilityConfiguration` => `RazorLanguageVersion` method in the `DefaultProjectExtensibilityConfigurationFactory` to temporarily enable letting the system operate on the `RazorLanguageVersion`. Eventually that entire class will change.

#1961
2018-01-29 16:08:17 -08:00
Pranav K cf578e103b Merge remote-tracking branch 'origin/release/2.1' into dev 2018-01-29 11:17:55 -08:00
Pranav K 766862390b Print an error when Razor targets are invoked from a multitargeting build 2018-01-29 11:17:32 -08:00
Pranav K ee9f9225c3 Remove unused property 2018-01-29 07:45:46 -08:00
N. Taylor Mullen 84bc0fa4c9 Change ForegroundDispatcher to be a MEF service.
- The `ForegroundDispatcher` needed to be accessible by services without requiring a workspace; given that it doesn't have any ties to the `Workspace` other than being a service of one I was able to move it into a MEF service.
- Updated all workspace inclusions of the dispatcher to use importing constructors instead.
- Updated the Mac + Windows implementations to be exported as MEF pieces.

#1979
2018-01-26 17:14:40 -08:00