在codeDOM提供者类型"微软codeDom.Providers.DotNetCompilerPlatform.CSharp codeProvider"无法找到 [英] The CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider" could not be located

查看:4417
本文介绍了在codeDOM提供者类型"微软codeDom.Providers.DotNetCompilerPlatform.CSharp codeProvider"无法找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是使用VS2015一个项目的WebAPI

It's a WebApi project using VS2015.

步骤重现:


  1. 创建一个空的WebAPI项目

  2. 更改建立从斌\\输出路径为斌\\调试\\

  3. 运行

在这里输入的形象描述

直到我改变了从斌\\生成输出路径本\\调试\\一切都可以正常使用
事实上,除了本\\以外的任何输出路径将无法正常工作。

Everything is working perfectly until I changed Build Output path from "bin\" to "bin\Debug\" In fact, any Output path other than "bin\" won't work.

一个小额外的事情是,当我离开的bin \\构建具有随时随地另一个输出路径将只要工作。

One little additional thing is that, having another output path to anywhere would work as long as I left a build in "bin\".

请帮忙提供解决方案来解决这个问题。
我想这会实际部署成本的问题。

Please help providing solution to solve this. I guess that'll cost problem on actual deployment.

推荐答案

得到了同样的问题,显然是.NET编译器没有被加载到GAC。我做了什么来解决它:
首先,在包管理器控制台类型:

got the same problem, apparently the .net compiler was not loaded to GAC. what i did to solve it was: first, in package manager console type:

PM> Install-Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform

现在,从某种原因在Microsoft尼斯先生已决定不将其安装到GAC我们。您可以通过开扩开发商命令提示符,然后输入手工进行:

now, from some reason the nice gentlemen in Microsoft has decided not to install it to the GAC for us. you can do it manually by openning Developer Command Prompt and typing:

gacutil -i "C:\*PATH TO YOUR APP CODE*\bin\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll"

这篇关于在codeDOM提供者类型"微软codeDom.Providers.DotNetCompilerPlatform.CSharp codeProvider"无法找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