ClearScript
ClearScript copied to clipboard
[ClickOnce] Application Files don't show reference files other than the main one
I installed the library on a project that has ClickOnce setup. Unfortunately, it doesn't show any of the files below in Application Files. How may I make them appear?
https://github.com/microsoft/ClearScript/blob/ee1a5e3ad53594b732479b2e9855b2cc6c7b81f2/NuGet/files/build/net45/Microsoft.ClearScript.targets#L4-L34
PackageReference
<PackageReference Include="Microsoft.ClearScript">
<Version>6.0.2</Version>
<PrivateAssets>contentFiles;analyzers</PrivateAssets>
</PackageReference>
ProjectFile+Properties+Publish+Application Files...

You may find more info here https://github.com/microsoft/msbuild/issues/5485
Once I added the code below into the CSPROJ file, it works, but I don't think it is an elegant solution since I have to update the version number manually each time.
<PropertyGroup>
<MicrosoftClearScriptPath Condition=" '$(MicrosoftClearScriptPath)' == '' ">$(NuGetPackageRoot)\microsoft.clearscript\6.0.2</MicrosoftClearScriptPath>
</PropertyGroup>
<ItemGroup>
<Content Include="$(MicrosoftClearScriptPath)\v8\net45\ClearScriptV8-32.dll">
<Link>ClearScriptV8-32.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="$(MicrosoftClearScriptPath)\v8\net45\ClearScriptV8-64.dll">
<Link>ClearScriptV8-64.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="$(MicrosoftClearScriptPath)\v8\v8-zlib-ia32.dll">
<Link>v8-zlib-ia32.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="$(MicrosoftClearScriptPath)\v8\v8-base-ia32.dll">
<Link>v8-base-ia32.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="$(MicrosoftClearScriptPath)\v8\v8-ia32.dll">
<Link>v8-ia32.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="$(MicrosoftClearScriptPath)\v8\v8-zlib-x64.dll">
<Link>v8-zlib-x64.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="$(MicrosoftClearScriptPath)\v8\v8-base-x64.dll">
<Link>v8-base-x64.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="$(MicrosoftClearScriptPath)\v8\v8-x64.dll">
<Link>v8-x64.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
Thanks for reporting this @cilerler. Good to know that you found a solution!
We're watching microsoft/msbuild#5485 for guidance.
Please reopen this issue if you have additional information or observations related to this topic. Thank you!