纵有疾风起
人生不言弃

在.NET中把项目从类库转为Web应用程序

我们知道,在.NET中所有的项目文件以.csproj为扩展名。内容是xml格式。

类库项目文件.csproj:

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">    <PropertyGroup>      <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>      <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>      <ProductVersion>8.0.50727</ProductVersion>      <SchemaVersion>2.0</SchemaVersion>      <ProjectGuid>{9A693F59-9C63-4424-A98D-D69A801C7614}</ProjectGuid>  

  

Web Application 项目文件.csproj:

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">    <PropertyGroup>      <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>      <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>      <ProductVersion>8.0.50727</ProductVersion>      <SchemaVersion>2.0</SchemaVersion>      <ProjectGuid>{9A693F59-9C63-4424-A98D-D69A801C7614}</ProjectGuid>         <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>             <OutputType>Library</OutputType>  

  

要把类库项目转为web Application项目只需把

<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>

拷贝<ProjectGuid>下面即可。

 

文章转载于:https://www.cnblogs.com/kingboy2008/p/3725894.html

原著是一个有趣的人,若有侵权,请通知删除

未经允许不得转载:起风网 » 在.NET中把项目从类库转为Web应用程序
分享到: 生成海报

评论 抢沙发

评论前必须登录!

立即登录