[英]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>
我不確定怎么會這樣
您是在查看xml還是在實際使用VS提供的服務來獲取此信息?
真的是有效的.csproj嗎? 還是只是一個名為.csproj的東西,所以VS可以打開它? VS實際打開它沒有錯誤嗎?
某些類型的項目(例如C ++項目)不將項目類型guid 用作項目文件中的xml元素 ,但是這些項目通常不以.csproj結尾。 這些類型的項目可以通過其他方式來實現,這些方式可以在IVsHierarchy
和IVsAggregatableProject
中IVsHierarchy
,因此您需要通過代碼來完成它,就像鏈接答案中的其中一頁所解釋的那樣。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.