I removed Roslyn
related packages by NuGet
and it does work now.
Roslyn
related packages:
- Microsoft.CodeDom.Providers.DotNetCompilerPlatform
- Microsoft.Net.Compilers
P.S: My local IIS doesn't have any problem with Roslyn
but as I publish the project on the server (this is why I don't think the server supports Roslyn
), it shows the following error message:
Compilation Error
Description: An error occurred during the compilation of a resource
required to service this request. Please review the following specific
error details and modify your source code appropriately.
Compiler Error Message: The compiler failed with error code -532462766.
Show Detailed Compiler Output:
C:WindowsSysWOW64inetsrv>D:...wwwrootin
oslyncsc.exe /t:library /utf8output /nostdlib+ /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319mscorlib.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.Runtimev4.0_4.0.0.0__b03f5f7f11d50a3aSystem.Runtime.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl3843389397359c03_e1abd201System.Web.WebPages.Deployment.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.Web.Extensionsv4.0_4.0.0.0__31bf3856ad364e35System.Web.Extensions.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl32574b56eeed229e7_dfabd201Autofac.Integration.WebApi.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILMicrosoft.VisualStudio.Web.PageInspector.Loaderv4.0_1.0.0.0__b03f5f7f11d50a3aMicrosoft.VisualStudio.Web.PageInspector.Loader.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl32da0bd132333a9c_e0abd201System.Net.Http.Formatting.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl399fd000ffe3c7c0e_e1abd201System.Web.WebPages.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl3695a732a7a32e84e_e2abd201WebGrease.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.Activitiesv4.0_4.0.0.0__31bf3856ad364e35System.Activities.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_32System.EnterpriseServicesv4.0_4.0.0.0__b03f5f7f11d50a3aSystem.EnterpriseServices.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl3ca091706f1f4ae28_78afd201Core.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl3ce3c4f342b7b911a_e0abd201EntityFramework.SqlServer.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_32System.Datav4.0_4.0.0.0__b77a5c561934e089System.Data.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl3c73494ac8f453228_78afd201CommonViewModels.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILMicrosoft.Web.Infrastructurev4.0_1.0.0.0__31bf3856ad364e35Microsoft.Web.Infrastructure.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319mscorlib.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.WorkflowServicesv4.0_4.0.0.0__31bf3856ad364e35System.WorkflowServices.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl33d13810845500f_e1abd201System.Web.Http.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl35cc83c7351b7f8fe_e0abd201System.Web.Http.WebHost.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl3290d81d3fb074b29_78afd201Data.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.ServiceModel.Activationv4.0_4.0.0.0__31bf3856ad364e35System.ServiceModel.Activation.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl37a5d0293283dbf3a_e0abd201GridMvc.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl3eb50e8c61900fa91_e0abd201System.Web.Razor.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl3a7d6ceb34c5f9c2c_78afd201Web.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.Xml.Linqv4.0_4.0.0.0__b77a5c561934e089System.Xml.Linq.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.Web.WebPages.Deploymentv4.0_2.0.0.0__31bf3856ad364e35System.Web.WebPages.Deployment.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.Web.DynamicDatav4.0_4.0.0.0__31bf3856ad364e35System.Web.DynamicData.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.Xmlv4.0_4.0.0.0__b77a5c561934e089System.Xml.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystemv4.0_4.0.0.0__b77a5c561934e089System.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl33bd130ea7b432ba6_e0abd201System.Web.Optimization.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.ServiceModelv4.0_4.0.0.0__b77a5c561934e089System.ServiceModel.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_32System.Webv4.0_4.0.0.0__b03f5f7f11d50a3aSystem.Web.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl38486430e674206e7_dfabd201Autofac.Integration.Mvc.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl3c0d9cc0683811806_e1abd201System.Web.WebPages.Razor.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.Configurationv4.0_4.0.0.0__b03f5f7f11d50a3aSystem.Configuration.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILMicrosoft.CSharpv4.0_4.0.0.0__b03f5f7f11d50a3aMicrosoft.CSharp.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl38835020a58c1c60e_e1abd201System.Web.Helpers.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl330c33f640d8a820_d154d201Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.IdentityModelv4.0_4.0.0.0__b77a5c561934e089System.IdentityModel.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.ServiceModel.Webv4.0_4.0.0.0__31bf3856ad364e35System.ServiceModel.Web.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl36ea00d7f2323228_78afd201Extensions.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl3f8f1e397e9660a29_78afd201Services.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl3ff57243fb5e8b92_e0abd201System.Web.Mvc.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.Runtime.Serializationv4.0_4.0.0.0__b77a5c561934e089System.Runtime.Serialization.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.Web.WebPages.Deploymentv4.0_1.0.0.0__31bf3856ad364e35System.Web.WebPages.Deployment.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.Drawingv4.0_4.0.0.0__b03f5f7f11d50a3aSystem.Drawing.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.Data.DataSetExtensionsv4.0_4.0.0.0__b77a5c561934e089System.Data.DataSetExtensions.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.ServiceModel.Activitiesv4.0_4.0.0.0__31bf3856ad364e35System.ServiceModel.Activities.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl3fd2c5d180ae74dd_e7acd201Autofac.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.Corev4.0_4.0.0.0__b77a5c561934e089System.Core.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.ComponentModel.DataAnnotationsv4.0_4.0.0.0__31bf3856ad364e35System.ComponentModel.DataAnnotations.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.Web.ApplicationServicesv4.0_4.0.0.0__31bf3856ad364e35System.Web.ApplicationServices.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl3a44c79bb74928fbb_e0abd201EntityFramework.dll" /R:"C:WindowsMicrosoft.NetassemblyGAC_MSILSystem.Web.Servicesv4.0_4.0.0.0__b03f5f7f11d50a3aSystem.Web.Services.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl3227cd18a6ab66d28_78afd201Domain.dll" /R:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06assemblydl38cbb60ec0788858_b3abd201Newtonsoft.Json.dll" /out:"C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06App_Code._bgj8eyw.dll" /debug- /optimize+ /warnaserror- /w:4 /nowarn:1659;1699;1701;612;618 /langversion:6 /nowarn:1659;1699;1701 "C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06App_Code._bgj8eyw.0.cs" "C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
oota47e39f5cc42bc06App_Code._bgj8eyw.1.cs"
How to uninstall the Roslyn
packages.
In the Solution Explorer, by Right-Click on the web project, select Manage NuGet Packages...
.
Go to Installed
tab then search the related Roslyn
packages as mentioned at above.
Use Uninstall
button to delete them.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…