VBC compiler only support visual basic 2012 - asp.net

I am trying to run a debug instance of web service, I am running in windows 2012 server, however it have the following error. I have download the iis express 10 again from microsoft. However it is not work. I found I can run the web service in Windows 10. I found the IIS express version is 10.0.25095.1000 in windows 10. And in windows it is 10.0.15000.1000. Is this the reason? Or any method that I can upgrade the VBC compiler?
Server Error in '/' Application.
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: BC2001: file 'em.Configuration,System.Text,System.Text.RegularExpressions,System.Web,System.Web.Caching,System.Web.SessionState,System.Web.Security,System.Web.Profile,System.Web.UI,System.Web.UI.WebControls,System.Web.UI.WebControls.WebParts,System.Web.UI.HtmlControls' could not be found
Source Error:
[No relevant source lines]
Source File: vbc : Command line Line: 0
Show Detailed Compiler Output:
C:\Program Files\IIS Express> "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\vbc.exe" /t:library /utf8output /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d9469d7f\2e49f07\assembly\dl3\304622d1\e3f1eacb_b743d901\MonitorAgentLib.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d9469d7f\2e49f07\assembly\dl3\fbd2d313\006ff38d_251bd701\Newtonsoft.Json.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d9469d7f\2e49f07\assembly\dl3\c69ff0e2\d24564cb_b743d901\CoreLib.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d9469d7f\2e49f07\assembly\dl3\b3e36328\066be9cb_b743d901\PrintServiceAgentLib.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d9469d7f\2e49f07\assembly\dl3\00b34a46\4b32e8cb_b743d901\EnTrakLib.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d9469d7f\2e49f07\assembly\dl3\a02ce63f\6c44b6cb_b743d901\ConfigMgr.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d9469d7f\2e49f07\assembly\dl3\95b0a27d\402a1fcc_b743d901\CoreServiceAgentLib.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d9469d7f\2e49f07\assembly\dl3\dd9f32d7\6bdcebcb_b743d901\PrintRouterAgentLib.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualStudio.Web.PageInspector.Loader\v4.0_1.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Web.PageInspector.Loader.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d9469d7f\2e49f07\assembly\dl3\53f0c7db\a5e59dcc_b743d901\MobilityPortal.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d9469d7f\2e49f07\assembly\dl3\9f7b9db6\f29e287f_f47ad801\EntityFramework.dll" /out:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d9469d7f\2e49f07\App_global.asax.6kzsdhsa.dll" /D:DEBUG=1 /debug+ /nowarn:41008,40000,40008 /define:_MYTYPE=\"Web\" /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Specialized,Syst em.Configuration,System.Text,System.Text.RegularExpressions,System.Web,System.Web.Caching,System.Web.SessionState,System.Web.Security,System.Web.Profile,System.Web.UI,System.Web.UI.WebControls,System.Web.UI.WebControls.WebParts,System.Web.UI.HtmlControls /warnaserror- /optionInfer+ "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d9469d7f\2e49f07\App_global.asax.6kzsdhsa.0.vb" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d9469d7f\2e49f07\App_global.asax.6kzsdhsa.1.vb"
And
Microsoft (R) Visual Basic Compiler version 14.8.3761 for Visual Basic 2012
Copyright (c) Microsoft Corporation. All rights reserved.
This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to Visual Basic 2012, which is no longer the latest version. For compilers that support newer versions of the Visual Basic programming language, see http://go.microsoft.com/fwlink/?LinkID=533241
And
vbc : Command line error BC2001 : file 'em.Configuration,System.Text,System.Text.RegularExpressions,System.Web,System.Web.Caching,System.Web.SessionState,System.Web.Security,System.Web.Profile,System.Web.UI,System.Web.UI.WebControls,System.Web.UI.WebControls.WebParts,System.Web.UI.HtmlControls' could not be found

I might turn this to a real answer later or simply delete it.
As you showed multiple issues in the question body, the primary one you should focus on is "This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to Visual Basic 2012, which is no longer the latest version. For compilers that support newer versions of the Visual Basic programming language, see http://go.microsoft.com/fwlink/?LinkID=533241".
Like I wrote about C# compilers, a modern project (either C# or VB.NET) should no longer use the compilers shipped with .NET Framework itself.
"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\vbc.exe" is the proof that when you saw the error, the legacy compiler was used.
So, you will have to go back to the original web project and check why it uses the legacy VB.NET compiler, but not the latest Roslyn based shipped usually via NuGet packages. Your VS version matters a lot as well. Please edit the question to include such important information so further discussion can be made.
Note that IIS Express is totally irrelevant here, and you shouldn't even install it on a Windows Server machine because it is not designed for production use at all. The full IIS 8 or 8.5 there is the one you should use.

