首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >csproj缺少根元素

csproj缺少根元素
EN

Stack Overflow用户
提问于 2016-02-01 20:04:32
回答 1查看 6.2K关注 0票数 0

我正在尝试打开一个从Github下载的项目,但是我被告知csproj的根元素丢失了。我试着按照这个链接上的说明

http://www.howtosolutions.net/2013/02/solving-project-file-error-could-not-find-part-of-the-path-with-visual-studio/

但无法更改文件路径。我还被告知,当您删除suo和用户文件时,项目应该打开,但是当删除suo文件时,它没有工作,而且我找不到用户文件。还尝试在我的vm上打开相同的项目,并且在那里正确打开,所以问题必须与我的Visual 2015有关。有人对解决我的问题有什么建议吗?

另外,根据请求,下面是一些csproj文件

代码语言:javascript
复制
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
        <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
        <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
        <ProjectGuid>{DC30CE66-DAEE-4CCF-BD02-8837FE918B6F}</ProjectGuid>
        <OutputType>AppContainerExe</OutputType>
        <AppDesignerFolder>Properties</AppDesignerFolder>
        <RootNamespace>SDKTemplate</RootNamespace>
        <AssemblyName>BarcodeScanner</AssemblyName>
        <DefaultLanguage>en-US</DefaultLanguage>
        <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
        <TargetPlatformVersion>10.0.10586.0</TargetPlatformVersion>
        <TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
        <MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
        <EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>
        <FileAlignment>512</FileAlignment>
        <ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
  </PropertyGroup>
EN

回答 1

Stack Overflow用户

发布于 2016-02-01 23:12:01

如果您还没有忘记最后一行,那么解决方案实际上是非常简单的:您缺少了Project元素的XML结束标记。

在文件的末尾,检查是否存在</Project>,如果没有,请添加它(在</ProjectGroup>行之后),保存该文件,然后尝试使用Visual再次打开它。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35139324

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档