kriasoft / aspnet-starter-kit

Cross-platform web development with Visual Studio Code, C#, F#, JavaScript, ASP.NET Core, EF Core, React (ReactJS), Redux, Babel. Single-page application boilerplate.
https://twitter.com/dotnetreact
MIT License
1.16k stars 203 forks source link

Building project in production #32

Open rafal-grycuk opened 7 years ago

rafal-grycuk commented 7 years ago

Hello, i have a problem with building application into the production. As far as i know, the output build should contain bundled css, js and html, which should be placed in the server. Unfortunately i cannot run build. Only the js files are created. When i run npm run build i obtain error. I restored the packages but not it take no effect. The same problem is in "clean" project. What seems to be the problem ? 2017_04_12_08_40_33_assets json_trading reactgrid_visual_studio_code

In addition there is no html generated. 2017_04_12_08_41_25_assets json_trading reactgrid_visual_studio_code

ashutosh1211 commented 7 years ago

Getting same error while building for production :( using node run build

FluffyBucket commented 7 years ago

Try replacing const args = ['publish', 'server', '-o', 'build', '-c', config, '-r', 'coreclr']; With const args = ['publish', 'server', '-o', '../build', '-c', config]; In build task in run.js. I got it working when replacing that, I am unsure however if you will still be using .net Core.

ashutosh1211 commented 7 years ago

or you can change the .cproj and add RuntimeIdentifier manually

image

FluffyBucket commented 7 years ago

Yes, but when I did that I didn't get a server.dll file that can run. Try running dotnet server.dll and see if you are able to run the dll without errors. And you will still need to change the 'build' argument to '../build' since it will otherwise create a tree of build folders.

ashutosh1211 commented 7 years ago

yes @FluffyBucket you are right. dotnet server.dll is not running.