Visual Studio Online Error parsing solution file at *.xproj
Visual Studio Online Error parsing solution file at *.xproj
我正在处理一个 AspNet5 项目并尝试使用 VSO 来构建该项目。我正在关注文章 here,但是当我构建 xproj 文件时,我得到 "Error parsing solution file at {ProjectPath}.xproj: Exception has been thrown by the target of an invocation." 如何在不引发此错误的情况下使 MsBuild 步骤达到 运行?
编辑:
我的 xproj 文件几乎完全匹配 xproj here
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>06d62522-2dad-4393-9b90-17d70e275587</ProjectGuid>
<RootNamespace>ProjectNamespace</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin$(MSBuildProjectName)\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
<DevelopmentServerPort>2645</DevelopmentServerPort>
</PropertyGroup>
<ItemGroup>
<DnxInvisibleContent Include="bower.json" />
<DnxInvisibleContent Include=".bowerrc" />
<DnxInvisibleContent Include="package.json" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
我找到了这个问题的答案,这是因为 VSO 自动执行了 NuGet 恢复。在我取消选中 NuGet 恢复后,它工作正常。在教程中有一个添加 'dnu restore' 的步骤,这是恢复包的地方。
啊,找到了。它是 VS 构建步骤的 属性。
我正在处理一个 AspNet5 项目并尝试使用 VSO 来构建该项目。我正在关注文章 here,但是当我构建 xproj 文件时,我得到 "Error parsing solution file at {ProjectPath}.xproj: Exception has been thrown by the target of an invocation." 如何在不引发此错误的情况下使 MsBuild 步骤达到 运行?
编辑: 我的 xproj 文件几乎完全匹配 xproj here
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>06d62522-2dad-4393-9b90-17d70e275587</ProjectGuid>
<RootNamespace>ProjectNamespace</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin$(MSBuildProjectName)\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
<DevelopmentServerPort>2645</DevelopmentServerPort>
</PropertyGroup>
<ItemGroup>
<DnxInvisibleContent Include="bower.json" />
<DnxInvisibleContent Include=".bowerrc" />
<DnxInvisibleContent Include="package.json" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
我找到了这个问题的答案,这是因为 VSO 自动执行了 NuGet 恢复。在我取消选中 NuGet 恢复后,它工作正常。在教程中有一个添加 'dnu restore' 的步骤,这是恢复包的地方。
啊,找到了。它是 VS 构建步骤的 属性。