已尝试升级到visual studio 2017 v 15.6.0的专业版(预览7.0)
并安装了aspnetcore-runtime-2.1.0-preview1-final-win-x64和.net core SDK 2.1.4.
当我创建一个新的Web应用程序时,我收到一个错误说
"目前的.NET SDK不支持.NET Core 2.1.目标是.NET Core 2.0或更低版本,或者使用支持.NET Core 2.1的.NET SDK版本."
当我尝试构建现有项目时,我收到错误
"目前的.NET SDK不支持.NET Core 2.1.目标是.NET Core 2.0或更低版本,或者使用支持.NET Core 2.1的.NET SDK版本."
我在目标框架中没有看到".net core 2.1"
我的计算机中没有global.json文件
当我尝试dotnet --info时,我明白了
c:\ source\dnacloud\testapp> dotnet --info .NET命令行工具(2.1.100)
Run Code Online (Sandbox Code Playgroud)Product Information: Version: 2.1.100 Commit SHA-1 hash: b9e74c6 Runtime Environment: OS Name: Windows OS Version: 10.0.16299 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.1.100\ Microsoft .NET Core Shared Framework Host Version : 2.0.5 Build : 17373eb129b3b05aa18ece963f8795d65ef8ea54
错误信息是 html-webpack-plugin 错误
仅在捆绑生产时才会出现此错误
当@ngtools/webpack 被 angular-router-loader、angular2-template-loader 和 awesome-typescript-loader 替换时,应用程序会正确捆绑
Angular 8,webpack 4,html-webpack-plugin 3.2.0,打字稿:3.7.5
const path = require("path")
const webpack = require("webpack")
const HtmlWebpackPlugin = require("html-webpack-plugin")
const MiniCssExtractPlugin = require("mini-css-extract-plugin")
const OptimizeCssAssetsPlugin = require("optimize-css-assets-webpack-plugin")
const UglifyJSPlugin = require("uglifyjs-webpack-plugin")
const CompressionPlugin = require("compression-webpack-plugin")
const BrotliPlugin = require("brotli-webpack-plugin")
const AngularCompilerPlugin = require("@ngtools/webpack").AngularCompilerPlugin
const { CleanWebpackPlugin } = require("clean-webpack-plugin")
const isProd = process.env.NODE_ENV === "production"
module.exports = {
entry: {
polyfills: './src/polyfills',
vendor: './src/vendor',
main: ["./src/main.prod"]
},
resolve: {
extensions: [".js", …
Run Code Online (Sandbox Code Playgroud)