Skip to content

Conversation

jjw24
Copy link
Member

@jjw24 jjw24 commented Aug 24, 2021

Following on from #654

Part of the wider .net 5 sdk change now requiring you to specify platform version e.g. net5.0-windowsX.Y (X.Y as TPV- TargetPlatformVersion). The target framework net5.0-windows for some of our projects is still valid in the csproj files even though we are not specifying which version of Windows because the .NET SDK provides a default, and NuGet uses that to generate lib/net5.0-windows7.0/your.dll. Since we are not packing via csproj, we wont get the message from there, but we are using command-line to pack so need to append the platform version number to our nuspec.

This change includes

  • Nuget.CommandLine to version 5.10.0 from 5.4.0
  • Appending the target platform version to the csproj files.

Tested:

@jjw24 jjw24 added the enhancement New feature or request label Aug 24, 2021
@jjw24 jjw24 added this to the 1.9.0 milestone Aug 24, 2021
@jjw24 jjw24 self-assigned this Aug 24, 2021
@jjw24
Copy link
Member Author

jjw24 commented Aug 25, 2021

@taooceros do you remember if there was a reason why we did not append the platform version to all the csproj files?

@taooceros
Copy link
Member

No a specific reason. I just didn't add them because I am lazy😂

@taooceros taooceros changed the title Bump Nuget.CommandLine to version 5.10.0 from 5.4.0 Bump Nuget.CommandLine to version 5.4.0 from 5.10.0 Aug 28, 2021
@jjw24 jjw24 changed the title Bump Nuget.CommandLine to version 5.4.0 from 5.10.0 Bump Nuget.CommandLine & append csproj target platform Sep 1, 2021
@taooceros
Copy link
Member

taooceros commented Sep 2, 2021

We may also need to add the target framework.
https://docs.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu5128

Begin pack squirrel installer
Packing: C:\projects\flow-launcher\Scripts\flowlauncher.nuspec
Input path:  C:\projects\flow-launcher\Output\Release
Attempting to build package from 'flowlauncher.nuspec'.
WARNING: NU5128: Some target frameworks declared in the dependencies group of the nuspec and the lib/ref folder do not have exact matches in the other location. Consult the list of actions below:
- Add a dependency group for net5.0-windows10.0.19041 to the nuspec
WARNING: NU5048: The 'PackageIconUrl'/'iconUrl' element is deprecated. Consider using the 'PackageIcon'/'icon' element instead. Learn more at https://aka.ms/deprecateIconUrl
Successfully created package 'C:\projects\flow-launcher\Output\Packages\FlowLauncher.1.8.2.nupkg'.
nupkg path: C:\projects\flow-launcher\Output\Packages\FlowLauncher.1.8.2.nupkg
icon: C:\projects\flow-launcher\Flow.Launcher\Resources\app.ico
Filename: C:\projects\flow-launcher\Output\Packages\Flow-Launcher-Setup.exe
End pack squirrel installer

@taooceros
Copy link
Member

One reason I didn't put all project is to net5.0-windows10.0.19041.0 is to keep plugin doesn't need to use this framework, which includes the WinRT.dll in their reference. Although it won't be loaded in Flow if plugin includes it, it will consume more about 25MB space.

@jjw24
Copy link
Member Author

jjw24 commented Sep 27, 2021

it will consume more about 25MB space

ok i will need to test this, and maybe find a way to not include for all projects.

@jjw24 jjw24 marked this pull request as draft September 27, 2021 10:44
@jjw24 jjw24 modified the milestones: 1.9.0, Future Sep 27, 2021
@jjw24
Copy link
Member Author

jjw24 commented Dec 8, 2022

completed via #1601

@jjw24 jjw24 closed this Dec 8, 2022
@jjw24 jjw24 deleted the bump_nuget_cmdline branch December 8, 2022 10:30
@jjw24 jjw24 removed this from the Future milestone Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants