a new build error after making change by replacing version=10.0.0.0 with 11.0.0.0 in VS2010

前端 未结 2 1824
抹茶落季
抹茶落季 2021-01-22 18:50

I got the same problem as Build Error + Creating VSTO addin for excel 2010

After making the change according to the solution, I got the new error:

 The          


        
2条回答
  •  礼貌的吻别
    2021-01-22 19:50

    As I encountered the same problem upgrading our build server... I am gonna put the solution here in case anyone needs it.

    I think the way to solve this is to fix your GAC.

    Open the .target file of that tool by notepad and take a look at the UsingTask tag, you should get something like

    Then, go to your GAC files, e.g. C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualStudio.Tools.Office.BuildTasks

    Then, create a new folder: v4.0_11.0.0.0_sthsthsth, which is:

    v<.NETFramework Version, mostly 4.0>__

    And then, put the .dll file of Microsoft.VisualStudio.Tools.Office.BuildTasks in it. This dll should be obtained when you install VSTO either by directly install (VSTO2010) or by Visual Studio installer

    e.g.

    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.BuildTasks.dll

    for Visual Studio 2017 and then directly place the dll inside the folder created

    Then this issue should be fixed. Good luck

提交回复
热议问题