yoDon / electron-dotnet

Boilerplate for Electron .NET apps (combining C# with Electron, Typescript, and React)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build error with current dotnet

estimpson opened this issue · comments

With .NET Core 3.x SDK and later, the output path has changed and requires modifying the package.json to get the api to compile into the correct folders. The change is quite simple:

-        "dotnet-build": "shx rm -rf dotnet/bin && dotnet publish dotnet/api.csproj -c release -r win10-x64 -o ../dotnet-win && dotnet publish dotnet/api.csproj -c release -r osx.10.11-x64 -o ../dotnet-osx && dotnet publish dotnet/api.csproj -c release -r ubuntu.16.10-x64 -o ../dotnet-ubuntu",
+        "dotnet-build": "shx rm -rf dotnet/bin && dotnet publish dotnet/api.csproj -c release -r win10-x64 -o ./dotnet-win && dotnet publish dotnet/api.csproj -c release -r osx.10.11-x64 -o ./dotnet-osx && dotnet publish dotnet/api.csproj -c release -r ubuntu.16.10-x64 -o ./dotnet-ubuntu",

Without the change, the output directory is one level higher than the root of the project. With the change, the output director is the root of the project, which is where electron-builder is expecting to find it.