MSBuild issues warning on CascadiaPackage in VS 16.8 #11459

Closed
opened 2026-01-31 02:48:14 +00:00 by claunia · 8 comments
Owner

Originally created by @skyline75489 on GitHub (Nov 17, 2020).

The project 'CascadiaPackage' ran into a problem during the last operation: The value of the 'TargetFrameworkMoniker' and 'NuGetTargetMoniker' properties in the 'Release|x64' configuration are both empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. You may need to reload the solution after fixing the problem.

Is it just me? It keeps showing when I launch the project using VS 16.8

Originally created by @skyline75489 on GitHub (Nov 17, 2020). > The project 'CascadiaPackage' ran into a problem during the last operation: The value of the 'TargetFrameworkMoniker' and 'NuGetTargetMoniker' properties in the 'Release|x64' configuration are both empty. This configuration will not contribute to NuGet restore, which may result in restore and build errors. You may need to reload the solution after fixing the problem. Is it just me? It keeps showing when I launch the project using VS 16.8
Author
Owner

@Don-Vito commented on GitHub (Nov 17, 2020):

@skyline75489 - I have the same error as well.

@Don-Vito commented on GitHub (Nov 17, 2020): @skyline75489 - I have the same error as well.
Author
Owner

@DHowett commented on GitHub (Nov 17, 2020):

This would not be the first time the WAP Packaging Project has spontaneously and aggressively broken our project. Does it still deploy?

@DHowett commented on GitHub (Nov 17, 2020): This would not be the first time the WAP Packaging Project has spontaneously and aggressively broken our project. Does it still deploy?
Author
Owner

@skyline75489 commented on GitHub (Nov 17, 2020):

Deployment seems fine. Only the warning keeps poping up.

获取 Outlook for Androidhttps://aka.ms/ghei36

@skyline75489 commented on GitHub (Nov 17, 2020): Deployment seems fine. Only the warning keeps poping up. 获取 Outlook for Android<https://aka.ms/ghei36>
Author
Owner

@DHowett commented on GitHub (Nov 20, 2020):

Marked help wanted & backlog but it's not on fire so I don't mind it. 😄

@DHowett commented on GitHub (Nov 20, 2020): Marked help wanted & backlog but it's not on fire so I don't mind it. :smile:
Author
Owner

@skyline75489 commented on GitHub (Dec 3, 2020):

One thing that bothers me is that the warning somehow interferes with the font setting. When I open the OpenConsole solution, the font used by Visual Studio will fallback to system default, instead of the "good-looking" one I chose. However this does not happen with other solutions. So I suspect it's because of the warning.

@skyline75489 commented on GitHub (Dec 3, 2020): One thing that bothers me is that the warning somehow interferes with the font setting. When I open the OpenConsole solution, the font used by Visual Studio will fallback to system default, instead of the "good-looking" one I chose. However this does not happen with other solutions. So I suspect it's because of the warning.
Author
Owner

@zadjii-msft commented on GitHub (Jan 6, 2021):

Guh, I got the 16.8 flight over the holidays. Boy, InfoBars with warnings that are totally irrelevant sure are annoying 😅

I think the fix is just

diff --git a/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj b/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj
index 3d918935a..dd88eb674 100644
--- a/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj
+++ b/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj
@@ -5,6 +5,7 @@
   <PropertyGroup Label="Configuration">
     <!-- This is necessary so the build system doesn't think we're a .NET project... -->
     <TargetRuntime>Native</TargetRuntime>
+    <NuGetTargetMoniker>win</NuGetTargetMoniker>
     <TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
     <TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion>
     <!--

I have no idea if that's the real fix or not. I bet this is because VS thinks that a wapproj is technically a C# project, when really it's not. So it thinks it needs to find this property. I'll ping our internal contact to see if he knows about this.

@zadjii-msft commented on GitHub (Jan 6, 2021): Guh, I got the 16.8 flight over the holidays. Boy, InfoBars with warnings that are totally irrelevant sure are annoying 😅 I _think_ the fix is just ```diff diff --git a/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj b/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj index 3d918935a..dd88eb674 100644 --- a/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj +++ b/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj @@ -5,6 +5,7 @@ <PropertyGroup Label="Configuration"> <!-- This is necessary so the build system doesn't think we're a .NET project... --> <TargetRuntime>Native</TargetRuntime> + <NuGetTargetMoniker>win</NuGetTargetMoniker> <TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion> <TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion> <!-- ``` I have _no idea_ if that's the real fix or not. I bet this is because VS _thinks_ that a `wapproj` is technically a C# project, when really it's not. So it thinks it needs to find this property. I'll ping our internal contact to see if he knows about this.
Author
Owner

@skyline75489 commented on GitHub (Jan 6, 2021):

Am I the only one getting the infobar that says “1ES want you to upgrade VS for security reasons” then listened? Yeah then I got this infobar. One bar for another.

@skyline75489 commented on GitHub (Jan 6, 2021): Am I the only one getting the infobar that says “1ES want you to upgrade VS for security reasons” then listened? Yeah then I got this infobar. One bar for another.
Author
Owner

@zadjii-msft commented on GitHub (Jan 6, 2021):

LOL Yea, I just usually let someone else on the team bite the bullet first, considering how frequently VS updates break our project

@zadjii-msft commented on GitHub (Jan 6, 2021): LOL Yea, I just usually let someone else on the team bite the bullet first, considering how frequently VS updates break our project
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11459