2013-02-23 139 views
0

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

这是我的.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> 

回答

1

您可能需要告诉Azure它应该部署哪个项目,您可以在项目的根目录下使用.deployment文件进行部署。例如

[config] 
project = WebProject/WebProject.csproj 

有关详细信息,请参阅this page

0

听起来像是你试图部署BusinessLayer项目,而不是网站项目。只要您的MVC网站项目有对BusinessLayer的参考,只需部署网站。 BusinessLayer将作为参考。 您无法单独部署BusinessLayer,因为它是一个库而不是应用程序。