How to create an Office add-in without registering with the build system?

We create Office 2007 add-ins using Visual Studio 2008. Our builds are performed using a continuous integration server (one computer), which builds every time we check for changes or manually request them. The server can perform simultaneous assemblies.

We noticed that when Visual Studio 2008 creates the Office 2007 add-in, it also registers it with the build system, although Office is not installed on the integration server.

Does anyone know how to prevent Visual Studio 2008 from registering an add-in when creating it?

+3
source share
1 answer

, MSBuild Office 2007, , VSTOClean.

, MSBuild (master.proj), , :

<Project 
  DefaultTargets="Build" 
  xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >
  <PropertyGroup>
    <WorkingDirectory>C:\BASE_DIR\</WorkingDirectory>
  </PropertyGroup>

  <ItemGroup>
    <VstoProject Include = "$(WorkingDirectory)OfficeAddInProject1.csproj"/>
    <VstoProject Include = "$(WorkingDirectory)OfficeAddInProject1.csproj"/>
  </ItemGroup>

  <Target Name="Build">
    <MSBuild Projects="@(VstoProject)" Targets="Build;VSTOClean" />
  </Target>
</Project>

Update: , , (VSTO_ProjectType). , . , . , , , . CI MSBuild , VS .

<Project 
  DefaultTargets="Build" 
  xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >
  <PropertyGroup>
    <WorkingDirectory>C:\BASE_DIR\</WorkingDirectory>
  </PropertyGroup>

  <ItemGroup>
    <VstoProject Include = "$(WorkingDirectory)OfficeAddInProject1.csproj"/>
    <VstoProject Include = "$(WorkingDirectory)OfficeAddInProject1.csproj"/>
  </ItemGroup>

  <Target Name="Build">
    <MSBuild 
        Projects="@(VstoProject)" 
        Targets="Build" 
        Properties="VSTO_ProjectType=Custom" />
  </Target>
</Project>
+1

Source: https://habr.com/ru/post/1734623/


All Articles