Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebAssembly build via Blazor/Razor backend, updated solution to net6.0, netstandard2.1 dual target #316

Merged
merged 80 commits into from
Nov 18, 2021
Merged
Show file tree
Hide file tree
Changes from 77 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
0b1c74e
Initial imp
wrestledBearOnce Jul 20, 2021
608eb1a
Linting
wrestledBearOnce Jul 20, 2021
0d199e6
Repaired Android build and build targets
wrestledBearOnce Jul 20, 2021
585ccd6
Merge remote-tracking branch 'origin/feture/clean_wasm_on_develop' in…
wrestledBearOnce Jul 20, 2021
6af8016
Towards deferred
wrestledBearOnce Jul 26, 2021
3fd5d25
Linting
wrestledBearOnce Jul 26, 2021
0ad0766
Merge remote-tracking branch 'origin/develop' into feature/clean_wasm…
wrestledBearOnce Aug 20, 2021
9deadca
Fixed errors and missing implementations after merge
wrestledBearOnce Aug 20, 2021
d021a0e
[BROKEN] SceneContainer waits for all textures, however no tex visible
wrestledBearOnce Aug 23, 2021
653fac0
Replaced C# SharpFont with Sixlabor Font
wrestledBearOnce Aug 24, 2021
10b85eb
Removed F ontImp Desktop debug code
wrestledBearOnce Aug 24, 2021
3825401
Replaced font and sytem.drawing with Sixlabor's implementation
wrestledBearOnce Aug 25, 2021
df1b160
Added automatic format guessing for Desktop.Imp, Fixed FontImp bugs,
wrestledBearOnce Aug 27, 2021
1781d89
Add Resize and Loading overlay
wrestledBearOnce Aug 31, 2021
e9bf5d1
Kinda BROKEN: SceneConv returns DefaultSurfFx for all mats, investiag…
wrestledBearOnce Oct 15, 2021
1ee33d8
Intermediate push, changed examples for wasm dev
wrestledBearOnce Nov 3, 2021
51515d2
Intermediate push, updated to 6.0 non-preview
wrestledBearOnce Nov 9, 2021
831b88e
First alpha of webplayer
wrestledBearOnce Nov 12, 2021
5117c0d
Merge remote-tracking branch 'origin/develop' into feature/clean_wasm…
wrestledBearOnce Nov 12, 2021
a43aa4e
Fix merge errors
wrestledBearOnce Nov 12, 2021
4b2194b
Linting
wrestledBearOnce Nov 12, 2021
7b339af
Blazor and Desktop just works
wrestledBearOnce Nov 12, 2021
f6a1507
Merge remote-tracking branch 'origin/feature/clean_wasm_on_develop' i…
wrestledBearOnce Nov 12, 2021
315a8bf
Linting
wrestledBearOnce Nov 12, 2021
3856d83
Cleanup, renamed wasm to blazor, updated build configurations
wrestledBearOnce Nov 12, 2021
7db0008
More cleanup, removed font dll
wrestledBearOnce Nov 12, 2021
04c388c
Missing comments, more cleanup
wrestledBearOnce Nov 12, 2021
98b3e0c
Healed a few more warnings
wrestledBearOnce Nov 12, 2021
f4d6b03
Linting
wrestledBearOnce Nov 12, 2021
4409aab
Fixed Blazor build, fixed glitch while using aliasing
wrestledBearOnce Nov 12, 2021
eaae58b
Fixed Player, TODO: Impl. Update
wrestledBearOnce Nov 12, 2021
d8ac4e3
Linting
wrestledBearOnce Nov 12, 2021
20c5773
Implemented first shot of independend update and render methods
wrestledBearOnce Nov 15, 2021
923afdc
Linting
wrestledBearOnce Nov 15, 2021
6e3dc15
Cleaned Simple example, fixed update with free running render loop no…
wrestledBearOnce Nov 15, 2021
1fdee32
Linting
wrestledBearOnce Nov 15, 2021
a5c7454
Fixed first batch of examples (Desktop)
wrestledBearOnce Nov 15, 2021
d455df6
Linting
wrestledBearOnce Nov 15, 2021
f9d203e
Fixed AdvancedUI and a bug within FontImp, non renderable chars crash…
wrestledBearOnce Nov 15, 2021
2c650d7
Intermediate
wrestledBearOnce Nov 15, 2021
0aadcb7
Fixed Deferred example, detected bug with net6.0 & imagesharp
wrestledBearOnce Nov 15, 2021
8390f69
Linting
wrestledBearOnce Nov 15, 2021
a2640d1
Added .NET 6 setup to CI
ASPePeX Nov 16, 2021
06865b1
Linting
ASPePeX Nov 16, 2021
401a105
"Fixed" file asset provider
wrestledBearOnce Nov 16, 2021
9a7bbb8
Linting
wrestledBearOnce Nov 16, 2021
f440b7c
Removed Blazor from Release-Desktop
ASPePeX Nov 16, 2021
7d6e7ff
moved pragma warning outside method
wrestledBearOnce Nov 16, 2021
fef5127
Update ci.yml
ASPePeX Nov 16, 2021
a019ac0
Added camera blazor example
wrestledBearOnce Nov 16, 2021
766b500
Builds on my machine (TM)
wrestledBearOnce Nov 16, 2021
53d2dff
Linting
wrestledBearOnce Nov 16, 2021
21bdae7
Disable everything Pointcloud for blazor and Android
wrestledBearOnce Nov 16, 2021
e979efa
This should fix the Android build
wrestledBearOnce Nov 16, 2021
566979f
Modified launchSettings
wrestledBearOnce Nov 16, 2021
6502399
.NET 5 for Android
ASPePeX Nov 16, 2021
0b20362
.NET 6 for Android
ASPePeX Nov 16, 2021
3e7d88b
Update ci.yml
ASPePeX Nov 16, 2021
60381d8
Update ci.yml
ASPePeX Nov 16, 2021
87a58eb
Added Picking.Blazor example
wrestledBearOnce Nov 16, 2021
7238cb7
Corrected compute fractal name
wrestledBearOnce Nov 16, 2021
3197d77
Linting
wrestledBearOnce Nov 16, 2021
49dd890
Merge remote-tracking branch 'origin/feature/clean_wasm_on_develop' i…
wrestledBearOnce Nov 16, 2021
a0bc103
Removed absolute paths in android.csproj files
wrestledBearOnce Nov 17, 2021
a946e58
Moved obsolete shader to own folder, replaced white space in shader s…
wrestledBearOnce Nov 17, 2021
d1926be
Linting
wrestledBearOnce Nov 17, 2021
f8e1cc3
Removed Blinn Shaders, fixed UI example
RedImp1470 Nov 17, 2021
da2bbe8
Merge remote-tracking branch 'origin/feature/clean_wasm_on_develop' i…
RedImp1470 Nov 17, 2021
3322fe0
Added publish profiles and fixed reference
ASPePeX Nov 17, 2021
b44aa37
Changed absolute paths
ASPePeX Nov 17, 2021
e574f20
Updated output paths
ASPePeX Nov 17, 2021
e08da4d
Update ci.yml
ASPePeX Nov 17, 2021
90da844
Changed sponza texture from pgn to tga
wrestledBearOnce Nov 17, 2021
c4f2b2b
Merge remote-tracking branch 'origin/feature/clean_wasm_on_develop' i…
wrestledBearOnce Nov 17, 2021
04bf08d
Linting
wrestledBearOnce Nov 17, 2021
a3a7e01
Update ci.yml
ASPePeX Nov 17, 2021
784ffaa
See if CI can publish AOT Release-Blazor
ASPePeX Nov 17, 2021
bf45091
Removed gui from deferred example
wrestledBearOnce Nov 17, 2021
9155c1b
Fixed picking example
RedImp1470 Nov 18, 2021
62e7061
Linting
RedImp1470 Nov 18, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
66 changes: 61 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ on:

