Skip to content

Instantly share code, notes, and snippets.

@jozefizso
Created November 16, 2022 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jozefizso/b0ce227e2824a2ac9ecccd2ecd167567 to your computer and use it in GitHub Desktop.
Save jozefizso/b0ce227e2824a2ac9ecccd2ecd167567 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" 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>
<ProjectGuid>{5FA9CC46-E381-428D-9799-814B63FD8135}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Excel371</RootNamespace>
<AssemblyName>Excel371</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="ExcelApi, Version=1.9.1.0, Culture=neutral, PublicKeyToken=297f57b43ae7c1de, processorArchitecture=MSIL">
<HintPath>packages\NetOfficeFw.Excel.1.9.1\lib\net462\ExcelApi.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="NetOffice, Version=1.9.1.0, Culture=neutral, PublicKeyToken=297f57b43ae7c1de, processorArchitecture=MSIL">
<HintPath>packages\NetOfficeFw.Core.1.9.1\lib\net462\NetOffice.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="OfficeApi, Version=1.9.1.0, Culture=neutral, PublicKeyToken=297f57b43ae7c1de, processorArchitecture=MSIL">
<HintPath>packages\NetOfficeFw.Office.1.9.1\lib\net462\OfficeApi.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>packages\stdole.7.0.3300\lib\net10\stdole.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="VBIDEApi, Version=1.9.1.0, Culture=neutral, PublicKeyToken=297f57b43ae7c1de, processorArchitecture=MSIL">
<HintPath>packages\NetOfficeFw.VBIDE.1.9.1\lib\net462\VBIDEApi.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Attempting to gather dependency information for package 'NetOfficeFw.Excel.1.9.1' with respect to project 'Excel371', targeting '.NETFramework,Version=v4.8'
Gathering dependency information took 17 ms
Attempting to resolve dependencies for package 'NetOfficeFw.Excel.1.9.1' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'NetOfficeFw.Excel.1.9.1'
Resolved actions to install package 'NetOfficeFw.Excel.1.9.1'
Adding package 'NetOfficeFw.Core.1.9.1' to folder 'D:\dev\github\NetOfficeFw\Excel371\packages'
Added package 'NetOfficeFw.Core.1.9.1' to folder 'D:\dev\github\NetOfficeFw\Excel371\packages'
Added package 'NetOfficeFw.Core.1.9.1' to 'packages.config'
Successfully installed 'NetOfficeFw.Core 1.9.1' to Excel371
Adding package 'stdole.7.0.3300' to folder 'D:\dev\github\NetOfficeFw\Excel371\packages'
Added package 'stdole.7.0.3300' to folder 'D:\dev\github\NetOfficeFw\Excel371\packages'
Added package 'stdole.7.0.3300' to 'packages.config'
Successfully installed 'stdole 7.0.3300' to Excel371
Adding package 'NetOfficeFw.Office.1.9.1' to folder 'D:\dev\github\NetOfficeFw\Excel371\packages'
Added package 'NetOfficeFw.Office.1.9.1' to folder 'D:\dev\github\NetOfficeFw\Excel371\packages'
Added package 'NetOfficeFw.Office.1.9.1' to 'packages.config'
Successfully installed 'NetOfficeFw.Office 1.9.1' to Excel371
Adding package 'NetOfficeFw.VBIDE.1.9.1' to folder 'D:\dev\github\NetOfficeFw\Excel371\packages'
Added package 'NetOfficeFw.VBIDE.1.9.1' to folder 'D:\dev\github\NetOfficeFw\Excel371\packages'
Added package 'NetOfficeFw.VBIDE.1.9.1' to 'packages.config'
Successfully installed 'NetOfficeFw.VBIDE 1.9.1' to Excel371
Adding package 'NetOfficeFw.Excel.1.9.1' to folder 'D:\dev\github\NetOfficeFw\Excel371\packages'
Added package 'NetOfficeFw.Excel.1.9.1' to folder 'D:\dev\github\NetOfficeFw\Excel371\packages'
Added package 'NetOfficeFw.Excel.1.9.1' to 'packages.config'
Successfully installed 'NetOfficeFw.Excel 1.9.1' to Excel371
Executing nuget actions took 788 ms
Time Elapsed: 00:00:00.9226735
========== Finished ==========
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NetOfficeFw.Core" version="1.9.1" targetFramework="net48" />
<package id="NetOfficeFw.Excel" version="1.9.1" targetFramework="net48" />
<package id="NetOfficeFw.Office" version="1.9.1" targetFramework="net48" />
<package id="NetOfficeFw.VBIDE" version="1.9.1" targetFramework="net48" />
<package id="stdole" version="7.0.3300" targetFramework="net48" />
</packages>
using System;
namespace Excel371
{
internal class Program
{
static void Main(string[] args)
{
// error CS1752: Interop type 'Core' cannot be embedded. Use the applicable interface instead.
NetOffice.Core.Default.Console.WriteLine("NetOffice bug #371");
// error CS1752: Interop type 'Application' cannot be embedded. Use the applicable interface instead.
var app = new NetOffice.ExcelApi.Application();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment