Skip to content

Commit

Permalink
(GH-811) Skip resource / licensed assemblies
Browse files Browse the repository at this point in the history
Check the name of the assembly and if it is the licensed assembly, skip
it in resolution. If the name of assembly requested ends with
.resources, skip it entirely. This fixes the error `Could not find
file 'chocolatey.resources'.`
  • Loading branch information
ferventcoder committed Jun 19, 2016
1 parent 9bc9238 commit 831e671
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/chocolatey/GetChocolatey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ private static void add_assembly_resolver()
_handler = (sender, args) =>
{
var requestedAssembly = new AssemblyName(args.Name);
if (requestedAssembly.get_public_key_token().is_equal_to(ApplicationParameters.OfficialChocolateyPublicKey))
if (requestedAssembly.get_public_key_token().is_equal_to(ApplicationParameters.OfficialChocolateyPublicKey)
&& !requestedAssembly.Name.is_equal_to("chocolatey.licensed")
&& !requestedAssembly.Name.EndsWith(".resources", StringComparison.OrdinalIgnoreCase))
{
return typeof(Lets).Assembly;
}
Expand Down

0 comments on commit 831e671

Please sign in to comment.