jobs:
lint:
runs-on: windows-latest
runs-on: windows-2022
name: Linting
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
steps:
- uses: actions/checkout@v2
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: dotnet tool restore
run: dotnet tool restore
- name: dotnet format folder
Expand All @@ -44,11 +48,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ 'windows-latest', 'ubuntu-latest', 'macos-latest' ]
os: [ 'windows-2022', 'ubuntu-latest', 'macos-latest' ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: AssetStorage
run: dotnet test -c Release src/Tests/AssetStorage/Desktop/Fusee.Tests.AssetStorage.Desktop.csproj
- name: Math
Expand All @@ -73,11 +81,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ 'windows-latest', 'ubuntu-latest', 'macos-latest' ]
os: [ 'windows-2022', 'ubuntu-latest', 'macos-latest' ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Build Release-Desktop
run: dotnet build -c Release-Desktop Fusee.sln
- name: Upload Player-Artifact
Expand All @@ -96,16 +108,56 @@ jobs:
name: fusee-desktop-${{ matrix.os }}-examples
path: bin/Release/Examples/**/Desktop/

buildblazor:
needs: [tests]
name: Build Blazor
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
strategy:
fail-fast: false
matrix:
os: [ 'windows-2022', 'ubuntu-latest', 'macos-latest' ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Setup dotnet macos workload
run: dotnet workload install macos
- name: Build Release-Blazor
run: dotnet build -c Release-Blazor Fusee.sln
- name: Install wasm-tools workload
run: dotnet workload install wasm-tools
- name: Publish F.E.Player.Blazor
run: dotnet publish -c Release -p:PublishProfile=FolderProfileRelease src/Engine/Player/Blazor/Fusee.Engine.Player.Blazor.csproj
- name: Upload Player-Artifact
uses: actions/upload-artifact@v2
with:
name: fusee-blazor-${{ matrix.os }}-player
path: bin/Release/Player/Blazor/net6.0/publish/

buildandroid:
name: Build Android
needs: [tests]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
runs-on: windows-latest
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
with:
vs-version: '[17.0,]'
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1
- name: Build with MSBuild
Expand All @@ -117,14 +169,18 @@ jobs:
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
runs-on: windows-latest
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
language: [ 'csharp', 'python' ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion BuildNuget.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dotnet pack dis\DnTemplate\DnTemplate.csproj -c Release -o bin\Release\nuget
msbuild dis\VSTemplate\VSTemplate.sln -t:restore,build -p:Configuration=Release
copy /Y dis\VSTemplate\VSTemplate\bin\Release\ProjectTemplates\CSharp\1033\Fusee.Template.VS.zip bin\Release\nuget\ >nul
copy /Y dis\VSTemplate\VSIX\bin\Release\Fusee.Template.VS.vsix bin\Release\nuget\ >nul
tar -c -a -f bin\Release\nuget\io_export_fus.zip -C bin\Release\Tools\CmdLine\netcoreapp3.1\BlenderScripts\addons *
tar -c -a -f bin\Release\nuget\io_export_fus.zip -C bin\Release\Tools\CmdLine\net6.0\BlenderScripts\addons *
goto END

:ERRORDOTNET
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<RootNamespace>Fusee.Examples.AdvancedUI.Android</RootNamespace>
Expand Down
3 changes: 2 additions & 1 deletion Examples/Complete/AdvancedUI/Core/AdvancedUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public override void Init()

_gui = CreateGui();


// Create the interaction handler
_sih = new SceneInteractionHandler(_gui);

Expand Down Expand Up @@ -357,7 +358,7 @@ private SceneContainer CreateGui()
btnFuseeLogo.OnMouseDown += BtnLogoDown;

Texture guiFuseeLogo = new(AssetStorage.Get<ImageData>("FuseeText.png"));
TextureNode fuseeLogo = new(
TextureNode fuseeLogo = TextureNode.Create(
"fuseeLogo",
guiFuseeLogo,
GuiElementPosition.GetAnchors(AnchorPos.TopTopLeft),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.1;net5.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;net6.0</TargetFrameworks>
<OutputPath>$(BaseOutputPath)\Examples\AdvancedUI\Core\</OutputPath>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Examples/Complete/AdvancedUI/Core/UserInterfaceHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ internal static void CreateAndAddCircleAnnotationAndLine(SceneNode parentUiEleme

private static SceneNode CreateAnnotation(float2 pos, float borderScaleFactor, string text, Texture iconTex, Texture frameTex)
{
TextureNode icon = new(
TextureNode icon = TextureNode.Create(
"icon",
iconTex,
new MinMaxRect
Expand All @@ -131,7 +131,7 @@ private static SceneNode CreateAnnotation(float2 pos, float borderScaleFactor, s
float2.One
);

TextNode annotationText = new(
TextNode annotationText = TextNode.Create(
text,
"annotation text",
new MinMaxRect
Expand All @@ -145,7 +145,7 @@ private static SceneNode CreateAnnotation(float2 pos, float borderScaleFactor, s
HorizontalTextAlignment.Center,
VerticalTextAlignment.Center);

TextureNode annotation = new(
TextureNode annotation = TextureNode.Create(
"Annotation",
frameTex,
new MinMaxRect
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>

<OutputType>Exe</OutputType>
<OutputPath>$(BaseOutputPath)\Examples\AdvancedUI\Desktop\</OutputPath>
</PropertyGroup>
Expand Down
20 changes: 13 additions & 7 deletions Examples/Complete/AdvancedUI/Desktop/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Fusee.Serialization;
using System.IO;
using System.Reflection;
using System.Threading.Tasks;

namespace Fusee.Examples.AdvancedUI.Desktop
{
Expand All @@ -17,18 +18,19 @@ public static void Main()
// Inject Fusee.Engine.Base InjectMe dependencies
IO.IOImp = new IOImp();

FileAssetProvider fap = new("Assets");
var fap = new Fusee.Base.Imp.Desktop.FileAssetProvider("Assets");
fap.RegisterTypeHandler(
new AssetHandler
{
ReturnedType = typeof(Font),
DecoderAsync = async (string id, object storage) =>
{
if (!Path.GetExtension(id).Contains("ttf", System.StringComparison.OrdinalIgnoreCase)) return null;
return await Task.FromResult(new Font { _fontImp = new FontImp((Stream)storage) });
},
Decoder = (string id, object storage) =>
{
if (!Path.GetExtension(id).Contains("ttf", System.StringComparison.OrdinalIgnoreCase))
{
return null;
}

if (!Path.GetExtension(id).Contains("ttf", System.StringComparison.OrdinalIgnoreCase)) return null;
return new Font { _fontImp = new FontImp((Stream)storage) };
},
Checker = id => Path.GetExtension(id).Contains("ttf", System.StringComparison.OrdinalIgnoreCase)
Expand All @@ -37,12 +39,16 @@ public static void Main()
new AssetHandler
{
ReturnedType = typeof(SceneContainer),
DecoderAsync = async (string id, object storage) =>
{
if (!Path.GetExtension(id).Contains("fus", System.StringComparison.OrdinalIgnoreCase)) return null;
return await FusSceneConverter.ConvertFromAsync(ProtoBuf.Serializer.Deserialize<FusFile>((Stream)storage), id);
},
Decoder = (string id, object storage) =>
{
if (!Path.GetExtension(id).Contains("fus", System.StringComparison.OrdinalIgnoreCase)) return null;
return FusSceneConverter.ConvertFrom(ProtoBuf.Serializer.Deserialize<FusFile>((Stream)storage), id);
},

Checker = id => Path.GetExtension(id).Contains("fus", System.StringComparison.OrdinalIgnoreCase)
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<RootNamespace>Fusee.Examples.Bone.Android</RootNamespace>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.1;net5.0</TargetFrameworks>
<TargetFrameworks>netstandard2.1;net6.0</TargetFrameworks>
<OutputPath>$(BaseOutputPath)\Examples\Bone\Core\</OutputPath>
<TargetFramework>netstandard2.1</TargetFramework>
<OutputPath>$(BaseOutputPath)\Examples\BoneAnimation\Core\</OutputPath>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<OutputType>Exe</OutputType>
<OutputPath>$(BaseOutputPath)\Examples\BoneAnimation\Desktop\</OutputPath>
</PropertyGroup>
Expand Down
11 changes: 11 additions & 0 deletions Examples/Complete/BoneAnimation/Desktop/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Fusee.Serialization;
using System.IO;
using System.Reflection;
using System.Threading.Tasks;

namespace Fusee.Examples.BoneAnimation.Desktop
{
Expand All @@ -22,6 +23,11 @@ public static void Main()
new AssetHandler
{
ReturnedType = typeof(Font),
DecoderAsync = async (string id, object storage) =>
{
if (!Path.GetExtension(id).Contains("ttf", System.StringComparison.OrdinalIgnoreCase)) return null;
return await Task.FromResult(new Font { _fontImp = new FontImp((Stream)storage) });
},
Decoder = (string id, object storage) =>
{
if (!Path.GetExtension(id).Contains("ttf", System.StringComparison.OrdinalIgnoreCase)) return null;
Expand All @@ -33,6 +39,11 @@ public static void Main()
new AssetHandler
{
ReturnedType = typeof(SceneContainer),
DecoderAsync = async (string id, object storage) =>
{
if (!Path.GetExtension(id).Contains("fus", System.StringComparison.OrdinalIgnoreCase)) return null;
return await FusSceneConverter.ConvertFromAsync(ProtoBuf.Serializer.Deserialize<FusFile>((Stream)storage), id);
},
Decoder = (string id, object storage) =>
{
if (!Path.GetExtension(id).Contains("fus", System.StringComparison.OrdinalIgnoreCase)) return null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<RootNamespace>Fusee.Examples.Camera.Android</RootNamespace>
Expand Down
10 changes: 10 additions & 0 deletions Examples/Complete/Camera/Blazor/App.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Router AppAssembly="@typeof(Program).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<p>Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
<BlazorEnableCompression>false</BlazorEnableCompression>
<BlazorCacheBootResources>false</BlazorCacheBootResources>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
<Nullable>disable</Nullable>
<Platforms>AnyCPU</Platforms>
</PropertyGroup>

<PropertyGroup>
<OutputPath>$(BaseOutputPath)\Examples\Camera\Blazor\</OutputPath>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.JSInterop.WebAssembly" Version="6.0.0" />

</ItemGroup>

<ItemGroup>
<ProjectReference Include="$(FuseeEngineRoot)\src\Base\Imp\Blazor\Fusee.Base.Imp.Blazor.csproj" />
<ProjectReference Include="..\Core\Fusee.Examples.Camera.Core.csproj" />
</ItemGroup>

<ItemGroup>
<ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js" />
</ItemGroup>

<Target Name="MovingAssetsToServerRoot" BeforeTargets="PostBuildEvent">
<ItemGroup>
<AssetsDir Include="$(OutputPath)$(TargetFramework)\Assets\**\*.*" />
</ItemGroup>
<Message Text="Moving 'Assets' folder to http server root folder" Importance="high" />
<Move SourceFiles="@(AssetsDir)" DestinationFolder="$(OutputPath)$(TargetFramework)\wwwroot\Assets\%(RecursiveDir)" />
<RemoveDir Directories="$(OutputPath)$(TargetFramework)\Assets" />
</Target>

</Project>
Loading