Related

CS0101: The namespace already contains a definition for className

I am getting a strange error while trying to run a WCF service on
browser, Project is building fine on visual studio without any error
but gives crash with below details on browser. It is hosted in IIS. The class in declared only one in project and not duplicated, same project works fine on old machine but getting error on new machine where I tried to configure it. I think the one of reason it might be its creating temporary files of all the files in project inside Temporary ASP.NET Files folder, I tried to delete them but they get created every time when I build the project.
c:\windows\system32\inetsrv> "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe" /t:library /utf8output /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\ingredientmatcher\b23748f5\43a1de34\App_GlobalResources.6a17zz1v.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\ingredientmatcher\b23748f5\43a1de34\assembly\dl3\9b041b3d\a0018c9c_d2d4d401\IngredientMatcher.MailSender.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\ingredientmatcher\b23748f5\43a1de34\assembly\dl3\83da1256\d2898c9c_d2d4d401\Microsoft.Practices.EnterpriseLibrary.Common.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\ingredientmatcher\b23748f5\43a1de34\assembly\dl3\e5745b7b\00098296_f41cd501\AWSSDK.Core.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\ingredientmatcher\b23748f5\43a1de34\assembly\dl3\81ab8890\7ada0cf9_141ed501\IngredientMatcher.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\ingredientmatcher\b23748f5\43a1de34\assembly\dl3\6d63ab44\00f6e840_ec86d401\System.Net.Http.Formatting.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\ingredientmatcher\b23748f5\43a1de34\assembly\dl3\d4905370\0012374f_ec86d401\System.Web.Http.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\ingredientmatcher\b23748f5\43a1de34\assembly\dl3\111dfb93\41ea8c9c_d2d4d401\Microsoft.Practices.EnterpriseLibrary.Data.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\ingredientmatcher\b23748f5\43a1de34\assembly\dl3\783cecad\0043550b_f51cd501\AWSSDK.SimpleNotificationService.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualStudio.Web.PageInspector.Loader\v4.0_1.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Web.PageInspector.Loader.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\ingredientmatcher\b23748f5\43a1de34\assembly\dl3\23e8d013\00b8417c_79f8d401\Newtonsoft.Json.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\ingredientmatcher\b23748f5\43a1de34\assembly\dl3\c1ca991e\00445b94_ec86d401\System.Web.Http.WebHost.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll" /R:"C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll" /out:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\ingredientmatcher\b23748f5\43a1de34\App_Code.uw2nyizu.dll" /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701;612;618 /warnaserror- "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\ingredientmatcher\b23748f5\43a1de34\App_Code.uw2nyizu.63.cs" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\ingredientmatcher\b23748f5\43a1de34\App_Code.uw2nyizu.33.cs" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\ingredientmatcher\b23748f5\43a1de34\App_Code.uw2nyizu.57.cs"
Microsoft (R) Visual C# Compiler version 4.7.3190.0
for C# 5
Copyright (C) Microsoft Corporation. All rights reserved.
This compiler is provided as part of the Microsoft (R) .NET Framework,
but only supports language versions up to C# 5, which is no longer the
latest version. For compilers that support newer versions of the C#
programming language, see
http://go.microsoft.com/fwlink/?LinkID=533240
d:\IM\IM-API\App_Code\BEU\FetchEbookRecipeDetailsBE.cs(58,18): error
CS0101: The namespace 'IngredientMatcher.App_Code.BEU' already
contains a definition for 'RetrieveCountryFlagUrlBE'
d:\IM\IM-API\App_Code\BEU\Recipe.cs(100,18): (Location of symbol
related to previous error)

Compilation error when deploying IIS project in server error -2146232576

