اشتراکها
اشتراکها
زندگی یک توسعه دهندهی PHP
اشتراکها
3.Visual Studio 2017 15.8 منتشر شد
These are the customer-reported issues addressed in 15.8.3:
- Visual Studio 2017 version 15.8.2 contained a pre-release build of .NET Core SDK 2.1.401 that is incompatible with Visual Studio. We have corrected this issue with Visual Studio 2017 version 15.8.3.
- VSCppUnit test case creation failure.
- Python IntelliSense not working on Python 2.7.
- XAML designer causing Visual Studio to close unexpectedly.
اشتراکها
استانداردهای کدنویسی #C
اشتراکها
NET Framework 4.7. منتشر شد
با تغییر کلاس سرویس AppConfigService به شکل زیر :
و تغییر ماژول CoreModule به شکل زیر :
با خطای زیر مواجه شدم لطفا راهنمایی بفرمائید :
import { HttpClient } from "@angular/common/http"; import { Injectable } from "@angular/core"; @Injectable() export class AppConfigService { private config: IAppConfig; constructor(private http: HttpClient) { } loadClientConfig(): Promise<any> { return this.http.get<IAppConfig>("assets/client-config.json") .toPromise() .then(config => { this.config = config; console.log("Config", this.config); }) .catch(err => { return Promise.reject(err); }); } get configuration(): IAppConfig { if (!this.config) { throw new Error("Attempted to access configuration property before configuration data was loaded."); } return this.config; } } export interface IAppConfig { apiEndpoint: string; loginPath: string; logoutPath: string; refreshTokenPath: string; accessTokenObjectKey: string; refreshTokenObjectKey: string; adminRoleName: string; }
و تغییر ماژول CoreModule به شکل زیر :
import { NgModule, Optional, SkipSelf, APP_INITIALIZER } from "@angular/core"; import { CommonModule } from "@angular/common"; import { RouterModule } from "@angular/router"; import { HTTP_INTERCEPTORS } from "@angular/common/http"; // import RxJs needed operators only once import "./services/rxjs-operators"; import { HeaderComponent } from "./component/header/header.component"; import { AuthGuard } from "./services/auth.guard"; import { AuthInterceptor } from "./services/auth.interceptor"; import { AuthService } from "./services/auth.service"; import { AppConfigService } from "./services/app-config.service"; import { BrowserStorageService } from "./services/browser-storage.service"; @NgModule({ imports: [CommonModule, RouterModule], exports: [ // components that are used in app.component.ts will be listed here. HeaderComponent ], declarations: [ // components that are used in app.component.ts will be listed here. HeaderComponent ], providers: [ // global singleton services of the whole app will be listed here. BrowserStorageService, AppConfigService, AuthService, AuthGuard, { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }, { provide: APP_INITIALIZER, useFactory: (config: AppConfigService) => () => config.loadClientConfig(), deps: [AppConfigService ], multi: true } ] }) export class CoreModule { constructor( @Optional() @SkipSelf() core: CoreModule) { if (core) { throw new Error("CoreModule should be imported ONLY in AppModule."); } } }
Error: Provider parse errors:
Cannot instantiate cyclic dependency! ApplicationRef ("[ERROR ->]"): in NgModule AppModule in ./AppModule@-1:-1
Cannot instantiate cyclic dependency! ApplicationRef ("[ERROR ->]"): in NgModule AppModule in ./AppModule@-1:-1
برای اجرا شدن دستور زیر:
حالا اگر cmd شما در همچین مسیری قرار دارد:
میتوانید دستوری که در متن مقاله ذکر شده را اجرا کنید (البته با اندکی تغییر):
فایل کامپایل شده e_sqlite3.o رو در پروژه خود کپی کنید و طبق مقاله پیش بروید و این فایل نیتو را به پروژه رفرنس بدهید.
در صورت مشاهده همچین هشداری و حل این مشکل (اضافه نشدن فایل نیتیو به برنامه) ابتدا
را به قسمت بالای فایل csproj خود و در قسمت
اضافه کنید و سپس دستور زیر را اجرا کنید:
* خط به خط کدهای زیر را، در cmd و پشت سر هم اجرا کنید
(نکته): باید پایتون را از قبل نصب داشته باشید (آموزش نصب پایتون)
# Get the emsdk repo git clone https://github.com/emscripten-core/emsdk.git # Enter that directory cd emsdk # Download and install the latest SDK tools. emsdk install latest # Make the "latest" SDK "active" for the current user. (writes .emscripten file) emsdk activate latest # Activate PATH and other environment variables in the current terminal emsdk_env.bat
C:\Users\{your pc name}\emsdk
emcc C:\Users\{your pc name}\sqlite\sqlite3.c -shared -o D:\e_sqlite3.o
اکنون اگر دستور dotnet bulid را در ترمینال بزنید، احتمالا با همچین هشداری مواجه خواهید شد:
warning : @(NativeFileReference) is not empty, but the native references won't be linked in, because neither $(WasmBuildNative), nor $(RunAOTCompilation) are 'true'. NativeFileReference=Data\e_sqlite3.o [D:\project\Yourproject\Yourproject.csproj] 1 Warning(s)
<RunAOTCompilation>true</RunAOTCompilation>
<PropertyGroup>
dotnet workload install wasm-tools
Top 3 Open Source ASP.NET Core based e-commerce web applications
nopCommerce
SimplCommerce
grandnode ( Powered By nopCommerce) :It’s an open source, free, cross-platform e-commerce software based on ASP.NET Core 2.2 and MongoDB — NoSQL database. You can run it on Linux, Windows, and MacOS easily. GrandNode also supports Docker, so you are able to install it just in seconds with Docker.