none
The "GenerateOfficeAddInManifest" task was not given a value for the required parameter "TargetFramework". RRS feed

  • Question

  • I was trying to do some updating, from updating the VS C# excel add in solution from VS 2010 to Visual studio 2017.

    The project run correctly without any problem in VS 2010, but in VS 2017 it pops an error saying 

    The "GenerateOfficeAddInManifest" task was not given a value for the required parameter "TargetFramework". 

    Any suggestion to fix this?

    thanks


    Friday, June 9, 2017 8:10 PM

All replies

  • Hello,

    If you create an empty Excel add-in in VS 2010 and open it in VS 2017, would you get any error? 

    Could you please share your migration report here?

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, June 12, 2017 4:55 AM
    Moderator
  • yes

    That is the error I got from open the VS 2010 solution file in VS 2017.

    In more detail, the project was in VS 2010 with framwork 4, so I just open the solution file in VS 2017,  but still using framework 4, it pops this error: 

    Severity Code Description Project File Line Suppression State
    Error The "GenerateOfficeAddInManifest" task was not given a value for the required parameter "TargetFramework".

    I have tried several methods, I also change the framework to 4.6, still got this error.

    Do you have any suggestions?

    thanks


    Tuesday, June 13, 2017 3:32 PM
  • Hi,

    >>The project run correctly without any problem in VS 2016, but it pops an error saying...

    >>That is the error I got from open the VS 2010 solution file in VS 2017.

    I think you mean that you got this issue when you run the project in VS2017 not VS2016, am I right?

    One issue is that when you get this error, just open this VS2010 project in VS2017 or compile/run/debug it in VS2017.

    Based on the error messages, just provide troubleshooting steps:

    (1)For VS2010, please install the VS2010 SP1, and then compile the app using the VS2010, then merge it to VS2017, view the result.

    (2) Please unload the project in your VS2017, and then compare the .xxproj file with the project in VS2010, I mean that please make sure that it doesn't ignore any property or tag, please make sure that you don't custom any MSbuild tasks/event since it seems that GenerateOfficeAddInManifest also was related to the MSbuild: https://msdn.microsoft.com/en-us/library/microsoft.visualstudio.tools.office.buildtasks.generateofficeaddinmanifest.aspx

    (3) Please make sure that your VS2017 has been updated to the latest version, and make sure that you could create the new excel add in solution directly. 

    If you get any latest information, please feel free to share it here.

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, June 14, 2017 2:38 AM
  • Yes, the solution file works fine in VS 2010, but cannot work in VS 2017.

    I have tried your steps above, still not work.

    This is error I got.

    1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(173,9): error MSB4044: The "GenerateOfficeAddInManifest" task was not given a value for the required parameter "TargetFramework".

    You mean compare the .csproj of the project in the solution file that has the error? I do not have the .xxproj file.

    I checked the csproj file, seems though I open the merged solution file in vs2017, but the file is still having this

     <PropertyGroup>
        <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
        <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
      </PropertyGroup>
      <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
      <!-- Include additional build rules for an office application addin -->
      <Import Project="$(VSToolsPath)\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets" Condition="'$(VSToolsPath)' != ''" />
      <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets" Condition="false" />
      <!-- This section defines VSTO properties that describe the host-changable project properties. -->
      <ProjectExtensions />
      <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets" />
    </Project>

    seems still import project using 2010. do you know how to change this?

    Thursday, June 15, 2017 8:30 PM
  • all the projects in my solution file in using Framework 4.0
    Thursday, June 15, 2017 8:40 PM
  • Hi Friend,

    Thanks for your response.

    You are correct, I mean that you could compare the .csproj, but if possible, you could compare your merged project A with the new project B created in VS2017. You know that you could create the Excel 2010 add-in project directly in VS2017 with .NET 4.0.

    For example, if we create new one in VS2017, we will get the csproj file like the following screen shot:

    Actually I feel that you custom certain tags in your old project. But if possible, you could compare yours with the above one, you could remove/change certain tags if your old project has any differences. Or you could share a simple sample using one drive, we will help you debug it in our side.

    Sincerely,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, June 16, 2017 6:53 AM