小编Rif*_*uza的帖子

错误TS1005:';' 预期.TypeScript Angular 6对于node_modules中的First Build错误rxjs

我正在构建我的第一个Angular应用程序.我正在使用此命令创建一个新的Angular应用程序ng new purchase-section.但是当我使用我执行应用程序时ng serve -o出现以下错误.

node_modules/rxjs/internal/types.d.ts中的错误(81,44):错误TS1005:';' 预期.node_modules/rxjs/internal/types.d.ts(81,74):错误TS1005:';' 预期.node_modules/rxjs/internal/types.d.ts(81,77):错误TS1109:预期的表达式.

我已经检查过,types.d.ts因为我知道它是由Angular创建的.我无法理解错误.请注意,我收到此错误后,我删除了node_modules,我安装使用npm install希望我离开了我仍然有这个错误.

这是我的package.JSON档案:

{
 "name": "purchase-section",
 "version": "0.0.0",
  "scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
 },
 "private": true,
   "dependencies": {
    "@angular/animations": "^6.0.3",
     "@angular/common": "^6.0.3",
     "@angular/compiler": "^6.0.3",
     "@angular/core": "^6.0.3",
     "@angular/forms": "^6.0.3",
      "@angular/http": "^6.0.3",
      "@angular/platform-browser": "^6.0.3",
      "@angular/platform-browser-dynamic": "^6.0.3",
      "@angular/router": "^6.0.3",
       "core-js": "^2.5.4",
       "rxjs": "^6.0.0",
        "zone.js": "^0.8.26"
       },
      "devDependencies": {
        "@angular-devkit/build-angular": …
Run Code Online (Sandbox Code Playgroud)

typescript angular

68
推荐指数
6
解决办法
4万
查看次数

错误 MSB3823:非字符串资源需要将属性GenerateResourceUsePreserializedResources 设置为 true

大家好,我遇到了一个错误,我正在尝试解决它,我找到了一些类似的来源,但无法解决我的问题。类似的问题就像这里

.csproj使用.bat文件编译我的项目文件,实际上它是.batch来自cmd. 但我收到了这个错误:

error MSB3823: Non-string resources require the property GenerateResourceUsePreserializedResources to be set to true. [C:\Users\rmrud\source\Workspaces\Workspace2\HAL9\v3_07\Test\Test\Test.csproj]

我也得到了这个:

error MSB3822: Non-string resources require the 
System.Resources.Extensions assembly at runtime, but it was not found in this project's references. [C:\Users\rmrud\source\Workspaces\Workspace2\HAL9\
v3_07\Test\Test\Test.csproj]
Run Code Online (Sandbox Code Playgroud)

我也在 cmd 中运行了这个choco install visualstudio2019-workload-netcoretools

我编辑了我的.csproj文件,在您的文件中添加了这些 xml 节点xxx.csproj

<PropertyGroup> 
    <GenerateResourceMSBuildArchitecture>
        CurrentArchitecture
    </GenerateResourceMSBuildArchitecture>
    <GenerateResourceMSBuildRuntime>
        CurrentRuntime
    </GenerateResourceMSBuildRuntime>
</PropertyGroup>
Run Code Online (Sandbox Code Playgroud)

然后我再次使用 cmd 中的 bat 文件进行编译,但仍然出现构建错误。如何克服这个问题提前致谢。请注意,在我的机器中,我使用的是 .NET Framework 版本 4.8 …

.net c# batch-file .net-core .net-5

14
推荐指数
2
解决办法
2万
查看次数

标签 统计

.net ×1

.net-5 ×1

.net-core ×1

angular ×1

batch-file ×1

c# ×1

typescript ×1