“GenerateResource” task CLR2 runtime error

后端 未结 8 986
梦毁少年i
梦毁少年i 2020-12-14 01:03

My app keeps getting this error (I\'m using VS 2013, VB.NET, and Windows 8.1, by the way):

Could not run the \"GenerateResource\" task because MSBuild

相关标签:
8条回答
  • 2020-12-14 01:32

    I try adding the follow but didn't works

      <PropertyGroup>
            ...
            <DisableOutOfProcTaskHost>true</DisableOutOfProcTaskHost>
        </PropertyGroup>
    

    this solve this issue for me, adding the same as enviroment Variable

    DisableOutOfProcTaskHost=true

    0 讨论(0)
  • 2020-12-14 01:33

    I encountered this error when trying to build a sample solution that was included in some software that was installed under C:\Program Files\. Visual Studio prompted me to restart with elevated privileges (as it does when opening a solution in a "secure" location), however the build failed with the OP's error message.

    Copying the solution to a "normal" folder (e.g. C:\Temp) solved it for me.

    0 讨论(0)
  • 2020-12-14 01:35

    This fixed the issue on my machine:

    To resolve it, go to your csproj file and add the following line under the default property group:

    <PropertyGroup>
        ...
        <DisableOutOfProcTaskHost>true</DisableOutOfProcTaskHost>
    </PropertyGroup>
    

    Found here.

    0 讨论(0)
  • 2020-12-14 01:38

    I'm using VS 2013, VB.NET, and Windows 10, 64 bits, by the way

    Just change in XML properites , Services : .NET Framework 4.6 instead .Net Framework 2.0 (Default)

    and working fine for me.

    0 讨论(0)
  • 2020-12-14 01:42

    Clean and rebuild solution worked for me.

    0 讨论(0)
  • 2020-12-14 01:42

    Adding this in each project is a cumbersome task. So you can set it in the environment variables.

    Click Start>> Right-click Computer >> Properties >> Advanced system settings >> Click Environment Variables button to open the dialog, then under the System variables section, click New… button, type the Variable name = DISABLEOUTOFPROCTASKHOST, and type the Variable value = 1, then click Ok.

    More here

    0 讨论(0)
提交回复
热议问题