Step 1: Manually open the project file with the text Editing tool ". csproj" Step 2: Add "<ProjectTypeGuids>" and "<Import>" nodes
<?XML version= "1.0" encoding= "Utf-8"?><ProjectToolsVersion= "12.0"DefaultTargets= "Build"xmlns= "http://schemas.microsoft.com/developer/msbuild/2003"> <ImportProject= "$ (msbuildextensionspath) \$ (msbuildtoolsversion) \microsoft.common.props"Condition= "Exists (' $ (msbuildextensionspath) \$ (msbuildtoolsversion) \microsoft.common.props ')" /> <PropertyGroup> <ConfigurationCondition= "' $ (Configuration) ' = = '">Debug</Configuration> <PlatformCondition= "' $ (Platform) ' = = '">AnyCPU</Platform> <ProjectGuid>{06ae699e-ee6c-4ff2-ac4a-4cd653cf256e}</ProjectGuid> <projecttypeguids>{349C5851-65DF-11DA-9384-00065B846F21}; {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} </ Projecttypeguids > </PropertyGroup> <ImportProject= "$ (MSBuildToolsPath) \microsoft.csharp.targets" /> <Import Project= "$ (vstoolspath) \webapplications\ Microsoft.WebApplication.targets " Condition=" ' $ (vstoolspath) '! = ' ' " />< Import Project= "$ (MSBuildExtensionsPath32) \microsoft\visualstudio\v10.0\ Webapplications\microsoft.webapplication.targets " Condition=" false " /> </Project>
Description: Test passed in Visual Studio 2013, other versions not tested.
C # class Library project manually turned into an ASP. NET WEB Application project