Asp.net 4.0 has not been registered - visual-studio-2010

When I try to open my Visual Studio project I get the following error:
Asp.Net has not been registered on the webserver you need to manually configure your webserver for Asp.net 4.0.
Update:
Nevermind I fixed it:
I just repaired .Net Framework 4.0 and the issue was resolved.

I also fixed this issue by running
aspnet_regiis -i
using the visual studio command line tools as an administrator

This solved the problem
C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -i
Be sure to run the command prompt as administrator

For those getting this error in after installing .NET Framework 4.6 - Read and install one of these hotfixes to resolve the issue.

To resolve 'ASP.NET 4.0 has not been registered. You need to manually configure your Web server for ASP.NET 4.0 in order for your site to run correctly' error when opening a solution we can:
1 Ensure the IIS feature is turned on with ASP.NET. Go to Control Panel\All Control Panel Items\Programs and Features then click 'Turn Windows Featrues on. Then in the IIS --> WWW servers --> App Dev Features ensure that ASP.NET is checked.
2 And run the following cmd line to install
C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -i
Hope this helps

The aspnet_regiis approach described above doesn't appear to work on Windows 8.1:
C:\Windows\system32>aspnet_regiis -i
Microsoft (R) ASP.NET RegIIS version 4.0.30319.33440
Administration utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation. All rights reserved.
Start installing ASP.NET (4.0.30319.33440).
This option is not supported on this version of the operating system. Administrators should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Windows Features On/Off" dialog, the Server Manager management tool, or the dism.exe command line tool. For more details please see http://go.microsoft.com/fwlink/?LinkID=216771.
Finished installing ASP.NET (4.0.30319.33440).
As indicated in the message, I went to:
Start
Turn Windows features on or off
.NET Framework 4.5 Advanced Services
and checked ASP.NET 4.5.
This seems to have resolved the problem.

Open:
Start Menu
-> Programs
-> Microsoft Visual Studio 2010
-> Visual Studio Tools
-> Visual Studio Command Prompt (2010)
Run in command prompt:
aspnet_regiis -i
Make sure it is run at administrator, check that the title starts with Administrator:

http://msdn.microsoft.com/en-us/library/k6h9cz8h.aspx - See this on registering IIS for ASP.NET 4.0

Asp.net 4.0 has not been registered
Visual Studio 2013
Download Visual Studio 2013 Update 4
For more information on the Visual Studio 2013 Update 4, please refer to: Visual Studio 2013 Update 4 KB Article
Visual Studio 2012
An update to address this issue for Microsoft Visual Studio 2012 has been published: KB3002339
To install this update directly from the Microsoft Download Center, here
Visual Studio 2010 SP1
An update to address this issue for Microsoft Visual Studio 2010 SP1 has been published: KB3002340
This update is available from Windows Update
To install this update directly from the Microsoft Download Center, here
http://download.microsoft.com/download/6/7/E/67E041A1-00DA-4948-90BE-75A0146C08F5/VS10SP1-KB3002340-x86.exe

Go to Visual Studio 2010 Command prompt and set the Directives as :
C:\Windows\Microsoft.NET\Framework\v4.0.30319>
then install IIS by following command:
C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -i
now iis will working..
its better if your restart the computer

I had the same issue but solved it......
Microsoft has a fix for something close to this that actually worked to solve this issue. you can visit this page http://blogs.msdn.com/b/webdev/archive/2014/11/11/dialog-box-may-be-displayed-to-users-when-opening-projects-in-microsoft-visual-studio-after-installation-of-microsoft-net-framework-4-6.aspx
The issue occurs after you installed framework 4.5 and/or framework 4.6.
The Visual Studio 2012 Update 5 doesn't fix the issue, I tried that first.
The msdn blog has this to say:
"After the installation of the Microsoft .NET Framework 4.6, users may experience the following dialog box displayed in Microsoft Visual Studio when either creating new Web Site or Windows Azure project or when opening existing projects....."
According to the Blog the dialog is benign. just click OK, nothing is effected by the dialog...
The comments in the blog suggests that VS 2015 has the same problem, maybe even worse.

If ASP.NET 4.0 is not registered with IIS
*****Use this step if u cant access using run command*****
Go to
C Drive
-->>windows
-->>Microsoft.Net
-->>Framework
-->>v4.0.30319 (Choose whatever framework to register with IIS me selecting Framework 4)
-->>aspnet_regiis (Double-click or right click & choose run as administrator)

I had this problem on Windows 8.1 which wouldn't support the aspnet_regiis -i approach.
Instead you need to go to Control Panel, locate the "Turn Windows features on or off" option and drill down as follows:
Internet Information Services
-> World Wide Web Services
-> Application Development Features
and check the "ASP.NET 4.5" option. In checking this box, other options such as ".NET Extensibility 4.5" and the ISAPI options will be checked automatically.
Apply the changes by clicking OK. Restart your website in IIS and your site should now be accessible.

I repaired it using the Microsoft .NET Framework Repair Tool. After reloading my project a couple of times after that the problem went away.

Related

Visual Studio 2017 – Enterprise restarts on .Net Core Projects

Just installed Visual Studio 2017 – Enterprise Edition with the following workloads:
Universal Windows Platform Development
ASP.Net and Web Development
.Net Desktop Development
.Net Core cross-platform Development
After this installation, when I create a new .net core or .net standard project, the visual studio restarts while loading the project template.
Steps to create the behavior:
File ⇒ New Project ⇒ .Net Core ⇒ Asp.Net Core Application (.Net Core)
Visual Studio tries to load the selected template then suddenly it disappears and the windows show the dialogue box to Check online help, debug or close it.
Next, visual studio reboots to the start page.
This only happens when I select any .Net Core or .Net Standard project templates.
Much appreciate your help in advance.
I had the exact same issue. It turned out that when a .Net core or .Net standard project template is selected, it tries to restore the packages from NuGet and somehow it was unable to do that or clear the NuGet’s local cache.
Here are the steps to fix it:
Download NuGet
https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
Open the command prompt as “Administrator” – this is important other
cache may not get cleared due to permission issues.
Navigate to the folder where the NuGet is downloaded
Run the following command to clear the cache
nuget locals all -clear
Open Visual Studio 2017
Create a new ASP.Net core project with default templates
Hope this helps!

Visual Studio thinks `Microsoft Web Developer Tools` is installed

Symptoms
Visual Studio syntax highlighter and Intellisense for Javascript and Razor views are not working.
There is no Web templates installed when creating a new project.
When I try to uninstall the web developer feature:
Add or remove Programs > Microsoft Visual Studio Professional 2015 > Modify
Microsoft Web Developer Tools is always checked. Even when I uncheck it and uninstall it, then restart the computer; the next time I still see it's checked:
What I did to solve this:
Running devenv.exe \resetuserdata Command to reset the user data.
Running devenv.exe \installtemplates to install the templates.
Repairing the Visual Studio.
Trying to uninstall and re-install the Web Developer Tools feature through the Visual Studio installer.
None have worked so far.
What I guess
I think Visual Studio thinks this feature is installed (through some registry keys probably) but the files are actually not installed.
Because whenever I try to Modify the installation of Visual Studio, the Microsof Web Developer Tools check box is not checked for the first second, then it is checked again after 1 second.
Question
Any suggestion on fixing this without uninstalling Visual Studio itself?
I was having the same problem and this is what worked for me:
Uninstall ASP.NET Web Tools from Control Panel
Download and install "Microsoft ASP.NET and Web Tools" extension from: https://visualstudiogallery.msdn.microsoft.com/c94a02e9-f2e9-4bad-a952-a63a967e3935
Try this (in order):
Find Microsoft ASP.NET 5 RC1 ... in control panel / programs &
select modify
Select repair
Run devenv.exe /installvstemplates as administrator
Run VS as administrator
I had the same problem with Visual Studio 2015. I tried several things, but simply updating Microsoft ASP.NET seemed to do the trick.
Install ASP.NET 5 RC1, restart, and the issue should be resolved.
I didn't know I had this problem until I opened an MVC project with Razor views and didn't have syntax highlighter and Intellisense. I was lucky to read your question because the symptoms are the same and so is the conclusion. And unfortunately none of the answers solves the problem. But it did help me to find the answer, or what worked for me.
What did the trick was installing .NET Core 1.0.0 (DotNetCore.1.0.0.RC2-Runtime-x64 and DotNetCore.1.0.0.RC2-VS2015Tools.Preview1). I am pretty sure that this is enough to solve the issue. But since I tried all kinds of things, it is possible that another action is required. In that case, continue reading below the images.
When I start a new project this opens the following dialog:
Selecting ASP.NET Web Application (.NET Framework) opens the dialog with the projects I was looking for.
The syntax highlighter and Intellisense are also working for Razor views.
I do not know what caused the problem in the first place. Is the installation incomplete, is there a conflict with other software or did I do something that caused this?
Visual Studio 2012 is installed on my machine as well. I installed and uninstalled VS2015 (pro and community version) and then installed vs2015 Community on multiple volumes. On uninstalling I did use /Force and removed several folders manually.
Microsoft ASP.NET 5 RC Update 1 is also installed, but repairing this did not solve the issue. Also installing Asp.Net Web Framework tools 2015 didn't change anything. I copied templates to all template folders I could find (perhaps an issue with installing on multiple volumes?), ran devenv.exe with different parameters and deleted the '14' folder in my profile. None of this worked. Finally I installed .NET Core 1.0.0.

Visual Studio 2013 installation error: .NET 4.5 needs to be enabled, but already is

I have a problem with Visual Studio Ultimate 2013. When I started the installation process, I got an error related to the .NET Framework 4.5.1, 0x800713ec Asia. I try to install .NET Framework 4.5.1 and I downloaded it from microsoft.com, but I have got the next issues:
Blocking Issues:
The .NET Framework 4.5 and this update are already installed on your
computer as part of the Windows operating system, but they must be
enabled. In Control Panel, choose Programs and Features, choose Turn
Windows features on or off, and then select the .NET Framework 4.5
check box.
Setup cannot continue because a previous installation requires your
computer to be restarted. Please restart your computer and rerun
Setup.
I did this recommendation, but nothing happened.
Just go to settings --> power --> and then update and restart . and then again Run Setup

Visual Studio 2013 wont run as administrator

I'm trying to get Visual Studio 2013 running as an administrator, but I'm constantly getting errors. I've searched and tried solutions for other versions of VS, but those fixes didn't apply, so hopefully someone here can help.
When I try to run VS2013 as an admin, I an error saying that the application cannot start.
I saw a few articles talking about copying and registering dte*.olb files, but they were for previous versions of VS. I copied one of the files over and registered it and I can now get past the original error, but I can't compile any application - including any default template workspaces. Before I went too crazy and potentially made things worse, I wanted to ask here.
If I don't get the "application cannot start" message, I get this message when I try to compile anything:
---------------------------
Microsoft Visual Studio
---------------------------
Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY))
---------------------------
OK
---------------------------
The problem is that that error code doesn't tell me what library wont load.
The output window says:
Error occurred while restoring NuGet packages: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY))
1>------ Build started: Project: WcfService1, Configuration: Debug Any CPU ------
1> WcfService1 -> C:\Users\David\Documents\Visual Studio 2013\Projects\WcfService1\WcfService1\bin\WcfService1.dll
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
I tried uninstalling and reinstalling NuGet with no change in the behavior.
And if I go to the project properties, I can't see the Web, Package/Publish Web, or Code Analysis Tabs.
Does anyone have any idea how to fix this?
This is on Windows 8.1 Pro. My exact VS configuration is below.
Microsoft Visual Studio Professional 2013
Version 12.0.30110.00 Update 1
Microsoft .NET Framework
Version 4.5.51641
Installed Version: Professional
LightSwitch for Visual Studio 2013 06177-004-0444002-02105
Microsoft LightSwitch for Visual Studio 2013
Microsoft Office Developer Tools - Update 1 for Visual Studio 2013 ENU 06177-004-0444002-02105
Microsoft Office Developer Tools - Update 1 for Visual Studio 2013 ENU
Team Explorer for Visual Studio 2013 06177-004-0444002-02105
Microsoft Team Explorer for Visual Studio 2013
Visual Basic 2013 06177-004-0444002-02105
Microsoft Visual Basic 2013
Visual C# 2013 06177-004-0444002-02105
Microsoft Visual C# 2013
Visual C++ 2013 06177-004-0444002-02105
Microsoft Visual C++ 2013
Visual F# 2013 06177-004-0444002-02105
Microsoft Visual F# 2013
Visual Studio 2013 Code Analysis Spell Checker 06177-004-0444002-02105
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker
Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.
The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.
Windows Phone SDK 8.0 - ENU 06177-004-0444002-02105
Windows Phone SDK 8.0 - ENU
ASP.NET and Web Tools 2013.1.41009
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Windows Azure Web Sites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Windows Azure
ASP.NET Web Frameworks and Tools 2012.2 4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563
ASP.NET Web Frameworks and Tools 2013 5.0.11213.0
For additional information, visit http://www.asp.net/
Common Azure Tools 1.0
Provides common services for use by Azure Mobile Services and Windows Azure Tools.
JetBrains ReSharper 8.1 Full Edition build 8.1.23.546 on 2013-12-12T07:30:52
JetBrains ReSharper 8.1 package for Microsoft Visual Studio. For more information about ReSharper, visit http://www.jetbrains.com/resharper/. Copyright © 2003–2014 JetBrains, Inc.
Microsoft Advertising SDK for Windows Phone
Microsoft Advertising SDK for Windows Phone
Build
NuGet Package Manager 2.8.50126.477
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
SQL Server Data Tools 12.0.30919.1
Microsoft SQL Server Data Tools
Visual Studio Spell Checker VSSpellChecker
An editor extension that checks the spelling of comments, strings, and plain text as you type.
Windows Azure Mobile Services Tools 1.0
Windows Azure Mobile Services Tools
Windows Azure Remote Debugging 1.0
Windows Azure Remote Debugging Community Technology Preview
Windows Azure Tools 2.2
Windows Azure Tools for Microsoft Visual Studio 2013 - v2.2.11003.1601
Workflow Manager Tools 1.0 1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.
And I'll go with the saddest answer of all time: Have you tried a full uninstall, reboot and re-install of Visual Studio?
This will also help if the issue is as a result of an add-in or similar.
I had a lot of issues with a clean install of VS2013 on win7 (projects not loading, crashes etc). A re-install sadly was the only thing that helped. This is poor advice I know but still sometimes one of the best fixes to some VS ills.
[EDIT]
I am no fan of fixing up failed installs unless it breaks the same every time.
Refer Connect Article (For VS2012 but same issue).
This Stack Overflow question may help with the crashes. The question is for VS2008 but it looks identical. Try and reset your fonts as suggested. (I think running Devenv /ResetSettings at a minimum is not a bad idea)
I do recommend to disable Resharper. From time to time I meet a VS solution which I can't open in VS2013 with enabled ReSharper.
Tools->Options->Resharper->Suspend Now
It will be difficult to help without some information such as
- Event log for the error
- Further details of the error message ("Application cannot start" is a bit vague)
Have you rebooted since installing ?
Have you updated via windows update yet ?
Did you install it to its usual path or somewhere else ?
Did you install it as admin or under a user account ?
If its work pc is it installed locally or under a roaming profile ?
No problems on my surface pro or desktop running it as admin or standard user
but it is installed locally and was installed under my developer account but works under all accounts (test ,dev,admin, user etc)
Based on the information provided, I believe there is an issue with Microsoft Office Developer Tools specifically Outlook related.
Fix 1:
Checking your Office directory for msoutl.olb. If it is there, try running 'regtlib msoutl.olb'. You should have regtlib on your machine is part of your Visual Studio install, I believe. Anyway, reregistering the typelib will rewrite all of the necessary keys to the registry. You will need administrative privileges for this operation.
Fix 2:
Try running a program that came with Outlook - C:\Program Files\Common Files\System\MSMAPI\1033\Scanpst.exe
For more information please see this site - Click Here
Fix 3:
Try uninstalling Office Developer Tools and see if the problem persists.
Fix 4:
The other possibility is that msoutl.olb itself is corrupt, in which case reinstalling Outlook should fix the problem.
This could be windows 8 acting up. Saying that, insure that your OS is updated, new patches to fix broken stuff should be regular, i suspect a lot of broken things.
Insure that you have the correct .net framework installed and re-install it if necessary. I am not too familiar with Windows 8, i had 3 months of an unpleasant experience with it, but try to see if you can change the compatibility mode by right clicking on the .exe file.
i doubt my response would be any better than others but i felt like contributing and since no one mentioned either checking the .net framework or the compatability..
best of luck!
also i did a small bit of research into TYPE_E_cantloadlibrary and found this link, maybe you should check it out
http://social.msdn.microsoft.com/Forums/en-US/ac50fa41-8d47-4fa9-81a3-914f262676af/0x80029c4a-typeecantloadlibrary?forum=vsto
Try this:
right click devenv.exe
troubleshoot compatibility
Troubleshoot program
This program requires addition permission
Next
Test the program
Next
Yes, save these settings for this program.
This will make VS run as administrator from now on.
I ran into the exact same problem. My issue was that the 'Start Page' was fowled up.
I've edited the following:
> Tools > Options > Startup
Choose 'Show empty environment' in the 'At startup' pulldown
This fixed all my problems and can run as Administrator again.

Can't Find NuGet with VS 2010 Shell Extension Manager

Following these instructions as best I can, the VS 2010 Shell Extension Manager turns up no results when searching for "nuget". The only deviation as far as I can tell is that the instructions show using VS 2010 Ultimate, and I am using the Shell. I had no problem with AnkhSvn and I can see all kinds of other extensions in the Online Gallery. One other thing, before attempting this I installed the NuGetPackageExplorer (not even really sure what it is, just trying to get off the ground with NuGet and I found it on their CodePlex download site -- ultimately I'd like to publish my own NuGet package, since someone suggested it to me and I've heard about it a couple other times). Any Ideas?
Update
I recently got a new computer (Windows 7 64 bit) and freshly installed Visual Studio 2010 Shell and F# 2.0 and am having the same exact issue. Note: I just checked the About page and it says the only installed component is Visual Web Developer 2010 (seemed odd to me).
It seems like the Visual Studio 2010 "Shell" [1] is not one of the supported applications. Do you have a full version of Visual Studio 2010 Professional, Premium, or Ultimate?
From the NuGet FAQ page [2]:
What is required to run NuGet?
NuGet requires Visual Studio 2010 or Visual Web Developer Express 2010. The NuGet Package Manager Console requires that PowerShell 2.0 be installed. Powershell 2.0 is already installed if you have the following operating system:
Windows 7
Windows Server 2008 R2
If you have the following operating systems, you must manually install Powershell 2.0.
Windows XP SP3
Windows Server 2003 SP2
Windows Vista SP1
Windows Server 2008
[1] Is this the VS 2010 Shell you have? http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=8e5aa7b6-8436-43f0-b778-00c3bca733d3
[2] http://docs.nuget.org/docs/start-here/nuget-faq
Edit: Check what's selected in the left pane of the Extensions Manager. It defaulted to "Installed Extensions" for me, that could be your problem. Select "Online Gallery -> All" then do the search again.
--
Not sure why it's not showing up, but you can install NuGet by going to the website and clicking the blue "Install NuGet" button. This will take you through to a download page for the latest version (1.3).
NuGet can be installed and updated using the Visual Studio Extension Manager. To check if your copy of Visual Studio already has the NuGet extension, look for Library Package Manager in the Tools menu of your copy of Visual Studio.
see documentation here :
http://nuget.codeplex.com/wikipage?title=Getting%20Started

Resources