Commit Graph

1639 Commits

Author SHA1 Message Date
Pranav K 41c923926e Make RazorCompileOnBuild=true
Fixes #1986
2018-03-05 11:29:44 -08:00
ASP.NET CI 69a32c68e2 Update dependencies.props
[auto-updated: dependencies]
2018-03-04 12:26:25 -08:00
Pranav K c444f65c5d Import capabilities to support solution explorer nesting
Fixes #2047
2018-03-02 11:18:11 -08:00
Pranav K 29bd5f49dd Fix build break 2018-03-02 10:05:44 -08:00
Pranav K 5bd650bdd1 Pack should pack symbol nupkg
* Update path calculation for BuiltProjectOutputGroupOutput to include full path. This matches
  the behavior of Microsoft.Common.targets.
* Add Razor symbols to DebugSymbolsProjectOutputGroupOutput

Fixes #2116
2018-03-02 07:45:24 -08:00
Ajay Bhargav Baaskaran 0f1bc0e0bd Fix flaky dispatcher test 2018-03-01 14:29:25 -08:00
Ajay Bhargav Baaskaran a9dca60a10 Added support for AssemblyMetadata caching during build server TagHelper discovery 2018-03-01 13:08:56 -08:00
Ryan Nowak 00485d9f1b Fix #2099 - make AssemblyExtension public
This is needed when a runtime wants to construct its own configuration
manually, especially useful in tests.

(cherry picked from commit 92c511b2b4)
2018-03-01 11:05:35 -08:00
Ryan Nowak 3e0360a891 Fix #2041 - Add static constructor to DocumentWriter
The instance Create method was always supposed to be static.

