A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.
The build log shows two separate issues:
-
NETSDK1138: The target framework 'net6.0-windows' is out of support -
MSB4018: ResolvePackageAssets failedbecause it cannot find the fallback NuGet package folder
Address them in this order.
- Fix the out‑of‑support target framework
net6.0-windows is out of support. To bring the project back into support, edit the project file (.csproj or .vbproj) and change the target framework to a supported one, for example:
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
</PropertyGroup>
If changing the target framework is not possible right now and the goal is only to get rid of the warning, add this property instead:
<PropertyGroup>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
</PropertyGroup>
This suppresses NETSDK1138 while still targeting the old framework.
- Fix the NuGet fallback package folder error
The error
Unable to find fallback package folder 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages'
means the SDK is configured to use that path as a fallback package folder, but the folder does not exist on disk.
Use one of these approaches:
- Create the folder manually at
C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackagesand rebuild, or - Remove/adjust the fallback folder configuration (for example, in NuGet.Config or MSBuild properties) so it no longer points to that path.
Once the fallback folder path is valid (or removed) and the project targets a supported framework (or has CheckEolTargetFramework disabled), the ResolvePackageAssets task should complete and the project should build.
The designer message
form does not support code parsing or generation because it is not contained within a project that supports this code
is typically a consequence of the project not loading/building correctly. After fixing the target framework and NuGet configuration so the project builds successfully, close and reopen the solution; the Windows Forms designer should then be able to parse and generate code again.
References: