Commit Graph

110 Commits

Author SHA1 Message Date
Suchiman 5c13452d96 Add repository in nuspec files 2018-11-09 10:03:51 -08:00
Daniel Roth 04b87ef066 Update Microsoft.AspNetCore.Blazor.Templates.nuspec 2018-10-02 16:59:47 +01:00
Steve Sanderson 234f089a0a Always use forward-slashes in template primaryOutputs. Fixes #1497. 2018-10-01 13:17:11 +01:00
Ryan Nowak 959b45f4e6 Fix #1478 - Razor.Design not getting replaced in templates (#1479)
* Fix #1478 - Razor.Design not getting replaced in templates
2018-09-25 09:27:28 +01:00
Ryan Nowak 984fabb89f Correct template package reference 2018-09-24 10:42:59 -07:00
Steve Sanderson 0942b5aa0d Switch Hosted template to UseBlazor<Startup> for consistency with server-side template. Fixes #1473 2018-09-24 17:54:46 +01:00
Ryan Nowak 86b532cd47 Undo hardcoded Razor.Design in templates 2018-09-22 16:39:27 -07:00
Ryan Nowak 5459107832 Fix #1298 (#1309)
* Fix #1298

This change lifts our Razor dependencies to 2.1.1. This is needed
because by default ASP.NET Core projects will depend on 2.1.1 - which
results in a conflict trying to use the Blazor compiler. The Blazor
compiler will load the 2.1.0 msbuild tasks, which then break loading the
2.1.1 tasks.

Since this is happening in the MSBuild process, we can't really write
any code to sort this out. We have to make sure the versions match.

In general the guidance for ASP.NET Core is that projects will **compile
against** 2.1.1 so this won't be a problem in the future unless a user
project specifically lifts ASP.NET Core to a higher version. If that's
the case they will also have to live `Microsoft.AspNetCore.Razor.Design`
to match.
2018-09-21 13:29:40 -07:00
Andrii Kurdiumov 6546c55f4c Removal of global.json from the template
I remove only global.json from the template, and leave global.json in the repository root, since it is required for the build.
See #1324
2018-09-07 12:44:52 +01:00
Ryan Nowak 692bb0e261 Add privateassets=all to Blazor.Build usages
We recommend using this package with PrivateAssets=all everywhere to
make sure that the MSBuild files brought in by this package aren't
applied to transitively.

When that happens, the Blazor.Build MSBuild files will take over the
Razor functionality for other projects, which breaks MVC's view
compilation functionality.

