在項目中,我有參考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?)
但是當ConversionJob一個按F12就tooks我到類defenition
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 Framework 3.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>"
我試圖找到在谷歌的解決方案和 - >http://www.sanderstechnology.com/2011/warning-msb3268-you-are-about-to-experience-pain/10646/#.TtYrXGP20Z8
最近你做了一個乾淨的構建嗎? –
是的,我嘗試首先清理,然後構建所有解決方案 –