visual-studio - 从 Visual Studio CLI 构建 SSAS 2016

标签 visual-studio visual-studio-2015 ssas sql-server-data-tools ssas-tabular

无法使用 MSBuild 构建 SSAS 项目。然而,据报道,SSAS 项目可以使用 Visual Studio 或 SSAS Helper 构建。 (description)。

使用 Visual Studio GUI (devenv.exe),我的 SSAS 2016 表格项目的构建确实构建得很好:

Build results of a SSAS Tabular 2016 project in Visual Studio

Visual Studio 还提供了一个用于非交互式使用的 CLI:devenv.com 。然而,虽然我的项目使用 GUI 构建得很好,但在尝试使用 CLI 构建时会抛出错误:

devenv.com build throws error "Object reference not set to an instance of an object"

如何使用 CLI 构建 SSAS 2016 表格项目? devenv.com 是否使用除 devenv.exe 以外的其他库进行构建?

背景/更多信息/尝试:

SSAS Helper 示例 CLI 会产生相同的错误。

The internet doesn't seem to know about this problem ..

我的 smproj 文件如下所示:

<?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)' == '' ">Development</Configuration>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{8CE414BB-95B2-4C99-9E03-51BA72086E22}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <RootNamespace>MyRootNamespace</RootNamespace>
    <AssemblyName>MyAssemblyName</AssemblyName>
    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
    <OutputPath>bin\</OutputPath>
    <Name>ProjectName_Tabular</Name>
    <DeploymentServerName>devserver</DeploymentServerName>
    <DeploymentServerEdition>Developer</DeploymentServerEdition>
    <DeploymentServerVersion>Version_11_0</DeploymentServerVersion>
    <DeploymentServerDatabase>ProjectName_Tabular</DeploymentServerDatabase>
    <DeploymentServerCubeName>Model</DeploymentServerCubeName>
    <DeploymentOptionProcessing>Default</DeploymentOptionProcessing>
    <DeploymentOptionTransactionalDeployment>False</DeploymentOptionTransactionalDeployment>
    <DeploymentOptionDirectQueryMode>InMemory</DeploymentOptionDirectQueryMode>
    <DeploymentOptionQueryImpersonation>Default</DeploymentOptionQueryImpersonation>
    <SccProjectName>SAK</SccProjectName>
    <SccProvider>SAK</SccProvider>
    <SccAuxPath>SAK</SccAuxPath>
    <SccLocalPath>SAK</SccLocalPath>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)' == 'Development' ">
    <OutputPath>bin\Development\</OutputPath>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
    <OutputPath>bin\Release\</OutputPath>
    <DeploymentServerEdition>Enterprise</DeploymentServerEdition>
    <DeploymentOptionProcessing>Full</DeploymentOptionProcessing>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="ProjectName_Tabular.bim">
      <SubType>Code</SubType>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Compile>
  </ItemGroup>
  <Import Project="$(MSBuildExtensionsPath)\Business Intelligence Semantic Model\1.0\Microsoft.AnalysisServices.VSHostBuilder.targets" />
</Project>

最佳答案

使用表格,您可以运行 msbuild。例如,

msbuild TabularProject8.smproj/verbosity:m/target:Rebuild/property:Configuration=Release

关于visual-studio - 从 Visual Studio CLI 构建 SSAS 2016,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41758159/

相关文章:

xaml - 在 Windows 通用应用程序 (UWP) 中使用 Tab 和 Alter Tab 时生成 "global::System.Diagnostics.Debugger.Break()"错误

ssas - 将多维 SSAS 移植到 ICCube。范围()等效?其他差距/问题?

c++ - 如何使用 Visual Studio Express 2005 制作完全静态链接的 .exe?

visual-studio - 如何让 Visual Studio 进入第三方程序集

c++ - 在 Visual Studio 2017 的 Linux 项目中使用静态库

c# - 按空格键时停止默认的自动完成行为

asp.net - 将项目开发提升到一个新的水平

visual-studio-2015 - 如何设置条件断点,而在Visual Studio调试F#

ssas - 基于另一个维度的 MDX 计算维度成员

ssas - 从SSAS中选择​​维度表