msbuild

.Net微服务实践(四)[网关]:Ocelot限流熔断、缓存以及负载均衡

半城伤御伤魂 提交于 2020-04-13 13:46:36
【今日推荐】:为什么一到面试就懵逼!>>> 目录 限流 熔断 缓存 Header转化 HTTP方法转换 负载均衡 注入/重写中间件 后台管理 最后 在上篇 .Net微服务实践(三)[网关]:Ocelot配置路由和请求聚合 中我们介绍了Ocelot的配置,主要特性路由以及服务聚合。接下来,我们会介绍Ocelot的限流、熔断、缓存以及负载均衡。 限流 我们先来看限流的配置 Reroute节点中的配置如下: { "DownstreamPathTemplate": "/api/orders", "DownstreamScheme": "http", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 5001 } ], "UpstreamPathTemplate": "/api/orders", "UpstreamHttpMethod": [ "Get" ], "RateLimitOptions": { "ClientWhitelist": [], "EnableRateLimiting": true, "Period": "10m", "PeriodTimespan": 3, "Limit": 1 } } GlobalConfiguration中的配置如下: "GlobalConfiguration": {

Jenkins基础系统之完整的.net项目编译

廉价感情. 提交于 2020-04-12 11:10:47
一、目标 搭建jenkins服务器以及配置一台.net编译的slave客户端 完整跑通一个asp.net项目的发布 二、搭建jenkins环境 2.1 安装jenkins 1. 根据官网提示安装 进入jenkins官网下载==最新(如果不是最新的包,可能会存在推荐插件不能安装的现象)==的稳定包,我使用的是2.222版本 下载好war(推荐用war包,方便)包后,运行如下命令 java -jar jenkins.war --httpPort=9800 然后访问IP:9800进入jenkins的配置,第一次需要输入生成的密码,可以根据界面提示找到相关文件 插件安装完成后进入主管理界面 2. 处理插件源的问题 在安装jenkins提供的插件时,遇到了国内网络不稳定的问题,解决办法就是更换镜像源,网上好多都是推荐用[清华大学]的镜像,但[清华大学]的镜像服务器的update-center.json文件内部的包引用地址,还是指向的jenkins更新中心。所以需要搭建一个update-center.json提供服务器, 地址(这是我自己搭建,可供大家测试使用): http://jenkins.b-nature.cn:10026/jenkins/updates/update-center.json 换源方法如下: 进入插件管理->高级页,配置新源地址 更换启动命令 java -Dhudson

razor syntax with errors compiles when it should not compile

拥有回忆 提交于 2020-04-11 17:32:56
razor syntax with errors compiles when it should not compile This is by design. The build of of MVC views is disabled by default. You can enable the build of your MVC views in Visual Studio like that: Right click on your project in Visual Studio Unload project Edit project Change the value for MvcBuildViews from false to true <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> ... <MvcBuildViews>true</MvcBuildViews> ... Reload project Next time you compile and there are errors in your MVC views,

How do you get KUDU to use MSBuild 15

☆樱花仙子☆ 提交于 2020-04-11 08:45:30
问题 Microsoft.Net.Compilers is only supported on MSBuild v15.0 and above whatever the auto detect tooling is for KUDU, it always selects 14 is there a way for force it to select 15? 回答1: Add an app-setting for your Web App: MSBUILD_PATH with the value %MSBUILD_15_DIR%\msbuild.exe This will be picked up by the default deploy script. 回答2: The msbuild 15 is now available in Azure, however it's not default you need to add a custom deployment script to override Kudu's project detection logic . As

make an MSBuild Copy Task only copy if the source is newer regardless of size

醉酒当歌 提交于 2020-04-08 04:57:55
问题 I'm currently using an msbuild file to copy some files to the public documents folder when my EXE is compiled. My current script includes this: <Target Name="DeployToPublicDocuments" Inputs="@(DeploymentItems)" Outputs="$(PublicDocumentsFolder)%(Path)\%(DeploymentItems.RecursiveDir)%(DeploymentItems.Filename)%(DeploymentItems.Extension)"> <Copy SourceFiles="%(DeploymentItems.FullPath)" DestinationFiles="$(PublicDocumentsFolder)%(Path)\%(DeploymentItems.RecursiveDir)%(DeploymentItems.Filename)

make an MSBuild Copy Task only copy if the source is newer regardless of size

有些话、适合烂在心里 提交于 2020-04-08 04:56:24
问题 I'm currently using an msbuild file to copy some files to the public documents folder when my EXE is compiled. My current script includes this: <Target Name="DeployToPublicDocuments" Inputs="@(DeploymentItems)" Outputs="$(PublicDocumentsFolder)%(Path)\%(DeploymentItems.RecursiveDir)%(DeploymentItems.Filename)%(DeploymentItems.Extension)"> <Copy SourceFiles="%(DeploymentItems.FullPath)" DestinationFiles="$(PublicDocumentsFolder)%(Path)\%(DeploymentItems.RecursiveDir)%(DeploymentItems.Filename)

Why is C# CS0136 error not reported when compiled with /langversion:latest [duplicate]

拟墨画扇 提交于 2020-03-21 07:00:13
问题 This question already has an answer here : Lambda parameter name (sometimes) conflicting with local name (1 answer) Closed 11 days ago . The code below compiles fine in Debug but failed with a CS0136(A local or parameter named 'x' cannot be decaled..) error in Release. Anybody has any idea why the error is not reported in Debug build? public void test() { Action<int> a = x => x++; int x = 0; } Target framework 4.6.1 VS version: 16.4.3 and 16.4.5 MSBuildVersion: 16.4.0 MSBuildRuntimeVersion =

Web Application Build Error: The CodeDom provider type Microsoft.VisualC.CppCodeProvider could not be located

时光总嘲笑我的痴心妄想 提交于 2020-03-17 05:09:12
问题 I'm building/packing a web application in a build server, and it fails with the following message: ASPNETCOMPILER error ASPCONFIG: The CodeDom provider type "Microsoft.VisualC.CppCodeProvider, CppCodeProvider, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" could not be located. This is the build server environment: Windows Server 2008 R2 Standard TeamCity 8.0.4 .NET 4.5 Windows SDK for Windows 7 and .NET 4 Windows SDK for Windows 8 and .NET 4.5 Portable Class Library

Web Application Build Error: The CodeDom provider type Microsoft.VisualC.CppCodeProvider could not be located

折月煮酒 提交于 2020-03-17 05:08:30
问题 I'm building/packing a web application in a build server, and it fails with the following message: ASPNETCOMPILER error ASPCONFIG: The CodeDom provider type "Microsoft.VisualC.CppCodeProvider, CppCodeProvider, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" could not be located. This is the build server environment: Windows Server 2008 R2 Standard TeamCity 8.0.4 .NET 4.5 Windows SDK for Windows 7 and .NET 4 Windows SDK for Windows 8 and .NET 4.5 Portable Class Library

npm install -g 和npm install --save-dev的关系

感情迁移 提交于 2020-03-10 19:47:09
1. npm install 本地安装 (1)将安装包放在 ./node_modules 下(运行 npm 命令时所在的目录),如果没有 node_modules 目录,会在当前执行 npm 命令的目录下生成 node_modules 目录。 (2)可以通过 require() 来引入本地安装的包。 2. npm install -g 全局安装 (1) 将安装包放在 /usr/local 下或者你 node 的安装目录。 (2)可以直接在命令行里使用。 3. npm install --save (1)会把 msbuild 包安装到 node_modules 目录中 (2)会在 package.json 的 dependencies 属性下添加 msbuild (3)之后运行 npm install 命令时,会自动安装 msbuild 到 node_modules 目录中 (4)之后运行 npm install --production 或者注明 NODE_ENV 变量值为 production 时,会自动安装 msbuild 到 node_modules 目录中 4. npm install --save-dev (1)会把 msbuild 包安装到 node_modules 目录中 (2)会在 package.json 的 devDependencies 属性下添加