I made an MVC project using VS 2017
I was using IIS Server v10 on my local machine for testing, now that Im uploading my project to the server w/Windows server 2008 and IIS Server v6 I get the following compilation error code -2146232576
I already tried the following solution Compilation error -2146232576 removing the packages with nuget PM - > Microsoft.CodeDom.Providers.DotNetCompilerPlatform
and Microsoft.Net.Compilers from my project, but it didn't work.
Im also not deploying the project from VS2017 using web deployment tool, Im accessing from a remote desktop to the server, and "Adding a new website" from the IIS Server Admin tool, the project folder is in a "Cloud folder", so I attach the new website to that folder.
Any help will be really appreciated, thanks!
BTW, If I click "See compiler results" I get the following :
c:\windows\system32\inetsrv>D:\Intranet\Intranet
Nueva\InventariosBodega\InventoryMVC\bin\roslyn\csc.exe /t:library
/utf8output /nostdlib+
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\28c4dd2b\0074b766_899bd301\System.Web.Helpers.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\f76361e7\0074b766_899bd301\System.Web.WebPages.Razor.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\dd2c8dcd\00405cc9_889bd301\System.Web.Mvc.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\ee1ff4a7\00fb1244_1dacd301\Microsoft.AI.ServerTelemetryChannel.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\0c5caa47\0074b766_899bd301\System.Web.WebPages.Deployment.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\4652d562\00f41bc5_6e64d301\ExcelNumberFormat.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\21ff0145\006fa443_52f0d201\Microsoft.AspNet.TelemetryCorrelation.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\387466b6\80ac78b8_cf60d401\InventoryMVC.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\bed44328\0084c160_bb46d301\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\8fad2587\00fa1531_3eb5d301\FastMember.Signed.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\554cddff\00048ad2_4adfd201\DocumentFormat.OpenXml.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\627ae2bf\0026839d_2dacd301\Microsoft.AI.PerfCounterCollector.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\85ea1a5f\00dd11c0_9fc7d301\EntityFramework.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\4b71c96c\008b5b5b_7518cf01\WebGrease.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\d1c7755a\007e36de_6f27cf01\System.Web.Optimization.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\c290801e\00d0aa3b_992ad401\ClosedXML.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\6c38dd12\00b64a64_2dacd301\Microsoft.AI.Web.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\8a8f3694\00dd11c0_9fc7d301\EntityFramework.SqlServer.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\17fb612d\00f9519c_2dacd301\Microsoft.AI.WindowsServer.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\a2f7474a\005caad7_889bd301\System.Web.Razor.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\40d8bd40\00a03031_75aece01\Antlr3.Runtime.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\4338dd4e\00f41cc3_8d6acd01\Microsoft.Web.Infrastructure.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\21d2e02d\00efe283_77efd201\Microsoft.AI.Agent.Intercept.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\d123d09e\000abfde_1cacd301\Microsoft.ApplicationInsights.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\3bf86b34\0074b766_899bd301\System.Web.WebPages.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\890412f9\00db9f04_2cacd301\Microsoft.AI.DependencyCollector.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\5ef1cd79\0069d048_a800d301\System.Diagnostics.DiagnosticSource.dll"
/R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\assembly\dl3\ecd0c0d7\005f8d6b_cfa8d301\Newtonsoft.Json.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll"
/R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll"
/out:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary
ASP.NET Files\root\e9dba4d1\4d6ed61a\App_global.asax.sntr_4gi.dll"
/D:DEBUG /debug+ /optimize- /warnaserror- /w:4
/nowarn:1659;1699;1701;612;618 /langversion:6 /nowarn:1659;1699;1701
"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4d6ed61a\App_global.asax.sntr_4gi.0.cs"
"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
Files\root\e9dba4d1\4
The compiler error relates to a "Desktop Heap exhaustion", the compiler is effectively encountering a (a very specific type of) memory limit when attempting to compile your application.
Bottom line, this is a very old server and i strongly advice you upgrade to a more modern version of Windows. If you cant, the following may help:
It may be possible to build the site locally and deploy the binaries - this should prevent the need to compile your code server side and work-around your immediate issue - but the "age gap" between your OS and your chosen technologies to build your app could cause further issues down the road - this is a legacy operating system after all.
Another option is to change the user your app pool is running under - assuming you have more than 1 app pool using the same identity this will be eating into the various per user memory limits (which are now 10 years old!) - again this might side-step your issue.
Your final option is a registry edit to increase the Desktop Heap size of csrss (Client server runtime sub-system) - DISCLAIMER: editing the registry is fine if done correctly, but does include the possibility of rendering your server unbootable - make sure you understand the process and have a viable backup etc etc etc before proceeding.
Under the registry path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems the Windows key has a command starting %SystemRoot%\system32\csrss.exe and includes an argument SharedSection= followed by 3 comma separated numbers. The 3rd value needs to be increased to change the desktop heap size. Ive seen guidance vary, so i would suggest start small - take the current value, add 1024 or 2048 at a time until the error goes away - dont go crazy with this setting - values are in KiloBytes so 1024KB = 1 Megabyte - you shouldnt need more than a few MB for this value. A Reboot will be required to make the change active after editing the registry.
Below article applies to Server 2008 (but i dont have access to a machine to test!!!) and give more detailed instructions:
https://blogs.msdn.microsoft.com/friis/2012/09/19/c-compiler-or-visual-basic-net-compilers-fail-with-error-code-1073741502-when-generating-assemblies-for-your-asp-net-site/
Last thing... Server 2008/2008R2 will reach end of life January 14, 2020 - no more patches - make sure this server is turned off before then... https://www.microsoft.com/en-us/cloud-platform/windows-server-2008

