[Workloads] Fix license and icon paths in msi proj#7579
Merged
pjcollins merged 1 commit intodotnet:mainfrom Jul 1, 2021
Merged
[Workloads] Fix license and icon paths in msi proj#7579pjcollins merged 1 commit intodotnet:mainfrom
pjcollins merged 1 commit intodotnet:mainfrom
Conversation
I was running into a couple of issues when building `msi.csproj` files
generated by the `GenerateVisualStudioWorkload` task:
C:\Program Files\dotnet\sdk\5.0.301\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(221,5): error : Could not find a part of the path 'C:\Users\peter\source\yaml-templates\nuget-msi-convert\msbuild\obj\Debug\src\msiPackage\x86\Microsoft.Android.Sdk.Windows\obj\Debug\src\msiPackage\x86\Microsoft.Android.Sdk.Windows'.
C:\Program Files\dotnet\sdk\5.0.301\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(221,5): error NU5046: The icon file 'Icon.png' does not exist in the package.
The first error was a result of the following relative path being
included in the `LICENSE.TXT` item:
<None Include="obj\Debug\src\msiPackage\x86\Microsoft.Android.Sdk.Windows\LICENSE.TXT" Pack="true" PackagePath="\" />
Since `LICENSE.TXT` is created in the same directory as `msi.proj`, we
can exclude this relative path.
The second error appears to be a result of a missing `Icon.png` item,
which has been added.
The generated pack item content should now look like this:
<ItemGroup>
<None Include="C:\Users\peter\source\yaml-templates\nuget-msi-convert\msbuild\bin\Microsoft.Android.Sdk.Windows.30.0.100-ci.main.61-x86.msi" Pack="true" PackagePath="\data" />
<None Include="C:\Users\peter\source\yaml-templates\nuget-msi-convert\msbuild\bin\Microsoft.Android.Sdk.Windows.30.0.100-ci.main.61-x86.json" Pack="true" PackagePath="\data\msi.json" />
<None Include="Icon.png" Pack="true" PackagePath="" />
<None Include="LICENSE.TXT" Pack="true" PackagePath="\" />
</ItemGroup>
joeloff
approved these changes
Jun 30, 2021
1 task
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was running into a couple of issues when building
msi.csprojfilesgenerated by the
GenerateVisualStudioWorkloadtask:The first error was a result of the following relative path being
included in the
LICENSE.TXTitem:Since
LICENSE.TXTis created in the same directory asmsi.proj, wecan exclude this relative path.
The second error appears to be a result of a missing
Icon.pngitem,which has been added.
The generated pack item content should now look like this: