Commit Graph

49 Commits

Author SHA1 Message Date
Pranav K fc3f45bf4e Add RazorLanguageVersion.3_0
Fixes https://github.com/aspnet/Razor/issues/2612
2018-11-13 13:36:20 -08:00
Pranav K 9d2c394b99 SDK does not correctly resolve RazorExtension when multiple instances of RazorConfiguration are present
Fixes https://github.com/aspnet/Razor/issues/2721
2018-11-09 11:51:38 -08:00
Pranav K 0bd6d135c1 Move targets, rzc and extension assembly in to the Sdk 2018-10-30 14:30:20 -07:00
Pranav K f70df60435 Move RazorGenerate and RazorTagHelper tasks in to the Sdk
Loading multiple versions of a task assembly result results in MSBuild on .NET Core to fail.
Addressing this by moving the tasks in to the Sdk and renaming it. This should avoid
immediate issues for a 2.1 and 2.2 project co-existing and future proofs 2.2 and later.

Fixes https://github.com/aspnet/Razor/issues/2553
2018-09-19 10:09:56 -07:00
Pranav K 754d7ba64e Pass versions using MSBuild template instead of importing dependencies.props 2018-06-05 11:33:46 -07:00
Ryan Brandenburg a42f9d28be Don't police netcoreapp version 2018-05-24 12:20:58 -07:00
Ajay Bhargav Baaskaran 4bad5adc24 Don't run build server when building testapps in-place 2018-05-23 18:04:10 -07:00
Ryan Nowak 9b911cbb6e Add some benchmarks for project system
Adds a few benchmarks for things we're working on, also addressed a few
small perf issues that have an impact for large documents.
2018-05-16 13:21:39 -07:00
Pranav K 0f2b315fe4 Fixup Razor Sdk tests to work on netcoreapp2.2 2018-05-08 15:22:54 -07:00
Ryan Brandenburg efaaec6546 Upgrade to netcoreapp22 2018-05-08 15:22:54 -07:00
Pranav K 1a2ca58eba
Merge pull request #2324 from aspnet/release/2.1
Merge release/2.1
2018-05-01 19:31:26 -07:00
Pranav K a94323499b Change CopyToPublishDirectory on Content items instead of explicitly removing this from publish items
Fixes #2295
2018-05-01 16:50:49 -07:00
Pranav K 05c84f008a Ensure Views dll are copied during P2P builds
FastUpToDateCheck in VS doesn't account for changes solely to .Views.dll. This causes referencing projects to be treated as
up to date even though a referenced project rebuilt. Touch the marker file to cause referenced projects to rebuild.

Fixes https://github.com/aspnet/Razor/issues/2306

to cause it to treat
2018-05-01 16:50:49 -07:00
Pranav K 8d99ba53ce Make incremental build in VS copy output files
Fixes #2306
2018-05-01 16:50:49 -07:00
Pranav K 1e2a1405e5
Update tests to target netcoreapp2.1 2018-04-25 10:27:07 -07:00
Pranav K a6a5e4ea10
Simplify building Microsoft.AspNetCore.Razor.Design 2018-04-25 10:27:07 -07:00
Pranav K 8d1de6ec80 Make sure RazorSdk works when BuildingInVisualStudio \ BuildProjectReferences is disabled
Fixes #2247
2018-04-13 14:35:04 -07:00
Ajay Bhargav Baaskaran 6d9df1ef33 Noop Razor Sdk for F# projects 2018-04-11 14:18:19 -07:00
Pranav K 8631f287d9 Add a few more Razor Sdk fixes
* UseSharedCompilation to determine the default value of UseRazorBuildServer
* Generate AssemblyDescriptionAttribute
2018-03-21 08:44:55 -07:00
Pranav K 483fba5972 Generate application part attributes
* Add support for generating attributes on Razor assembly
* Generate ProvideApplicationPartFactoryAttribute on Razor assembly
* Generate RelatedAssemblyAttribute on application assembly
2018-03-09 14:36:55 -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 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
Ajay Bhargav Baaskaran 64c86634a8 Added a test to verify incremental TagHelper discovery 2018-02-22 17:15:58 -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
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 45148142ea Fix broken build 2018-02-16 09:43:33 -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
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
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
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
Pranav K 0df6bfb839 Change the casing of Sdk to match other Sdks 2018-02-05 11:20:18 -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
Pranav K 35779abd9a Rename Microsoft.AspNetCore.Razor.Sdk to Microsoft.NET.Sdk.Razor 2018-02-02 13:12:29 -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
Pranav K 13388ca6ae Make testapps run without deployment 2018-01-29 18:12:35 -08:00
Ryan Nowak 233e67d0e0 Prepare for Web SDK changes
The Web SDK is going to set a new msbuild property to tell us that the
Razor SDK should be active. This hasn't been integrated into our build
system yet, so I'm temporarily hacking it until we get that change. At
that time I'll remove the special cases in these projects.
2018-01-18 19:23:34 -08:00
Ryan Nowak 6bab1c682d Fix a build break introduced by new SDK
This is failing on the CI due to an issue with a newer build of the SDK.
I opened https://github.com/dotnet/sdk/issues/1854 to track the SDK bug.