Install ASP.NET MVC 4.0.4

I have a production server for a project, and I try to build a test server for the same project with the same environment.
For this, I need to install on the test server (that means, no VS or any dev stuff like package managers, etc.) the same version installed on the prod server version of ASP.NET MVC: 4.0.4xxx.
I searched to download the latest ASP.NET MVC 4 installer, and the only download MS proposes is the ASP.NET MVC 4 for Visual Studio 2010 SP1 (don't really understand what has to do here VS 2010 - should it work only with VS?!) - once installed I navigate to C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies and the System.Web.Mvc.dll version is 4.0.207xxx.
Where could I find the ASP.NET MVC 4.0.4xxx?
More info:
the .NET installed is
the ASP.NET seems to be 4.0.0.0:
also
Finally, in localhost, I get the following error:
Since ASP.NET MVC version 3.0.20105.1, the Microsoft.AspNet.Mvc DLL has been available through NuGet. This means your application should include Microsoft.AspNet.Mvc version 4.0.40804 as part of its distribution (in the bin folder) when your application is published.
The only thing you need to install on a production or test server is the .NET Framework Redistributable 4.0+ in order for ASP.NET MVC 4 to function.
Do note that .NET Framework 4.0 is no longer supported, so it is recommended to use at least Microsoft .NET Framework 4.5.2. All versions of .NET Framework 4.0+ are in-place upgrades, so all higher versions should work with your application without any changes.
There was also a security update that broke compatibility with 4.0.0.0, that will need to be applied to your server if it is not already installed. This updates MVC 4 assembly version from 4.0.0.0 to 4.0.0.1, so it is a breaking change for applications that are compiled against 4.0.0.0. Since your application is looking for 4.0.0.1 (as it should) that means your application is compiled with the security update, but the server needs the security update for MVC 4 installed.

Receiving error C0000142 (-1073741502)

The site was working great, then I rebuilt the site in Visual Studio 2012 (VS2012), previously working on VS2010. The site uses .Net 4.0. My hosting company does not have 4.5 yet.
After upgrading the site, I receive the following error:
Server Error in '/' Application.
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 -1073741502.
Show Detailed Compiler Output:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
I did a google search and came up with IIS stuff, like application data pools needing to be not local system and deleting temporary folders on IIS, however the web hosting company said that that is not the problem and that Plesk handles it nicely. So far, they are not very helpful.
Specific Error:
C:\Windows\SysWOW64\inetsrv> "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe" /t:library /utf8output /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\9bdee0dc\377ffe6c\assembly\dl3\cac0f9df\00e0d4fd_988fcd01\LogicNP.CryptoLicensing.Generator.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\9bdee0dc\377ffe6c\assembly\dl3\2ec33a5d\28752f05_ffb2cd01\LicService.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Entity\v4.0_4.0.0.0__b77a5c561934e089\System.Web.Entity.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll" /out:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\9bdee0dc\377ffe6c\App_Web_login.aspx.c29b009d.a4o19rhv.dll" /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701 /warnaserror- "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\9bdee0dc\377ffe6c\App_Web_login.aspx.c29b009d.a4o19rhv.0.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\9bdee0dc\377ffe6c\App_Web_login.aspx.c29b009d.a4o19rhv.1.cs"
The compiler error output to me seems like just the compiler line. The '/' is interesting. One Google search result said the application name was the problem, but I checked that.

Is it possible to force Visual Studio 2010 to use Visual Basic 10?

To reproduce the error I'm getting:
Create a new Visual Studio 2010 ASP.NET web site in Visual Basic, targeting .NET 2.0
Type "Public Property Test As String"
Observe "Visual Basic 9.0 does not support auto-implemented properties." error
Visual Studio 2010 is happy to use VB 10 against .NET 2.0-targeted Windows Forms applications, this only appears to be an issue with ASP.NET.
Is there a way to force Visual Studio 2010 to use VB 10 when targeting .NET 2.0?
No. A Web Site project is one that compiles within ASP.NET at runtime - as such, you've chosen to ask ASP.NET to run it as a .NET 2.0 project, so it will use the .NET 2.0 vbc Visual Basic compiler that's part of .NET. That compiler has no knowledge of VB 10, and so you're rightly being warned that it will not work.
The reason it can work for other project types is because the compilation is happening using a later compiler (usually the one built into Visual Studio).

Resources