This is part of a fix for #1216.
2018-08-22 08:21:46 -07:00
Nate McMaster 78045b2177 Automate authenticode code-signing using Roslyn sign tool
* Change project layout to prepare for upcoming Arcade changes
* Add signtool config file to configure OPC, NuGet, and Authenticode signing
* Fix a bug when BaseIntermediateOutputPath is set to an absolute path
2018-08-08 08:52:46 -07:00
Steve Sanderson 26aa6e838f Auto-remove the AspNetCorePackageVersion attribute from templates 2018-07-25 12:43:40 -07:00
Steve Sanderson a46dd91fd4 Fix server-side template custom restore sources condition 2018-07-25 11:24:07 -07:00
Steve Sanderson 0f8fdad593 Further 0.5.0 tweaks (#1191)
* Clarify debug instructions further

* Fix error message

* Add "using Microsoft.JSInterop" in templates

* Clarify template descriptions
2018-07-25 09:33:12 -07:00
Steve Sanderson b5ff6db1d4 Fixes for 0.5.0 (#1183)
* Fix macOS debug launch instructions

* Remove license headers from template files
2018-07-24 16:51:00 -07:00
Steve Sanderson 1236b77dfc Server template tweaks (#1181)
* Add server template projects to Blazor.sln

* Disable linking for server execution

* Minor tweaks to Startup.cs
2018-07-24 12:00:07 -07:00
Daniel Roth 79c60c91af Fixup default value for TemplateBlazorPackageVersion in server-side template 2018-07-23 23:26:20 -07:00
Daniel Roth 214598e579 Update survey link for 0.5.0 2018-07-23 22:11:00 -07:00
Ryan Nowak 65d9499e57 Template updates for 0.5 (#1177)
* Add startup pattern for client-side templates

* Add Server Side Blazor template

* minor feedback

* rename project
2018-07-23 21:54:50 -07:00
Steve Sanderson ad7e98be04 Make index.html static again (#1123)
* Add build command for generating the new boot JSON file

* Remove build command for generating index.html

* Update build targets to generate blazor.boot.json

* Change SPA fallback routing to look for index.html in regular wwwroot. Will need to update setup for published apps later.

* Stop autorebuild when index.html changes, since we no longer 'build' that file

* Update Boot.WebAssembly.ts logic to use boot JSON info on startup

* Restore support for loading CSS/JS from Blazor library projects

* Use new startup script tag in all samples and templates

* Fix MonoSanity sample - it must now be an exe because we use that as the trigger to generate the boot json (not the presence of index.html any more)

* Fix SPA fallback routing for published apps

Because in a previous commit, I changed it to look for index.html inside "wwwroot" instead of "dist" (because we no longer build it). But "wwwroot" doesn't exist for published apps, because static file servers wouldn't understand it.

* CR: Fix path normalization
2018-07-13 09:49:34 +01:00
Joseph Musser ed57767e6a Removed trailing space from template survey link (#1099) 2018-07-09 13:47:07 +01:00
Ryan Nowak 844e38e641 Update versions to 2.1
Updates ASP.NET package versions to 2.1

Tweaks TFMs
- libraries = netstandard2.0
- exes/apps/tools = netcoreapp2.1
- unit tests = netcoreapp2.0
- e2e tests = netcoreapp2.1 (dependency on apps)

The exception to this is the Browser.JS project which depends on our
tool for its build. however this project just builds the js code so its
TFM doesn't really matter.
2018-07-05 09:53:55 -07:00
Steve Sanderson 2f548f0b27 Update BlazorLibrary template to use newer interop APIs 2018-06-26 14:00:50 +01:00
Daniel Roth 5916d93118 Update survey links for 0.4.0 2018-06-01 09:17:12 -07:00
Ryan Nowak 5b40e3e121 Update versions to 2.1.0 (rtm) 2018-05-31 20:58:09 -07:00
Steve Sanderson 0e3b437dc1 Move <TemplateBlazorPackageVersion> prop to dependencies.props 2018-05-30 11:54:50 +01:00
Suchiman 0e5f9c2562 Use RestoreAdditionalProjectSources instead of RestoreSources
- The former is additive while the latter replaces the existing sources
2018-05-29 17:16:45 +01:00
Steve Sanderson 353da42cce Clean up use of relative URLs. Fixes #844 and #845 (#878)
* Handle links to empty-string href, resolved against base href

Needed to change the URLs used in E2E tests to be able to cover this (i.e., removed the /RouterTest prefixes so the default relative URL became an empty string)

* Change links in StandaloneApp sample to be relative

* Standardize on base URIs having trailing slash everywhere

Hence also change terminology from "base URI prefix" to simply "base URI"

* Handle link highlighting when visiting base-href-but-without-trailing-slash

* Removing leading slashes from base-relative URLs in templates
2018-05-24 09:54:43 +01:00
Steve Sanderson 9c567a0be4 Remove license notices from template output. Fixes #824 2018-05-23 11:12:48 +01:00
Ryan Nowak eeed731587 Update ASP.NET Core dependencies to RC 2018-05-22 11:10:15 -07:00
Steve Sanderson 866368192f Remove launchSettings.json from standalone template now we support
running on IISExpress by default

This reverts commit 84e6d259af314a9564521033d069dd30ac1fe8e8.
2018-05-22 13:02:59 +01:00
Steve Sanderson e33cb4a354 Simple autorebuild mechanism for hosted apps (#787)
* Simple autorebuild mechanism for hosted apps

* CR feedback: DI changes; use Directory.EnumerateFiles

* CR feedback: Ensure FileSystemWatcher isn't GCed
2018-05-22 13:02:36 +01:00
Steve Sanderson 37788f3c9d In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751)
* In Blazor cshtml files, auto-import Microsoft.AspNetCore.Blazor and Microsoft.AspNetCore.Blazor.Components. Fixes #749

* Remove redundant @using directives from tests

* Update assertion in test

* Update all affected baselines
2018-05-05 17:55:08 +01:00
Steve Sanderson 20e43adac5 camelCase all the JSONs (#746)
* Add camelCase utility

* Use camelCase when JSON-serializing (but not for dictionary keys)

* Make JSON deserialization treat member names case-insensitively (but retain case on dictionary keys)

* Use camelCase in JSON in the samples and templates

* Reverse the order of the params for the camelcase test because it's weird otherwise

* CR feedback
2018-05-04 16:14:38 +01:00
Steve Sanderson 27a676c4c7 Update TemplateBlazorPackageVersion in development 2018-05-04 09:13:18 +01:00
Steve Sanderson b4e70e72a0 Disable autorebuild in hosted projects due to VS 15.7pre5+ issue 2018-05-02 18:34:16 +01:00
Daniel Roth 6a4e5726ac Update survey link 2018-05-01 09:55:11 -07:00
Steve Sanderson 20a7fe7c2e Add isMultiProjectTemplate to hosted template vs-2017.3.host.json. Fixes #332 2018-05-01 17:49:57 +01:00
Steve Sanderson 18b9a70dbe Encourage encapsulation of component parameter properties (#713)
* Before refactoring ParameterCollection assignment logic, add more test coverage

* Begin caching parameter assignment info

* Factor out some reflection code to a reusable location

* Use IPropertySetter to avoid all per-property-assignment reflection

* More error cases and tests for parameter assignment

* Enable binding to nonpublic properties

* Add analyzer to warn and provide fix for public component parameters

* Unit test for analyzer

* Component tag helper now includes private properties if they have [Parameter]

* CR feedback: Remove garbage from csproj

* CR feedback: Rename .Build.Analyzers to .Analyzers

* CR feedback: Move BlazorApi.cs to shared; use it from Analyzers test

* Fix incorrect test name

* Make as many parameters private as possible. Replace ILayoutComponent with BlazorLayoutComponent.

* In component tag helper discovery, consider private members too

* Reduce the work in component parameter discovery by not inspecting the BlazorComponent base class (or System.Object)
2018-05-01 10:08:01 +01:00
Daniel Roth ec1b220b7d Fixup project templates to handle project names with dashes (#692)
Fixes #291
2018-04-30 21:27:22 -07:00
Ryan Nowak f661021324 Add [Parameter] for component parameters
This change introduces ParameterAttribute to specify a bindable
component parameter. As of the 0.3 release of Blazor we plan to make
[Parameter] required to make a property bindable by callers.

This also applies to parameters when their value is set by the
infrastructure, such as `Body` for layouts, and route paramters.

The rationale behind this change is that we think there is a need to
separate the definition of properties from their suitability for a
caller to set them through markup. We plan to introduce more features in
this area in the future such as marking parameters as required. This is
first step, and we think that this approach will scale nicely as we add
more functionaly.

The 0.3 release seems like the right time to change this behavior since
we're also introducing `ref` for captures in this release.
2018-04-30 13:35:08 -07:00
Emanuele Filardo 74b2b6b232 Set Program class as public in standalone project template 2018-04-26 23:25:13 +01:00
Ryan Nowak ed06d7b12e Rough cut at async events 2018-04-26 13:31:28 -07:00
Steve Sanderson c8cc0145e0 Make Razor.Design a transitive dependency
By making Razor.Design a transitive dependency of Blazor.Build we can
avoid the need for users to care which version of Razor we depend upon,
and take it out of the templates.
2018-04-25 15:46:48 -04:00
Steve Sanderson 6e85f4cb13 Replace 'nobr' with 'span.text-nowrap'. Fixes #652 2018-04-23 09:36:37 +01:00
Daniel Roth d0e09a066c Change blazorlib output type to Library 2018-04-19 16:06:32 -07:00
Steve Sanderson d02436d55c Bootstrap 4 and new styling (#619)
* Upgrade to bootstrap v4

Remove  redundant MIME type

* Add new styling to StandaloneApp

* Update THIRD-PARTY-NOTICES.txt

* Update version of Blazor used by templates when running from source

* Update styling on BlazorStandalone.CSharp template

* Tweak brace style

* Update styling in BlazorHosted.CSharp template

* Update E2E tests that rely on specific CSS

* Add Open Ionic fonts license to notices too
2018-04-19 21:06:28 +01:00
Steve Sanderson 6c5f2a2262 Fix for logic around whether to include custom restore sources in template output 2018-04-17 09:43:45 +01:00
Steve Sanderson 03b8f2c99f Update templates' global.json files to require SDK 2.1.300-preview2-008533 2018-04-16 10:03:19 +01:00
Steve Sanderson b4c023b053 Only remove templates' custom RestoreSources for final 'rtm' builds 2018-04-16 09:52:28 +01:00