- update korebuild
- upgrade deps
- remove System.Diagnostics.DiagnosticSource from test projects
2018-01-12 14:22:00 -08:00
Ryan Nowak 5f501710aa Make Razor targets noop with no razor files 2018-01-11 13:59:25 -08:00
Ryan Nowak bb0aa9464a Add support and tests for Pack and P2P reference 2018-01-10 18:09:05 -08:00
Ryan Nowak 16324c3126 Add an Identifier by default
Using the MVC view engine convention for identifiers seems to make the
most sense, and we already use that convention for RazorProject so I
guess we're stuck with it.
2018-01-06 18:43:01 -08:00
Pranav K 3ae601e4df
Prevent type name collisions when file hierarchy + namespace is identical (#1881)
* Prevent type name collisions when file hierarchy + namespace is identical
2018-01-02 09:41:10 -08:00
Ryan Nowak 2c27272e4d Adding a basic test for RazorGenerate
Lotsa cleanup
2017-12-20 12:27:57 -08:00
Ryan Nowak a3fef5eeaa Adds support for Razor compilation at build-time
This PR adds two new tools as well as a tasks project. None of these
projects produce a package and they ship as part of
Microsoft.AspNetCore.Razor.Design. For now this is a 'fat' package that
contains all of the dependencies, but we plan to strip them out in the
future.

The support for compilation at build-time will start as **off** by
default. The immediate goal here is to get this to flow through the
build so that we can test it as part of the inner loop effort. We will
enable this feature by default once we've done more thorough testing.

Since this is mostly a code dump, I plan to address blocking and minor
feedback only. If there are design issues that are non-critical, I will
open follow up items.

The next step will be to start adding more detailed tests.
2017-12-18 13:01:14 -08:00
Ryan Nowak 1962989ffc Implement a .Design package and some testing for MSBuild
This is the first step in adding support for Razor compilation at build
time. Additional steps will complete this by adding tag helper
discovery, code generation and finally a call to CsC.

I want to get this in now to get the package into the build system and
to lay down the general infrastructure for testing.

---

The strategy for testing here is to use checked in projects that have
everything Razor needs to compile code. We already have shims for the
APIs Razor uses by default in this repo and I'm using them in the
project.

The test infrastructure creates a temporary directory, copies the
project, and fixes up a few small things to cooperate with outputs we've
already built so that the test can use the new versions of Razor bits
built from this repo.

We can then call various MSBuild targets and verify the files on disk. I
envision tests that verify incrementalism as well as the basic E2E.

We will test the E2E in general in other places, since it's part of the
new default experience. This repo will test things at a higher level of
detail, but in slightly artifical scenarios.
2017-12-13 15:06:10 -08:00