在项目中,我引用了Microsoft.Office.Word.Server,在代码中,我有接受ConversionJob类型参数的方法,但是当我试图编译它时,我有一个错误。
The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
The type or namespace name 'ConversionJob' could not be found (are you missing a using directive or an assembly reference?) 但是,当按下f12 on ConversionJob时,它会让我对类进行防御。
using Microsoft.Office.Word.Server.Service;
using Microsoft.SharePoint;
using System;
namespace Microsoft.Office.Word.Server.Conversions
{
public class ConversionJob
{
public ConversionJob(WordServiceApplicationProxy serviceApplicationProxy, ConversionJobSettings settings);
public ConversionJob(WordServiceApplicationProxy serviceApplicationProxy);..。

怎么啦?
目标框架是.Net Framework3.5
溶液
我已经解决了这个问题。我看了看输出,收到了这样的信息:
Microsoft.Common.targets(1360,9): warning MSB3268: The primary reference "<assembly reference>" could not be resolved because it has an indirect dependency on the framework assembly "<assembly" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v3.5". To resolve this problem, either remove the reference "<assembly>" or retarget your application to a framework version which contains "<assembly>"我试图在google和-> http://www.sanderstechnology.com/2011/warning-msb3268-you-are-about-to-experience-pain/10646/#.TtYrXGP20Z8中找到解决方案。
发布于 2011-11-29 16:23:39
检查应用程序的目标框架,可能是为客户端配置文件构建,但引用的程序集需要完整的框架。
发布于 2011-11-29 16:24:57
尝试将“目标框架”更改为".NET Framework4“,而不是".NET Framework4ClientProfile”。
项目属性->应用程序选项卡->目标框架

发布于 2011-11-29 16:25:09
您可能需要删除(确保备份它) GAC文件夹中的12.x.x.x .dll,并确保在解决方案中引用14.x.x.x。
https://stackoverflow.com/questions/8314109
复制相似问题