You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dotnet build fails on Plugins following install of Visual Studio 2026 November 2026 FU (18.12.0) #1519
Describe the bug
Following installation of Visual Studio 2026 November 2026 Feature Update, build fails on plugin projects creating the nupkg.
C:\Temp\newplugin>dotnet build
C:\Temp\newplugin\newplugin.csproj net48 Restore
Restore complete (2.7s)
newplugin net48 failed with 1 error(s) (2.9s) → bin\Debug\net48\publish\
C:\Program Files\dotnet\sdk\11.0.100\NuGet.Build.Tasks.Pack.targets(232,5): error NU5017: Cannot create a package that has no dependencies nor content.
Build failed with 1 error(s) in 7.5s
To Reproduce
Was running Visual Studio 2026 18.11.3
Created new plugin using pac plugin init, followed by a dotnet build, build completes fine.
Update Visual Studio 18.12.0, dotnet build results in the above error.
Inspecting the created nupkg file, it's created without the lib folder containing the plugin assembly.
Rollback Visual Studio, dotnet build succeeds.
Proves the issue was caused by changes in the latest Visual Studio update?
Expected behavior
The nupkg file should be created correctly following the update.
changed the title [-]Dotnet build fails on Plugins following install of Visual Studio 2026 November 2026 FU (12.12.0)[/-][+]Dotnet build fails on Plugins following install of Visual Studio 2026 November 2026 FU (18.12.0)[/+]on Nov 12, 2026
Bit of an update. The build fails when version 11.0 of the SDK is being used, If you use a global.json file to lock the build to version 10.0, builds work.
The Microsoft.PowerApps.MSBuild.Plugin package needs updating to support the new SDK version.
We hit the same issue in our CI pipeline after the hosted windows-2025 image 20261111.331 added .NET SDK 11.0.100. The plugin package was built withoutlib/net462, the build stayed green (only warning NU5128, because our package has dependencies), and the solution import then failed with:
Import failed: No supported target framework folder found in package. Supported dotnet frameworks are 'net48', 'net471' and 'net462'.
Root cause
It's an interaction between Microsoft.PowerApps.MSBuild.Plugin and a NuGet pack change that shipped in SDK 11.0.100:
Microsoft.PowerApps.MSBuild.Plugin.targets registers GetTfmPublishedFiles in TargetsForTfmSpecificBuildOutput. The target adds $(PublishDir)\*.* to BuildOutputInPackage and then sets IncludeBuildOutput=falseinside the target. Its comment says this must happen at that time, in the inner build. This is still the case in the latest version, 2.15.1.
Up to SDK 10, NuGet's _WalkEachTargetPerFramework always called the per-TFM targets with an extra TargetFramework=… global property. For single-TFM projects that created a separate project instance, so IncludeBuildOutput=false stayed in that instance and the outer PackTask still saw true.
NuGet.Client#7603 (re-land of #7541, for NuGet/Home#11530) removed that global property for single-TFM projects to avoid redundant evaluations: "Single-targeting: reuse the current (already-built) instance."
With SDK 11 the property therefore leaks into the instance that runs Pack. PackTask receives IncludeBuildOutput=False, and MSBuildProjectFactory.AddOutputFiles() skips alllib/ files, including the published files that GetTfmPublishedFiles added.
A diagnostic log of our plugin project shows the chain:
Set Property: IncludeBuildOutput=false in GetTfmPublishedFiles
_BuildOutputInPackage populated with all published DLLs
Task Parameter:IncludeBuildOutput=False on PackTask
Minimal repro (no Power Apps package needed)
Repro.csproj mirrors the GetTfmPublishedFiles pattern:
Run dotnet pack -c Release, and add -p:Multi=true for the last row:
SDK
Project
IncludeBuildOutput seen by PackTask
lib/ in nupkg
10.0.303
TargetFramework
true
lib/netstandard2.0/Repro.dll
11.0.100
TargetFramework
false (+ NU5128)
empty
11.0.100
TargetFrameworks (plural)
true
lib/netstandard2.0/Repro.dll
Without the PackageReference you get NU5017 instead, exactly as in the original report.
Workaround
Instead of pinning SDK 10 via global.json, switch the plugin project to the plural TargetFrameworks property, still with a single framework:
<!-- Plural on purpose: forces a separate per-TFM project instance during pack, see the SDK 11 / NuGet.Client#7603 note above -->
<TargetFrameworks>net462</TargetFrameworks>
A multi-targeting project always runs its per-framework steps in a separate project instance, so IncludeBuildOutput=false stays there, as before SDK 11. This relies only on public MSBuild behavior.
On our real plugin project (net462, Microsoft.PowerApps.MSBuild.Plugin 1.52.1), SDK 10.0.303 and SDK 11.0.100 both produce the same 43 lib/net462 files with this change. The DLL and publish output paths stay unchanged because we set AppendTargetFrameworkToOutputPath=false. If you generate plugin projects with pac plugin init, apply the same change to newly generated projects.
Things that do not help: forcing IncludeBuildOutput=true, either via -p: or in the project file. SDK 11 still produced an empty lib/ folder in both cases.
Also consider adding <WarningsAsErrors>NU5128</WarningsAsErrors> to plugin projects, so an empty package fails the build instead of the solution import.
Ask
Please update Microsoft.PowerApps.MSBuild.Plugin so that GetTfmPublishedFiles no longer relies on IncludeBuildOutput=false staying in a separate project instance, since SDK 11 reuses the instance for single-TFM projects.
Activity
[-]Dotnet build fails on Plugins following install of Visual Studio 2026 November 2026 FU (12.12.0)[/-][+]Dotnet build fails on Plugins following install of Visual Studio 2026 November 2026 FU (18.12.0)[/+]SiPurdy commentedon Nov 16, 2026
Bit of an update. The build fails when version 11.0 of the SDK is being used, If you use a global.json file to lock the build to version 10.0, builds work.
The Microsoft.PowerApps.MSBuild.Plugin package needs updating to support the new SDK version.
mathis-m commentedon Nov 16, 2026
We hit the same issue in our CI pipeline after the hosted
windows-2025image20261111.331added .NET SDK 11.0.100. The plugin package was built withoutlib/net462, the build stayed green (only warning NU5128, because our package has dependencies), and the solution import then failed with:Root cause
It's an interaction between
Microsoft.PowerApps.MSBuild.Pluginand a NuGet pack change that shipped in SDK 11.0.100:Microsoft.PowerApps.MSBuild.Plugin.targetsregistersGetTfmPublishedFilesinTargetsForTfmSpecificBuildOutput. The target adds$(PublishDir)\*.*toBuildOutputInPackageand then setsIncludeBuildOutput=falseinside the target. Its comment says this must happen at that time, in the inner build. This is still the case in the latest version, 2.15.1._WalkEachTargetPerFrameworkalways called the per-TFM targets with an extraTargetFramework=…global property. For single-TFM projects that created a separate project instance, soIncludeBuildOutput=falsestayed in that instance and the outerPackTaskstill sawtrue.Pack.PackTaskreceivesIncludeBuildOutput=False, andMSBuildProjectFactory.AddOutputFiles()skips alllib/files, including the published files thatGetTfmPublishedFilesadded.A diagnostic log of our plugin project shows the chain:
Set Property: IncludeBuildOutput=falseinGetTfmPublishedFiles_BuildOutputInPackagepopulated with all published DLLsTask Parameter:IncludeBuildOutput=FalseonPackTaskMinimal repro (no Power Apps package needed)
Repro.csprojmirrors theGetTfmPublishedFilespattern:Run
dotnet pack -c Release, and add-p:Multi=truefor the last row:IncludeBuildOutputseen by PackTasklib/in nupkgTargetFrameworklib/netstandard2.0/Repro.dllTargetFrameworkTargetFrameworks(plural)lib/netstandard2.0/Repro.dllWithout the
PackageReferenceyou get NU5017 instead, exactly as in the original report.Workaround
Instead of pinning SDK 10 via
global.json, switch the plugin project to the pluralTargetFrameworksproperty, still with a single framework:A multi-targeting project always runs its per-framework steps in a separate project instance, so
IncludeBuildOutput=falsestays there, as before SDK 11. This relies only on public MSBuild behavior.On our real plugin project (net462,
Microsoft.PowerApps.MSBuild.Plugin1.52.1), SDK 10.0.303 and SDK 11.0.100 both produce the same 43lib/net462files with this change. The DLL and publish output paths stay unchanged because we setAppendTargetFrameworkToOutputPath=false. If you generate plugin projects withpac plugin init, apply the same change to newly generated projects.Things that do not help: forcing
IncludeBuildOutput=true, either via-p:or in the project file. SDK 11 still produced an emptylib/folder in both cases.Also consider adding
<WarningsAsErrors>NU5128</WarningsAsErrors>to plugin projects, so an empty package fails the build instead of the solution import.Ask
Please update
Microsoft.PowerApps.MSBuild.Pluginso thatGetTfmPublishedFilesno longer relies onIncludeBuildOutput=falsestaying in a separate project instance, since SDK 11 reuses the instance for single-TFM projects.SiPurdy commentedon Nov 16, 2026
Thanks Mathis Michel (@mathis-m) for the decent write up.
Si