Skip to content

Commit

Permalink
Update to preview2-final dependencies. Use project references everywh…
Browse files Browse the repository at this point in the history
…ere. Many other cleanups and updates.
  • Loading branch information
SteveSanderson committed Jul 14, 2017
1 parent e77120f commit 6507fe8
Show file tree
Hide file tree
Showing 32 changed files with 157 additions and 169 deletions.
25 changes: 4 additions & 21 deletions Blazor.sln → Blazor.Core.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.6
VisualStudioVersion = 15.0.26711.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{202CAAE3-4937-4BE3-96E8-C16BF9C216F6}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -25,12 +25,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DNA", "DNA", "{0FCBC715-108
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "corlib", "src\DNA\corlib\corlib.csproj", "{C8506C7D-2026-46A6-80CB-7AC11A19F053}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "template", "template", "{EAD66C22-40EE-43C6-B0C3-B1A6B13DD5A3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyApplication", "template\MyApplication\MyApplication.csproj", "{C2B140E5-384F-4304-8870-0E3D4682A846}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blazor.VSExtension", "src\Blazor.VSExtension\Blazor.VSExtension.csproj", "{315CDAF0-09E2-46B6-BF9A-600E9E987F05}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{B5DFF11D-B4B8-4727-90C8-66F5B6C9574B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ClientServerApp", "ClientServerApp", "{D3E21340-9A52-4849-915D-3E04891C3C53}"
Expand Down Expand Up @@ -78,18 +72,6 @@ Global
{C8506C7D-2026-46A6-80CB-7AC11A19F053}.LocalTest|Any CPU.Build.0 = Release|Any CPU
{C8506C7D-2026-46A6-80CB-7AC11A19F053}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C8506C7D-2026-46A6-80CB-7AC11A19F053}.Release|Any CPU.Build.0 = Release|Any CPU
{C2B140E5-384F-4304-8870-0E3D4682A846}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C2B140E5-384F-4304-8870-0E3D4682A846}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C2B140E5-384F-4304-8870-0E3D4682A846}.LocalTest|Any CPU.ActiveCfg = Debug|Any CPU
{C2B140E5-384F-4304-8870-0E3D4682A846}.LocalTest|Any CPU.Build.0 = Debug|Any CPU
{C2B140E5-384F-4304-8870-0E3D4682A846}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C2B140E5-384F-4304-8870-0E3D4682A846}.Release|Any CPU.Build.0 = Release|Any CPU
{315CDAF0-09E2-46B6-BF9A-600E9E987F05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{315CDAF0-09E2-46B6-BF9A-600E9E987F05}.Debug|Any CPU.Build.0 = Debug|Any CPU
{315CDAF0-09E2-46B6-BF9A-600E9E987F05}.LocalTest|Any CPU.ActiveCfg = Release|Any CPU
{315CDAF0-09E2-46B6-BF9A-600E9E987F05}.LocalTest|Any CPU.Build.0 = Release|Any CPU
{315CDAF0-09E2-46B6-BF9A-600E9E987F05}.Release|Any CPU.ActiveCfg = Release|Any CPU
{315CDAF0-09E2-46B6-BF9A-600E9E987F05}.Release|Any CPU.Build.0 = Release|Any CPU
{110A0EC6-44C1-4C73-BE9C-E2E7EDE6611A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{110A0EC6-44C1-4C73-BE9C-E2E7EDE6611A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{110A0EC6-44C1-4C73-BE9C-E2E7EDE6611A}.LocalTest|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -119,11 +101,12 @@ Global
{7BACABC2-CDF1-4ACA-8C6F-2A94A8E61DC0} = {2FB55188-2625-4A89-8642-83C18FA2A362}
{0FCBC715-108E-49BA-A5C6-CF21D22874B1} = {2FB55188-2625-4A89-8642-83C18FA2A362}
{C8506C7D-2026-46A6-80CB-7AC11A19F053} = {0FCBC715-108E-49BA-A5C6-CF21D22874B1}
{C2B140E5-384F-4304-8870-0E3D4682A846} = {EAD66C22-40EE-43C6-B0C3-B1A6B13DD5A3}
{315CDAF0-09E2-46B6-BF9A-600E9E987F05} = {2FB55188-2625-4A89-8642-83C18FA2A362}
{D3E21340-9A52-4849-915D-3E04891C3C53} = {B5DFF11D-B4B8-4727-90C8-66F5B6C9574B}
{110A0EC6-44C1-4C73-BE9C-E2E7EDE6611A} = {D3E21340-9A52-4849-915D-3E04891C3C53}
{DA6D77C9-F101-45C0-A4CD-634F87D3A1DF} = {D3E21340-9A52-4849-915D-3E04891C3C53}
{AAC0A945-F535-4716-AB73-4D193FA08844} = {D3E21340-9A52-4849-915D-3E04891C3C53}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {70729D6F-492C-4E7C-8C0F-D3D0EA7544AB}
EndGlobalSection
EndGlobal
36 changes: 36 additions & 0 deletions Blazor.ProjectTemplate.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26711.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blazor.VSExtension", "template\Blazor.VSExtension\Blazor.VSExtension.csproj", "{315CDAF0-09E2-46B6-BF9A-600E9E987F05}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyApplication", "template\MyApplication\MyApplication.csproj", "{49C6A338-C946-42D1-A2C7-A1436679313E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{B84AADE3-D82B-4E03-9C39-6D882E59D69D}"
ProjectSection(SolutionItems) = preProject
build-vsextension.cmd = build-vsextension.cmd
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{315CDAF0-09E2-46B6-BF9A-600E9E987F05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{315CDAF0-09E2-46B6-BF9A-600E9E987F05}.Debug|Any CPU.Build.0 = Debug|Any CPU
{315CDAF0-09E2-46B6-BF9A-600E9E987F05}.Release|Any CPU.ActiveCfg = Release|Any CPU
{315CDAF0-09E2-46B6-BF9A-600E9E987F05}.Release|Any CPU.Build.0 = Release|Any CPU
{49C6A338-C946-42D1-A2C7-A1436679313E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{49C6A338-C946-42D1-A2C7-A1436679313E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{49C6A338-C946-42D1-A2C7-A1436679313E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{49C6A338-C946-42D1-A2C7-A1436679313E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {58DF0713-610A-47A0-951A-C8D9C24722A8}
EndGlobalSection
EndGlobal
2 changes: 0 additions & 2 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
<packageSources>
<clear />
<add key="SolutionArtifacts" value="artifacts" />
<add key="AspNetCore" value="https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json" />
<add key="AspNetCoreTools" value="https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json" />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The programming model will be familiar to anyone who's worked with Razor (the C#

## Getting started

**VS2017 users**: Install [the VS extension](https://github.com/SteveSanderson/Blazor/releases/download/v0.2.0/Blazor.VSExtension.vsix), then use *File->New project*, and choose *Blazor Application* from the *Web* category.
**VS2017 users**: Install [the VS extension](https://github.com/SteveSanderson/Blazor/releases/download/v0.2.1/Blazor.VSExtension.vsix), then use *File->New project*, and choose *Blazor Application* from the *Web* category.

To start the application in VS, just press F5 or Ctrl+F5 as usual.

Expand Down
47 changes: 10 additions & 37 deletions build-packages.cmd
Original file line number Diff line number Diff line change
@@ -1,39 +1,12 @@
@echo off

@rem -- Restoring/building corlib first because of this issue: https://github.com/Microsoft/msbuild/issues/2065
@rem --
@rem -- Other projects have to be built in a specific order, because they mostly consume each other via package
@rem -- references rather than project references. This is necessary because regular project references aren't
@rem -- included transitively for things shipped as packages (i.e., it's not clear what the .NET Core MSBuild
@rem -- equivalent to IncludeReferencedProjects is), and also because the template app can only obtain the
@rem -- dotnet custom tool and MSBuild targets by consuming the framework projects as actual packages.
@rem --
@rem -- Unfortunately this also means that whenever you edit and rebuild a framework project, you have to manually
@rem -- "dotnet restore" in any other projects that consume it.
for %%s in (
"src\DNA\corlib"
"src\AngleSharp"
"src\Blazor.Runtime"
"src\Blazor.Compiler"
"src\Blazor.Host"
"template\MyApplication"
"samples\ClientServerApp\ClientServerApp.Shared"
"samples\ClientServerApp\ClientServerApp.Client"
"samples\ClientServerApp\ClientServerApp.Server"
) do (
dotnet restore %%s
if ERRORLEVEL 1 goto :fail

dotnet build %%s
if ERRORLEVEL 1 goto :fail
)

:done
@echo ---
@echo Build succeeded
@exit /b 0

:fail
@echo ---
@echo Build failed
@exit /b %ERRORLEVEL%
setlocal
for /f %%a in ('wmic os get LocalDateTime ^| findstr \.') do set tmp=%%a
set timestamp=%tmp:~0,14%
endlocal & set versionsuffix=t-%timestamp%

echo Building packages with version suffix %versionsuffix%...
dotnet build --no-restore ^
src\Blazor.Host\Blazor.Host.csproj ^
/property:GeneratePackageOnBuild=true ^
/property:VersionSuffix=%versionsuffix%
6 changes: 3 additions & 3 deletions build-vsextension.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ rem It's important to clean the template dir first, otherwise we'll include thin
git clean -xdf .\template

rem Restore NuGet packages for SideWaffle so it can build the template
build\nuget.exe restore src\Blazor.VSExtension\ -SolutionDirectory .
build\nuget.exe restore template\Blazor.VSExtension\ -SolutionDirectory .

rem Replace launchSettings.json (which VS keeps editing) with sw-launchSettings.json (which remains clean)
rem Note that file whose name starts "sw-" are automatically omitted from the project template
copy /y .\template\MyApplication\Properties\sw-launchSettings.json .\template\MyApplication\Properties\launchSettings.json

rem Actually build the VSIX
SET msbuildExePath="C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe"
%msbuildExePath% src\Blazor.VSExtension\Blazor.VSExtension.csproj
SET msbuildExePath="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe"
%msbuildExePath% template\Blazor.VSExtension\Blazor.VSExtension.csproj

rem Move launchSettings.json back to clean state
git checkout .\template\MyApplication\Properties\launchSettings.json
5 changes: 0 additions & 5 deletions global.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
<TargetFramework>netcoreapp1.0</TargetFramework>
<OutputType>exe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Blazor.Runtime" Version="0.2.1-*" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ClientServerApp.Shared\ClientServerApp.Shared.csproj" />
<ProjectReference Include="..\..\..\src\Blazor.Runtime\Blazor.Runtime.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>

<PropertyGroup>
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Razor" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.ResponseCompression" Version="1.0.1" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" />
<PackageReference Include="Blazor.Host" Version="0.2.1-*" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.0.0-preview2-final" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.0.0-preview2-final" />
<PackageReference Include="Microsoft.AspNetCore.Razor" Version="2.0.0-preview2-final" />
<PackageReference Include="Microsoft.AspNetCore.ResponseCompression" Version="2.0.0-preview2-final" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.0.0-preview2-final" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.0.0-preview2-final" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Blazor.Host\Blazor.Host.csproj" />
<ProjectReference Include="..\ClientServerApp.Client\ClientServerApp.Client.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
Expand Down
2 changes: 0 additions & 2 deletions src/AngleSharp/AngleSharp.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
<RootNamespace>AngleSharp</RootNamespace>
<AssemblyName>AngleSharp</AssemblyName>
<TargetFramework>netstandard1.3</TargetFramework>

<AssemblyName>Blazor.AngleSharp</AssemblyName>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageOutputPath>$(MSBuildThisFileDirectory)../../artifacts/</PackageOutputPath>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
15 changes: 5 additions & 10 deletions src/Blazor.Compiler/Blazor.Compiler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,17 @@
<OutputType>exe</OutputType>
<TargetFramework>netcoreapp1.0</TargetFramework>
<PreserveCompilationContext>true</PreserveCompilationContext>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageOutputPath>$(MSBuildThisFileDirectory)../../artifacts/</PackageOutputPath>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="../AngleSharp/AngleSharp.Core.csproj" />
<ProjectReference Include="../Blazor.Runtime/Blazor.Runtime.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Razor" Version="2.0.0-preview1-final" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Language" Version="2.0.0-preview1-final" />
<PackageReference Include="Microsoft.AspNetCore.Razor" Version="2.0.0-preview2-final" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Language" Version="2.0.0-preview2-final" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.1.0" />
<PackageReference Include="Blazor.Runtime" Version="0.2.1-*" />
<PackageReference Include="Blazor.AngleSharp" Version="0.2.1-*" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />

<ProjectReference Include="../AngleSharp/AngleSharp.Core.csproj" />
<ProjectReference Include="../Blazor.Runtime/Blazor.Runtime.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
7 changes: 3 additions & 4 deletions src/Blazor.Compiler/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Program

static int Main(string[] args)
{
if (args.Length < 4)
if (args.Length < 3)
{
ShowUsage();
return 1;
Expand All @@ -29,9 +29,8 @@ static int Main(string[] args)
return 1;
}

var applicationAssembly = args[2];
var outputFilename = args[3];
RazorVDomCompiler.CompileToFile(EnableLogging, rootDir, new[] { applicationAssembly }, outputFilename);
var referenceAssemblies = args.Skip(2).ToArray();
RazorVDomCompiler.CompileToFile(EnableLogging, rootDir, referenceAssemblies, "testviews.dll");
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Blazor.Compiler/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"profiles": {
"RazorRenderer": {
"commandName": "Project",
"commandLineArgs": "..\\..\\template\\MyApplication\\ MyApp.MyNamespace ..\\..\\template\\MyApplication\\bin\\Debug\\netcoreapp1.0\\MyApplication.dll testviews.dll"
"commandLineArgs": "..\\..\\samples\\ClientServerApp\\ClientServerApp.Client\\ ClientServerApp.Client ..\\..\\samples\\ClientServerApp\\ClientServerApp.Client\\bin\\Debug\\netcoreapp1.0\\ClientServerApp.Client.dll ..\\..\\samples\\ClientServerApp\\ClientServerApp.Client\\bin\\Debug\\netcoreapp1.0\\ClientServerApp.Shared.dll"
}
}
}
1 change: 1 addition & 0 deletions src/Blazor.Compiler/RazorVDomCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ static void CompileToFile(IList<SyntaxTree> syntaxTrees, IList<MetadataReference
{
AssemblyLocation("mscorlib"),
AssemblyLocation(typeof(object)), // CoreLib
AssemblyLocation("System.Console"),
AssemblyLocation("System.Collections"),
AssemblyLocation("System.Linq"),
AssemblyLocation("System.Runtime"),
Expand Down
Loading

0 comments on commit 6507fe8

Please sign in to comment.