簡體   English   中英

在Visual Studio Community 2015 RC中發布編譯VSIX項目的問題

[英]Issue compiling VSIX project in Visual Studio Community 2015 RC

我試圖創建Visual Studio VSIX擴展,並且在使用3個“ Dependencies”(它們是同一解決方案中的C#類庫)進行編譯時遇到問題:

錯誤MSB4057:項目中不存在目標“ VSIXContainerProjectOutputGroup”。

錯誤MSB4057:項目中不存在目標“ VSIXContainerProjectOutputGroup”。

錯誤MSB4057:項目中不存在目標“ VSIXContainerProjectOutputGroup”。

所有三個程序集均設置為“在此VSIX中嵌入”,並且embed文件夾設置為“ /”; 這是“ source.extension.vsixmanifest”文件中的XML:

<Dependencies>
    <Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="4.6" d:InstallSource="Download" />
    <Dependency d:Source="Project" d:ProjectName="Networking" d:InstallSource="Embed" Version="0.5" Location="|Networking;VSIXContainerProjectOutputGroup|" DisplayName="|Networking;VSIXNameProjectOutputGroup|" Id="|Networking;VSIXIdentifierProjectOutputGroup|" d:VsixSubPath="/" />
    <Dependency d:Source="Project" d:ProjectName="Utilities" d:InstallSource="Embed" Location="|Utilities;VSIXContainerProjectOutputGroup|" DisplayName="|Utilities;VSIXNameProjectOutputGroup|" Id="|Utilities;VSIXIdentifierProjectOutputGroup|" d:VsixSubPath="/" />
    <Dependency d:Source="Project" d:ProjectName="Data Model" Version="1.0" d:InstallSource="Embed" d:VsixSubPath="/" Location="|Data Model;VSIXContainerProjectOutputGroup|" DisplayName="|Data Model;VSIXNameProjectOutputGroup|" Id="|Data Model;VSIXIdentifierProjectOutputGroup|" />
  </Dependencies>

該代碼需要放在單獨的程序集中,以便其他項目可以引用。

我已經嘗試過 MSDN論壇問題中提到的兩個建議,但都沒有起作用。

還有另一個不太麻煩但可能相關的問題正在發生:每隔一段時間,這三個項目中的類和名稱空間似乎消失了,我必須刪除並重新添加對它們的引用。

解決這些問題的任何幫助將不勝感激; 請讓我知道是否可以提供其他信息來幫助解決它們。

編輯

我嘗試在發布模式下重新編譯,以查看是否是特定於配置的問題,但沒有任何更改。

我設法通過在擴展項目的csproj文件中刪除為項目引用指定OutputGroupsIncludedInVSIXOutputGroupsIncludedInVSIXLocal的行,並在vsixmanifest文件中將庫更改為“ Assets”而不是“ Dependencies”,從而解決了該問題。

希望這對其他遇到相同問題的人有所幫助。

如果任何依賴項是netstandard2.0;net462中的多目標.NET核心框架庫(即netstandard2.0;net462 ),則會出現此錯誤:

錯誤:c:\\ path \\ to \\ depproj.csproj:錯誤MSB4057:項目中不存在目標“ BuiltProjectOutputGroupDependencies”

添加:

<AdditionalProperties>TargetFramework=net462</AdditionalProperties>

作為項目參考節點中的.csproj文件的附加屬性。

<ProjectReference Include="..\path\to\deprpoj.csproj">
    <Project>{81eab942-30aa-445e-86d6-ad6becdf804c}</Project>
       <Name>Your.Project.Name</Name>   
    <AdditionalProperties>TargetFramework=net462</AdditionalProperties>
</ProjectReference>

暫無
暫無

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

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