需要将#include <windows.h>放到using namespace System;前面。

#include <windows.h>
using namespace System;

参考:

https://bytes.com/topic/net/answers/668107-managed-lib-into-unmanaged-project

error C2371: 'IServiceProvider' : redefinition; different basic types的更多相关文章

  1. 编译器重复定义错误:error C2371: 'SIZE' : redefinition; different basic types

    我们常常会定义自己工程用的数据类型,可能会与Windows的基本数据类型冲突. vs会报重复定义错误:error C2371: 'SIZE' : redefinition; different bas ...

  2. [C++] Variables and Basic Types

    Getting Started compile C++ program source $ g++ -o prog grog1.cc run C++ program $ ./prog The libra ...

  3. TypeScript学习指南第一章--基础数据类型(Basic Types)

    基础数据类型(Basic Types) 为了搭建应用程序,我们需要使用一些基础数据类型比如:numbers,strings,structures,boolean等等. 在TypeScript中除了Ja ...

  4. A Tour of Go Basic types

    Go's basic types are bool string int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 uintptr ...

  5. QML学习【一】Basic Types

      QML入门教程(1) QML是什么? QML是一种描述性的脚本语言,文件格式以.qml结尾.语法格式非常像CSS(参考后文具体例子),但又支持javacript形式的编程控制.它结合了QtDesi ...

  6. C++编译错误--C++连接redis:编译错误error C2371: “off_t”: 重定义;不同的基类型

    编译错误:对于编译C++调用hiredis编译错误:error C2371: “off_t”: 重定义:不同的基类型,如下图: 可能的解决方案: 1. 因为hiredis预处理器定义了_OFF_T_D ...

  7. [GraphQL] Use GraphQL's Object Type for Basic Types

    We can create the most basic components of our GraphQL Schema using GraphQL's Object Types. These ty ...

  8. Kotlin Reference (四) Basic Types

    most from reference 基本类型 在kotlin中,一切都是对象,我们可以在任何变量上调用成员函数和属性.一些类型可以具有特殊的内部表示:例如,数字.字符和布尔值都可以在运行时被表示为 ...

  9. Kafka topic Schema version mismatch error - org.apache.kafka.common.protocol.types.SchemaException

    Problem description: There is error messge when run spark app using spark streaming Kafka version 0. ...

随机推荐

  1. 模拟登陆github

    import requests from lxml import etree class Login(object): def __init__(self): self.headers = { 'Re ...

  2. 有效使用django的queset

    转载自https://www.oschina.net/translate/django-querysets 对象关系映射 (ORM) 使得与SQL数据库交互更为简单,不过也被认为效率不高,比原始的SQ ...

  3. springmvc 开发流程图

  4. redhat7初始化yum源

    1.卸载原有的yum [app@localhost ~]$ su - root Password: Last :: CST on pts/ [root@localhost ~]# cd /etc/yu ...

  5. oracle insert into 插入多组数据方法总结

    网上好多oracle 的文章,多是以oracle开头,内容确实其他sql,一幅气死人不偿命的嘴脸着实让人难受. 今天就更新点oracle 使用insert into插入数据的方式: 1.oracle ...

  6. ABP代码生成器与升级到VS2017VSIX

    首先,我不是要分享一个代码生成器,而是怎么升级到VS2017,简单介绍下 如何将2015的VSIX项目升级到2017 阳光铭睿 写了一篇<分享一个与ABP配套使用的代码生成器源码>,并在群 ...

  7. XAMARIN 安卓程序闪退问题

    参考:https://forums.xamarin.com/discussion/25780/unfortunately-app-name-has-stopped 在VS 2017中使用Xamarin ...

  8. python 字符串转化为json、post请求

    在json模块有2个方法, loads():将json数据转化成dict数据 dumps():将dict数据转化成json数据 load():读取json文件数据,转成dict数据 dump():将d ...

  9. jquery +ajax 上传加预览

    <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...

  10. 解决vuecli3.0构建的vue2.0项目在IE9可能出现的兼容性问题

    1,unit8Array等未定义问题 解决办法 <1>npm install @babel/polyfill <2>分别在main.js和vuex的主文件 import '@b ...