属性'OutputPath'的加载失败。输入的路径不是有效的输出路径 [英] Load of property 'OutputPath' failed. the entered path is not a valid output path
问题描述
我遇到以下问题:
在我的csproj中,我使用的是变量,我已在外部属性文件中声明。为了引用它,我导入了这个属性文件。
属性文件:
<? xml < span class =code-summarycomment> version = 1.0 编码 = utf-8 ? >
< 项目 xmlns = http:// schemas。 microsoft.com/developer/msbuild/2003\">
< PropertyGroup >
<! - 参考路径 - >
< REFERENCE_PATH_bla 条件 = '$(REFERENCE_PATH_bla)'=='' > $(bla_HOME) < / REFERENCE_PATH_bla >
< TC_REFERENCE_PATH_bla > $ (REFERENCE_PATH_bla)\ bla < < span class =code-leadattribute> / TC_REFERENCE_PATH_bla >
< DLL_INTEROPS_REFERENCE_PATH_bla > $(REFERENCE_PATH_bla)\\\ InterInterops < / DLL_INTEROPS_REFERENCE_PATH_bla >
< COMMONLIBS_REFERENCE_PATH_bla > $(REFERENCE_PATH_bla)\ ltlibs < / COMMONLIBS_REFERENCE_PATH_bla >
< / PropertyGroup >
< Pro pertyGroup >
<! - 构建输出路径 - >
< BUILD_OUTPUTPATH_bla 条件 = '$(BUILD_OUTPUTPATH_bla)'=='' > $(SolutionDir).. \\\\Build\AutomationBuild < / BUILD_OUTPUTPATH_bla >
< BUILD_OUTPUTPATH_bla > $(BUILD_OUTPUTPATH_bla)\Automation < / BUILD_OUTPUTPATH_bla >
< BUILD_OUTPUTPATH_bla_ADDINS > $(BUILD_OUTPUTPATH_bla)\ bla \ AddIns < / BUILD_OUTPUTPATH_bla_ADDINS >
< / PropertyGroup >
< / Project >
csproj:
<? xml version = 1.0 encoding = utf-8 ? >
< 项目 ToolsVersion = 4.0 DefaultTargets = 构建 xmlns = http://schemas.microsoft.com/developer/msbuild/2003 >
< 导入 项目 = $(SolutionDir).. \..\Build \Properties\bla.Build.Output.Properties / >
< PropertyGroup >
< 配置 条件 = '$(配置)'=='' > 调试< / Configuration >
< 平台 条件 = '$(平台)'=='' > AnyCPU < /平台 >
< span class =code-keyword>< ProductVersion > 8.0.30703 < span class =code-keyword>< / ProductVersion >
< SchemaVersion > 2.0 < span class =code-keyword>< / SchemaVersion >
< ProjectGuid > {bla} < / ProjectGuid >
< OutputType > 库< / OutputType >
< AppDesignerFolder > 属性< / AppDesignerFolder >
< RootNamespace > bla.Automation < / RootNamespace 跨度> >
< AssemblyName > bla.Automation.Creation < / AssemblyName >
< TargetFrameworkVersion > v3.5 < / TargetFrameworkVersion >
< FileAlignment > 512 < / FileAlignment >
< TargetFrameworkProfile 跨度> / >
< / PropertyGroup >
< PropertyGroup 条件 = '$(配置)| $(平台)'= ='调试| AnyCPU' >
< DebugSymbols > true < / DebugSymbols >
< DebugType > 完整< span class =code-keyword>< / DebugType >
< 优化 > false < span class =code-keyword>< / Optimize >
< OutputPath > $( BUILD_OUTPUTPATH_bla)\ Framework \ < / OutputPath > ;
< DefineConstants > DEBUG; TRACE < / DefineConstants >
< ErrorReport > 提示< / ErrorReport >
(。 ..)
现在,在解决方案启动时,我得到一堆警告告诉我:
物业负荷''OutputPath''失败。输入的路径不是有效的输出路径。
此外,当我尝试构建我的解决方案时,我得到:
无法运行任务cmd.exe。输入的路径不是有效的输出路径。
我很确定,这与我使用的变量这一事实有关没有解决。 (Resharper告诉我,它没有定义。
有什么想法吗?
(REFERENCE_PATH_bla) '=='' >
(bla_HOME) < / REFERENCE_PATH_bla >
< TC_REFERENCE_PATH_bla >
(REFERENCE_PATH_bla)\ bla < / TC_REFERENCE_PATH_bla >
< DLL_INTEROPS_REFERENCE_PATH_bla > ; 跨度>
Hi,
I ve got the following problem:
Within my csproj I use a variable, I ve declared in an external properties file. To reference it, I ve imported this properties file.
properties file:
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Reference Paths -->
<REFERENCE_PATH_bla Condition="'$(REFERENCE_PATH_bla)' == ''">$(bla_HOME)</REFERENCE_PATH_bla>
<TC_REFERENCE_PATH_bla>$(REFERENCE_PATH_bla)\bla</TC_REFERENCE_PATH_bla>
<DLL_INTEROPS_REFERENCE_PATH_bla>$(REFERENCE_PATH_bla)\dll\Interops</DLL_INTEROPS_REFERENCE_PATH_bla>
<COMMONLIBS_REFERENCE_PATH_bla>$(REFERENCE_PATH_bla)\libs</COMMONLIBS_REFERENCE_PATH_bla>
</PropertyGroup>
<PropertyGroup>
<!-- Build Ouput Paths -->
<BUILD_OUTPUTPATH_bla Condition="'$(BUILD_OUTPUTPATH_bla)' == ''">$(SolutionDir)..\..\Build\AutomationBuild</BUILD_OUTPUTPATH_bla>
<BUILD_OUTPUTPATH_bla>$(BUILD_OUTPUTPATH_bla)\Automation</BUILD_OUTPUTPATH_bla>
<BUILD_OUTPUTPATH_bla_ADDINS>$(BUILD_OUTPUTPATH_bla)\bla\AddIns</BUILD_OUTPUTPATH_bla_ADDINS>
</PropertyGroup>
</Project>
csproj:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SolutionDir)..\..\Build\Properties\bla.Build.Output.Properties" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{bla}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>bla.Automation</RootNamespace>
<AssemblyName>bla.Automation.Creation</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>$(BUILD_OUTPUTPATH_bla)\Framework\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
(...)
Now, on Solution-startup I get a bunch of warnings that tell me:
Load of property ''OutputPath'' failed. The entered path is not a valid output path.
Additionally when I try to build my solution I get:
The task cmd.exe could not be run. The entered path is not a valid output path.
I am quite sure, that this is all related to the fact, that the variable I use can not be solved. (Resharper tells me, that it is not defined.
Any idea?
(REFERENCE_PATH_bla)' == ''">
(bla_HOME)</REFERENCE_PATH_bla> <TC_REFERENCE_PATH_bla>
(REFERENCE_PATH_bla)\bla</TC_REFERENCE_PATH_bla> <DLL_INTEROPS_REFERENCE_PATH_bla>
这篇关于属性'OutputPath'的加载失败。输入的路径不是有效的输出路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!