(cherry picked from commit e05c2abd94)
2018-03-01 10:54:16 -08:00
Pranav K 62df770c39 PreserveCompilationContext needs to be set only if a project has any Razor files
Fixes #2077
2018-02-28 11:45:20 -08:00
Pranav K 251d57942b Clean up error message when Razor compiler is not referenced
Fixes #1974
2018-02-27 18:08:34 -08:00
Pranav K f51ddf68a6 Add RazorGenerate items to UpToDateCheckInput
Fixes #2048
2018-02-27 15:01:27 -08:00
Pranav K 2958a145e3 Revert "Revert "Update to the latest Sdk and cleanup projects""
This reverts commit fed0970b33.
2018-02-27 09:44:03 -08:00
Pranav K aa21a6be6e
Use File.Open overload that overwrites file entirely in DiscoverCommand (#2110)
* Use File.Open overload that overwrites file entirely in DiscoverCommand

Re-enable TagHelper discovery incrementalism test

Fixes #2104
2018-02-26 10:22:29 -08:00
N. Taylor Mullen b538ceba93 Change final code documents to not contain non-existent imports.
- Existent imports are imports that have content that contribute to the processing of a Razor document. Prior to this we had a legacy expectation that code documents had empty markers in them for all of their import locations. This proved troublesome when cross-referencing files that had file paths and were supposed to be existent but weren't in metadata. Now that we have a project engine with a de-coupled import feature we can rely on the import feature for finding all locations of important files and then strip out any non-existent items.
2018-02-23 16:30:22 -08:00
Ajay Bhargav Baaskaran 64c86634a8 Added a test to verify incremental TagHelper discovery 2018-02-22 17:15:58 -08:00
Pranav K 60e5818884 Use FeatureBranchVersionSuffix when generating VersionSuffix 2018-02-21 18:27:10 -08:00
Pranav K 540e8437da Enable PreserveCompilationContext by default 2018-02-21 11:59:23 -08:00
Pranav K 33e60ae363 Separate VS/DesignTime properties from general SDK properties
Fixes #2069
2018-02-21 11:55:36 -08:00
Pranav K 8938f6c8c2 Change the default extension for Razor views to .Views.dll 2018-02-21 11:48:31 -08:00
Pranav K fed0970b33 Revert "Update to the latest Sdk and cleanup projects"
This reverts commit 1c9088087b.
2018-02-21 11:26:04 -08:00
N. Taylor Mullen c5e83c61f8 Changed AddDefaultImports to take strings instead of project items.
- Strings here was important because any import added to the system dynamically needs to eventually make its way back to being a project item. With strings we can state that they do exist (have content) but do not have any file paths associated.
- Updated all call sites to use the new AddDefaultImports string based api.

#2080
2018-02-21 09:42:40 -08:00
Pranav K 1c9088087b Update to the latest Sdk and cleanup projects 2018-02-21 06:49:53 -08:00
Pranav K 9a9a2cf66a Make content files work better in class library projects referencing Razor Sdk
* Include cshtml files as content when referencing Razor Sdk
* Exclude cshtml files added by default from being packed

Fixes #1980
2018-02-20 14:15:19 -08:00
Ryan Nowak 43f8108ac3 Merge branch 'rel/vs15.7' into dev 2018-02-19 16:45:49 -08:00
Ryan Nowak 59a1cf9293 Add support for method parameters to Razor IR 2018-02-19 14:38:03 -08:00
Ryan Nowak c032988ddf Merge branch 'rel/vs15.7' into dev 2018-02-19 14:06:34 -08:00
Ryan Nowak fcf6ea03a9 Add IDE extensibility for project engine 2018-02-19 14:03:41 -08:00
Ryan Nowak b644ecfeaa Relayer interaction between extensions and engine 2018-02-19 14:00:31 -08:00
Ryan Nowak b2e89726a1 Merge branch 'rel/vs15.7' into dev 2018-02-19 10:50:41 -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
Ryan Nowak c1b96eaabc Update KoreBuild
This branch roughly tracks our preview2 stuff for now
2018-02-19 10:45:33 -08:00
ASP.NET CI 02a5b11725 Update dependencies.props
[auto-updated: dependencies]
2018-02-18 12:29:05 -08:00
Ryan Nowak 45148142ea Fix broken build 2018-02-16 09:43:33 -08:00
Rustam Agametov 9ec207399d bug fix: unused parameter in the constructor 2018-02-16 00:50:59 -08:00
Ajay Bhargav Baaskaran c293267421 Fixed unnecessary invocation of TagHelper target 2018-02-15 15:31:54 -08:00
Pranav K a13a0aa8c4
WebSdk transitions (#2078)
* WebSdk transitions

* Add a reference to Microsoft.Net.Sdk if it wasn't previously referenced
* Move PreserveCompilationContext in to our target
* Remove use of transition property
2018-02-15 15:09:05 -08:00
Pranav K 47e6d71215 test 2018-02-15 14:19:58 -08:00
Ryan Nowak 56ead8118a Decouple Razor tools from MVC
Adds a loader (with shadow copying in server mode) based on the Roslyn
Analyzer loader design.

Adds some targets to the Razor SDK that we can use to compute the
configuration and extensions.

Passes all of the metadata through to the command line tools so they can
deal with extensions.
2018-02-15 13:31:31 -08:00
Pranav K 16bcd8871e WebSdk transitions
* Add a reference to Microsoft.Net.Sdk if it wasn't previously referenced
* Move PreserveCompilationContext in to our target
* Remove use of transition property
2018-02-15 12:08:18 -08:00
N. Taylor Mullen e200b69511 Change IImportProjectFeature to consume RazorProjectItems.
- Updated all implementations of `IImportProjectFeature`; for MVC I went ahead and made a single project item that's always returned for MVC scenarios. That project item is smart about returning its content in a light-weight stream fashion.
- Had to add a `RazorProjectItem` => `RazorSourceDocument` conversion mechanic into `DefaultRazorProjectEngine`.
- Added tests for `DefaultRazorProjectItem.ConvertToSourceDocument`.
- Removed the `ProjectEngine` API from `VisualStudioRazorParser`. This was unrelated but was missed feedback.

#2068
2018-02-15 11:31:18 -08:00
Pranav K 501c180b5f Use properties in package props to redirect imports 2018-02-15 10:40:27 -08:00
Ryan Nowak e5eda0b276 Merge branch 'release/2.1' into dev 2018-02-14 12:59:19 -08:00
Ryan Nowak 02200d4c11 Integrate new WebSDK
One of these tests had to be updated and split into two because the
expectations of the test weren't totally right.

I also logged https://github.com/aspnet/Razor/issues/1986 during this,
we didn't consider the impact of putting this logic in the WebSDK on
class library.
2018-02-14 12:48:49 -08:00
Ryan Nowak 3e449ec3de Update KoreBuild and deps 2018-02-14 12:48:49 -08:00
N. Taylor Mullen 133eff3119 Move to RazorProjectEngine.
- Instead of using Razor/Mvc TemplateEngine use `RazorProjectEngine`. This involved changing several locations (each of which used `RazorTemplateEngine` in an entirely different way) to use the RazorProjectEngine's two Process methods.
- Changed an unused public API `VisualStudioRazorParser.TemplateEngine` to `VisualStudioRazorParser.RazorProjectEngine`.
- Ported the remainder of `RazorEngineBuilder`'s extension methods over to `RazorProjectEngineBuilder`. These were used in tests and our `RazorGenerate` tool.
- Added a few test helper methods/classes to enable simple testing of the `RazorProjectEngine`.
- Resolved several test hacks that were working around little discrepancies each of the `RazorTemplateEngine` APIs.
- Changed the template engine factory service to be a project engine factory service.
2018-02-14 12:40:23 -08:00
Ryan Nowak 0c6ec09958 Addressed Taylors feedback 2018-02-13 16:21:18 -08:00
Ryan Nowak 82579b6333 Get rid of RazorConfiguration.DesignTime
This change makes it so that we no longer create 'design time' engines.
The choice of design time or runtime is made when we initiate a code
generation operation.

Options instances are now created as part of the CodeDocument
initialization. Our existing code can still be created using a
RazorEngine so our passes that initialize the options still support the
old code path.
2018-02-13 16:21:18 -08:00
Pranav K 010b43cedf Make imports work without warnings or errors when the Sdk is referenced via MsBuild and package. 2018-02-13 13:45:42 -08:00
Pranav K 6be6229d18 Include the buildMultiTargeting folder in the Sdk package 2018-02-12 18:00:58 -08:00