Created
June 20, 2022 06:32
-
-
Save amaitland/4f7fecf464703b2b82b22d0360c3db9e to your computer and use it in GitHub Desktop.
NETSDK1145 - Update KnownAppHostPack AppHostPackVersion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project> | |
<!-- | |
Update AppHostPackVersion for .net core 3.1 | |
https://docs.microsoft.com/en-gb/dotnet/core/tools/sdk-errors/netsdk1145 | |
https://developercommunity.visualstudio.com/t/netsdk1145-the-apphost-pack-is-not-installed-error/1513220 | |
--> | |
<ItemGroup> | |
<KnownAppHostPack Update="@(KnownAppHostPack)"> | |
<AppHostPackVersion Condition="'%(TargetFramework)' == 'netcoreapp3.1'">3.1.26</AppHostPackVersion> | |
</KnownAppHostPack> | |
</ItemGroup> | |
<!-- | |
<Target Name="OutputBeforeProcessFrameworkReferences" BeforeTargets="ProcessFrameworkReferences"> | |
<Message Importance="high" Text="KnownAppHostPack = %(KnownAppHostPack.AppHostPackVersion)" /> | |
<Message Importance="high" Text="KnownAppHostPack = %(KnownAppHostPack.TargetFramework)" /> | |
</Target> | |
--> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In
vcxproj
attempting to update theItemGroup
from a.props
file failed, seems it was set too soon. Adding directly to thevcxproj
file was necessary to add after all.targets
imports. UsingDirectory.Build.targets
appears to work as expected.