0

我有一个asp.net mvc 3项目和一个单独的BusinessLayer项目包含在解决方案中。当我尝试通过本地 git 存储库将我的站点部署到 Azure 时,我收到以下错误:'<remote_path>\BusinessLayer\BusinessLayer.csproj' is not a deployable project.. 日志中没有提供其他信息。站点完美地部署在我的本地服务器上。因此,我想至少知道发生此错误的一些可能原因。提前致谢。

如有必要,这是我的 .csproj 文件:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.30703</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{31F2F6FE-10D8-4510-AC61-CBE1962D3940}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>BusinessLayer</RootNamespace>
    <AssemblyName>BusinessLayer</AssemblyName>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
  </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>
  <ItemGroup>
    <Reference Include="MongoDB.Bson">
      <HintPath>..\..\Libs\MongoDB.Bson.dll</HintPath>
    </Reference>
    <Reference Include="MongoDB.Driver">
      <HintPath>..\..\Libs\MongoDB.Driver.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Battle.cs" />
    <Compile Include="BattleManager.cs" />
    <Compile Include="BattlePlace.cs" />
    <Compile Include="Helpers\ConvertHelper.cs" />
    <Compile Include="Helpers\ImageHelper.cs" />
    <Compile Include="Message.cs" />
    <Compile Include="Picture.cs" />
    <Compile Include="Place.cs" />
    <Compile Include="PlaceManager.cs" />
    <Compile Include="Subject.cs" />
    <Compile Include="User.cs" />
    <Compile Include="Helpers\DBHelper.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
4

2 回答 2

1

您可能需要确切地告诉 Azure 它应该部署哪个项目,您可以使用项目根目录中的 .deployment 文件来执行此操作。例如

[config]
project = WebProject/WebProject.csproj

请参阅此页面以获取有关此内容的更多信息。

于 2013-02-23T22:20:51.987 回答
0

听起来您正在尝试部署 BusinessLayer 项目而不是 Website 项目。只要你的 MVC 站点项目有对 BusinessLayer 的引用,部署网站即可。BusinessLayer 将作为参考包含在内。您不能单独部署 BusinessLayer,因为它是一个库而不是应用程序。

于 2013-02-23T16:50:19.640 回答