首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >缺失基准

缺失基准
EN

Stack Overflow用户
提问于 2011-11-29 16:20:10
回答 5查看 11.8K关注 0票数 3

在项目中,我引用了Microsoft.Office.Word.Server,在代码中,我有接受ConversionJob类型参数的方法,但是当我试图编译它时,我有一个错误。

代码语言:javascript
复制
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时,它会让我对类进行防御。

代码语言:javascript
复制
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

溶液

我已经解决了这个问题。我看了看输出,收到了这样的信息:

代码语言:javascript
复制
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中找到解决方案。

EN

回答 5

Stack Overflow用户

回答已采纳

发布于 2011-11-29 16:23:39

检查应用程序的目标框架,可能是为客户端配置文件构建,但引用的程序集需要完整的框架。

票数 6
EN

Stack Overflow用户

发布于 2011-11-29 16:24:57

尝试将“目标框架”更改为".NET Framework4“,而不是".NET Framework4ClientProfile”。

项目属性->应用程序选项卡->目标框架

票数 2
EN

Stack Overflow用户

发布于 2011-11-29 16:25:09

您可能需要删除(确保备份它) GAC文件夹中的12.x.x.x .dll,并确保在解决方案中引用14.x.x.x。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8314109

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档