Home > Net >  "Microsoft" does not exist in the type or namespace name "Office"
"Microsoft" does not exist in the type or namespace name "Office"

Time:11-13

A lot of similar problems, online answer,
Each test, no one can
The mainstream of the answer is: add reference Microsoft Office 11.0 object Library and Microsoft Word 11.0 object Library
But my question is, have made it clear that adding the ah,

Doubts are as follows:
Figure 1 and figure 2 is a computer on the two solutions, figure 1 and figure 2 are exactly the same, but there is something wrong with the figure 2
We can find that: under the Microsoft of figure 1 has five namespaces, figure 2, there are only four namespace that is lack of Office


I reasoned that, since it is the same computer, a solution can be used, it is not the reason why office installation is complete
It may be the reason why
I have looked at, the two solutions for reference if you have any questions, the following figure shows the reference is the same DLL file


Ask ace to reassure

CodePudding user response:

Try to regenerate after cleaning

CodePudding user response:

Prove not correct quote it for you, you look at whether the content within the configuration file is consistent,

CodePudding user response:

reference 1/f, independent observers response:
try to regenerate after cleaning
tried doesn't work

CodePudding user response:

refer to the second floor lorimoon response:
prove not correct quote it for you, you look at whether the content within the configuration file is consistent,

Figure three various attributes are consistent, not means is refer to the same?

CodePudding user response:

references 4 floor 6 lilu9 response:
Quote: refer to the second floor lorimoon response:
prove not correct Quote it for you, you look at whether the content within the configuration file is consistent,

Figure three various attributes are consistent, not means is refer to the same?

This kind of circumstance should be the configuration file shall prevail

CodePudding user response:

You're welcome 32/64

CodePudding user response:

Project environment and.net version is consistent, or through a nuget package are introduced, one is the introduction of local

CodePudding user response:

You use nuget is introduced into a Microsoft excel library
  •  Tags:  
  • C#
  • Related