簡體   English   中英

Microsoft.VisualStudio.SharePoint.targets(416):無法加載文件或程序集'Microsoft.VisualStudio.SharePoint.Designers.Model

[英]Microsoft.VisualStudio.SharePoint.targets (416): Could not load file or assembly 'Microsoft.VisualStudio.SharePoint.Designers.Model

我正在嘗試設置tfs和sharepoint之間的構建集成。

我們有一個單獨的構建服務器。 我們已按照這些步驟檢查它們的正確性3次。 但是在sharepoint版本上,我們一直有這個錯誤。 是的,構建服務器上存在文件。

C:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v11.0\\SharePointTools\\Microsoft.VisualStudio.SharePoint.targets (416): Could not load file or assembly 'Microsoft.VisualStudio.SharePoint.Designers.Models, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified

請指教。

更新1:1。當我從構建定義中刪除.SLN並逐個添加csproj時,構建完成但我收到每個項目的警告(10次)C:\\ Windows \\ Microsoft.NET \\ Framework64 \\ v4 .0.30319 \\ Microsoft.Common.targets(610):沒有為項目'Pwc.SP.DMS.CLF.CustomContentField.csproj'設置OutputPath屬性。 請檢查以確保您為此項目指定了Configuration和Platform的有效組合。 Configuration ='Debug'Platform ='任何CPU'。 您可能會看到此消息,因為您正在嘗試構建沒有解決方案文件的項目,並指定了此項目不存在的非默認配置或平台

我設置/ p:IsPackaging = true但是在drop文件夾中我只看到日志文件,沒有wsps或dll。

如果我刪除csproj並添加.sln然后我再次收到此錯誤:

C:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v11.0\\SharePointTools\\Microsoft.VisualStudio.SharePoint.targets (416): Could not load file or assembly 'Microsoft.VisualStudio.SharePoint.Designers.Models, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified

如果將程序集復制到構建服務器,則可能未復制Microsoft.VisualStudio.SharePoint.Designers.Models所依賴的所有程序集。 我會使用Reflector或某種反匯編程序來查看依賴項。 一旦你擁有它們,你應該停止看到加載問題。 有時,該問題與構建服務器上運行的進程的體系結構有關。

我會在構建服務器上使用msbuild手動構建解決方案或項目,即

msbuild a.sln / p:OutDir = e:\\ dir \\ / p:Configuration = Release / p:Platform =“Any CPU”

msbuild a.csproj / p:OutDir = e:\\ dir \\ / p:Configuration = Release / p:Platform = AnyCPU

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM