asp.net-mvc – 当OutputPath设置时,“没有为项目设置OutputPath属性”
|
在MVC4中,如果我为解决方案中的所有项目创建一个新的构建配置,单独构建Web .csproj时,我会得到以下结果: msbuild Company.Directory.Web.csproj /p:Configuration=Dev
但是,OutputPath属性已设置! <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Dev|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<DeployIisAppPath>Port 80/directory/dev</DeployIisAppPath>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)$(MSBuildToolsVersion)Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)$(MSBuildToolsVersion)Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{285FBF79-7933-4AF9-AAAF-25EE7734AAAA}</ProjectGuid>
<ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Company.Directory.Web</RootNamespace>
<AssemblyName>Company.Directory.Web</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>true</UseIISExpress>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
<!-- ... -->
这是一个错误?我该如何解决? 解决方法事实证明,第一个PropertyGroup很重要。 Visual Studio插入新配置(Dev)PropertyGroup之前出于某种原因。我猜它的一个bug。我固定它通过移动新配置后的其他人。<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.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)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{285FBF79-7933-4AF9-AAAF-25EE7734AAAA}</ProjectGuid>
<ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Company.Directory.Web</RootNamespace>
<AssemblyName>Company.Directory.Web</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>true</UseIISExpress>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..</SolutionDir>
<RestorePacCompanyes>true</RestorePacCompanyes>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin</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</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Dev|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
<DeployIisAppPath>Port 80/directory/dev</DeployIisAppPath>
</PropertyGroup>
<!-- ... --> (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- 如何在ASP.NET 4.0应用程序的IIS管理器中添加用户?
- asp.net – 过程或函数“”需要参数“”,这是未提供的
- ASP.NET拒绝尊重我的权限.
- 当通过ASP.NET成员资格检查用户角色时,SemaphoreFullExcept
- asp.net – 在开发系统上禁用OutputCache
- asp.net – 评论未使用的代码会不会给我的页面带来任何方式
- asp.net-mvc-3 – 如何将单选按钮与ASP.Net MVC中的模型数据
- asp.net – 无法从代码隐藏中调用App_Code类
- asp.net-core – 是否可以将NoSQL用于Identity Server 4?
- asp.net-mvc – 在Global.asax中注入依赖项
- asp.net – 将JSON对象反序列化为列表不能使用as
- asp.net-mvc-3 – 应该使用HTTP引用来验证还是令
- asp.net-mvc – 用于Kendo网格模板中的循环
- asp.net – 任何人都有解决Internet上的“n项剩余
- 我如何在ASP.NET MVC中使用Application_Error?
- 在asp.net页面中的CSS粘贴页脚
- asp.net – WebForms中的强类型容器
- 在WCF服务中使用ASP.NET成员资格提供者身份验证
- asp.net-mvc-4 – 如何在MVC 4 w / default simp
- asp.net-mvc-3 – 如何在页面提交ASP.Net MVC时捕
