Sysprogs forums › Forums › VisualGDB › Build: MSB3644 Reference assemblies for .NETFramework,Version=v4.0 not found
Tagged: VisualGDB Build Error
- This topic has 3 replies, 2 voices, and was last updated 4 years ago by support.
-
AuthorPosts
-
November 5, 2020 at 04:17 #29444matthiasmParticipant
Hi,
I created a custom visualGDB project. Build occurs on a remote build machine, by a call to a script.
Whenever i try to build withing VS 2019, the following error occurs:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for .NETFramework,Version=v4.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
1>Done building project “Allspark_CCU.vcxproj” — FAILED.When i trigger build, no access to the remote machine happens. During setup of the project access was possible.
I installed every Version of the .NET Framework, that can be installed on Windows 10. I’m seriously wondering whats going on here, because the vcxproj contains the correct statements:
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>Makefile</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v142</PlatformToolset> <CLRSupport>false</CLRSupport> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>Makefile</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PlatformToolset>v142</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <NMakeForcedIncludes>$(ProjectDir)\gcc_Debug.h;$(VISUALGDB_DIR)\gcc_compat.h;$(NMakeForcedIncludes)</NMakeForcedIncludes> <NMakePreprocessorDefinitions>__VisualGDB_CFG_Debug;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions> <NMakeBuildCommandLine>"$(VISUALGDB_DIR)\VisualGDB.exe" /build "$(ProjectPath)" "/solution:$(SolutionPath)" "/config:$(Configuration)" "/platform:$(Platform)"</NMakeBuildCommandLine> <NMakeCleanCommandLine>"$(VISUALGDB_DIR)\VisualGDB.exe" /clean "$(ProjectPath)" "/solution:$(SolutionPath)" "/config:$(Configuration)" "/platform:$(Platform)"</NMakeCleanCommandLine> <NMakeReBuildCommandLine>"$(VISUALGDB_DIR)\VisualGDB.exe" /rebuild "$(ProjectPath)" "/solution:$(SolutionPath)" "/config:$(Configuration)" "/platform:$(Platform)"</NMakeReBuildCommandLine> <NMakeOutput>$(ProjectDir)Allspark_CCU-Debug.vgdbsettings</NMakeOutput> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <NMakeForcedIncludes>$(ProjectDir)\gcc_Release.h;$(VISUALGDB_DIR)\gcc_compat.h;$(NMakeForcedIncludes)</NMakeForcedIncludes> <NMakePreprocessorDefinitions>__VisualGDB_CFG_Release;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions> <NMakeBuildCommandLine>"$(VISUALGDB_DIR)\VisualGDB.exe" /build "$(ProjectPath)" "/solution:$(SolutionPath)" "/config:$(Configuration)" "/platform:$(Platform)"</NMakeBuildCommandLine> <NMakeCleanCommandLine>"$(VISUALGDB_DIR)\VisualGDB.exe" /clean "$(ProjectPath)" "/solution:$(SolutionPath)" "/config:$(Configuration)" "/platform:$(Platform)"</NMakeCleanCommandLine> <NMakeReBuildCommandLine>"$(VISUALGDB_DIR)\VisualGDB.exe" /rebuild "$(ProjectPath)" "/solution:$(SolutionPath)" "/config:$(Configuration)" "/platform:$(Platform)"</NMakeReBuildCommandLine> <NMakeOutput>$(ProjectDir)Allspark_CCU-Release.vgdbsettings</NMakeOutput> </PropertyGroup>
.NET Projects, or VC++ Projects can be built without problems.
Can you help me?
Best regards
Matthias
November 5, 2020 at 10:34 #29450supportKeymasterNo problem. This looks like a legacy VisualGDB project type that is internally implemented as a NMake-based VC++ project. You can try narrowing down the problem by creating a regular VC++ Makefile project via the VC++ project wizard and setting a dummy build command (e.g. “cmd /c echo done“). If it breaks the same way, please try checking with Visual Studio support.
If the VisualGDB-based project behaves differently from the regular NMake project, please try comparing and merging the .vcxproj files. Some element (e.g. PlatformToolset) could be set differently in these 2 projects and could be causing this behavior.
Also, for most of the new project setups we recommend using Advanced CMake projects. They do not require the VC++ project subsystem and often work more reliably.
November 5, 2020 at 22:50 #29453matthiasmParticipantThank you, i’ll try that. But i installed the most recent VisualGDB yesterday, and also initially created the project yesterday. How is it possible, that this is already outdated?
November 5, 2020 at 23:02 #29454supportKeymasterNo problem, we will clarify. VisualGDB supports many different project types. Some of them (like MSBuild or Advanced CMake) are recommended for new setups, while others (like Makefile-based) are considered legacy and are only recommended if you need backward compatibility with older VisualGDB versions, or projects that were created earlier.
-
AuthorPosts
- You must be logged in to reply to this topic.