Base solution for your next web application

Activities of "ardrian"

Question

Hi,

I've successfully created an ASP.NET Core + Angular 2 project from the template builder at <a class="postlink" href="https://aspnetboilerplate.com/">https://aspnetboilerplate.com/</a>. I've successfully built a full project which runs fine on local host (both the Web API and the Angular front end). However I have come across deployment issues. So I've simplified my test here.

I've created a fresh project from the template generator at <a class="postlink" href="https://aspnetboilerplate.com/">https://aspnetboilerplate.com/</a>

If I unzip the given zip file, and then run the following commands in the angular directory:

npm install 
npm start

The server starts fine, and I can connect to <a class="postlink" href="http://localhost:4200">http://localhost:4200</a>

I then try a build, and it does not work

ng build

produces a valid output in the 'dist' directory however if I run

ng build --prod

. I receive the following error:

C:\dev\fac\Test2\angular>ng build --prod
Your global Angular CLI version (1.0.0) is greater than your local
version (1.0.0-rc.2). The local Angular CLI version is used.

To disable this warning use "ng set --global warnings.versionMismatch=false".
Hash: c84a5b8860d56f737e36
Time: 32247ms
chunk    {0} polyfills.0c7d2796d4a8fb89f144.bundle.js (polyfills) 157 kB {5} [initial] [rendered]
chunk    {1} scripts.a3a06162c794ae0baa0f.bundle.js (scripts) 678 kB {5} [initial] [rendered]
chunk    {2} styles.35fa8543aa31714441cb.bundle.css (styles) 440 bytes {5} [initial] [rendered]
chunk    {3} main.8bff35e768e0f94109c3.bundle.js (main) 4.68 kB {4} [initial] [rendered]
chunk    {4} vendor.736f99abce120fcce6fd.bundle.js (vendor) 1.64 MB [initial] [rendered]
chunk    {5} inline.ca4ef5f69789d84aed0a.bundle.js (inline) 0 bytes [entry] [rendered]

ERROR in Error encountered resolving symbol values statically. Reference to a non-exported function (position 21:10 in the original .ts file), resolving symbol accountModuleAnimation in C:/dev/fac/Test2/angular/src/shared/animations/routerTransition.ts, resolving symbol LoginComponent in C:/dev/fac/Test2/angular/src/account/login/login.component.ts, resolving symbol LoginComponent in C:/dev/fac/Test2/angular/src/account/login/login.component.ts

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/root.module.ngfactory' in 'C:\dev\fac\Test2\angular\src'
 @ ./src/main.ts 7:0-72
 @ multi ./src/main.ts

C:\dev\fac\Test2\angular>

It seems that the angular-cli build compiler isn't happy with the way the functions are exported in the src/shared/animations/routerTransition.ts file. I've tried various ways to change the function export, however with no luck so far.

I've been stuck on this problem for a while now, so any help would be really appreciated.

Answer

Would love to see your sample as well.

In the past I haven't had problems getting Hangfire to work in a non-ASP.NET Boilerplate solution (just a normal ASP.NET setup), however I haven't had any luck thusfar combining the two.

Using separate web-jobs and avoiding Hangfire has been the workaround so far.

Answer

Hey John,

If you could share any example code of your console app (with any proprietary code stripped out), that would be fantastic. I appreciate that you might not be able to do this, but if you could that would be great.

Just knowing that you have implemented this as a console which runs as an Azure Webjob is a great start, as that was the arrangement I had in mind.

Answer

This example is exactly what I was after. Thanks!

Answer

Ok it looks like I should follow this guide:

<a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Module-System">http://www.aspnetboilerplate.com/Pages/ ... ule-System</a>

In order to create a new module, which uses the ABP infrastructure. Is this the right thinking?

Answer

Hi,

What would be the best way of implementing an application which was used specifically to run background jobs, but also took advantage of the ABP framework. (i.e. DI, logging etc).

Ideally I would like to create a background job, which will be run as a separate application (not the main ASP.NET MVC application). When it starts, it will have access to the same DB through EF.

From your post above, I understand that I should only be using classes which inherit from the {SolutionName}DomainServiceBase class (defined in the Core layer), and not anything from the Application layer (inheriting from {SolutionName}AppServiceBaseclass)?

Should I be implementing a class in a new project which inherits from the AbpModule class? Thanks

Hi,

What is the best way to upgrade a project using ASP.NET Zero, when a new version is out.

I understand that it is impossible to provide a solution which supports auto-updating, as there may be breaking changes in new editions. But what would the best practice be.

For example right now I have a project using ASP.NET Zero 1.1.0, and 1.2.2 is out. What would a decent approach be?

Thanks

Showing 1 to 7 of 7 entries