asp.net - Build with Roslyn, but leave the "compile-at-runtime" executables at the door? -


there has been lot of talk c# compiler roslyn on stackoverflow , internet in general. lot of people ask what , why roslyn, while others ask how get rid of it.

my question pertains latter question. quoted kemal kefeli here, iterated verbatim dozens more (e.g. another example of iteration), in order remove roslyn:

when create new web project, 2 nuget packages automatically added project. if remove them, problem should solved. package names are: "microsoft.codedom.providers.dotnetcompilerplatform" , "microsoft.net.compilers".

this approach, however, not work if using c# 6 features roslyn offers. removing these 2 nugget packages, give chance of using these features.

my question is, how compiler roslyn, avoid having compiler-at-runtime actions occurring , importantly, csc.exe, vbc.exe, , vbcscompiler.exe being placed in final release version (in roslyn folder).

i porting on stackoverflow's opserver piece of software. software allows users host embedded web servers , web pages within it. however, software picky allows uploaded , executables, found in roslyn folder, not allowed uploaded , executed @ runtime due security reasons.

opserver relies on c# 6 features, because if remove 2 nuget packages, errors sprout in compile-generated files. but, if more revert compile strictly with c#5.0 compiler, see clearly:

5.0 errors## heading ##

if leave nuget packages present , uncheck allow precompiled site updatable when publishing, in order disallow roslyn compiling files @ runtime followed rutix's comment here:

keep in mind removing these packages [as told kemal kefeli] break use of c# 6 features. solved unchecking "allow precompiled site updatable" pre-compiles views ect.

don't compiler @ runtime

it still generates executables , associated dlls in roslyn folder, less dlls. how can possibly remove roslyn dependency @ runtime , therefore executables outputted version , strictly compile everything @ compile-time?

in precompiled asp.net project ("allow precompiled site updatable" disabled) there no need compiler deployed app imho.

i'm using roslyn in .net 4.6 asp.net app (mix of web forms , mvc) , precompiled app works fine after removing roslyn folder\files published site...


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -