繁体   English   中英

.CSProj文件中没有项目类型向导

[英]No project Type Guid in .CSProj file

这是我第一次遇到这样的事情。 在最长的时间内,只要我想确切地知道项目的类型,我都会使用以下链接中提供的指导:

如何从现有的Visual Studio项目中分辨Visual Studio项目类型

到目前为止,它对我来说一直很好。 但是,我遇到了一个项目,其中没有提到ProjectType。 以下是.csProj文件的XML供参考。

<PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{87F6C2DE-6074-4E6D-9854-51EC812F7548}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>PL.HR.Services.Employee.DAL</RootNamespace>
    <AssemblyName>PL.HR.Services.Employee.DAL</AssemblyName>
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <SccProjectName>SAK</SccProjectName>
    <SccLocalPath>SAK</SccLocalPath>
    <SccAuxPath>SAK</SccAuxPath>
    <SccProvider>SAK</SccProvider>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>

我不确定怎么会这样

  • 是否可以在没有任何人手动从.csproj文件中删除类型信息的情况下进行?
  • 如果不是,那么在什么情况下VS会发生这种情况?
  • 我们有什么办法可以防止将来发生这种情况?

您是在查看xml还是在实际使用VS提供的服务来获取此信息?

真的是有效的.csproj吗? 还是只是一个名为.csproj的东西,所以VS可以打开它? VS实际打开它没有错误吗?

某些类型的项目(例如C ++项目)不将项目类型guid 用作项目文件中的xml元素 ,但是这些项目通常不以.csproj结尾。 这些类型的项目可以通过其他方式来实现,这些方式可以在IVsHierarchyIVsAggregatableProjectIVsHierarchy ,因此您需要通过代码来完成它,就像链接答案中的其中一页所解释的那样。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM