CabbageCrow / AssemblyPublicizer

A tool to create a copy of an assembly in which all members are public (types, methods, fields, getters and setters of properties).
Other
85 stars 29 forks source link

`Could not load file or assembly 'Mono.Options` #9

Open Stan-Stani opened 3 months ago

Stan-Stani commented 3 months ago

System.IO.FileNotFoundException: 'Could not load file or assembly 'Mono.Options, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.'

If you encounter this issue, you have to change the references to Private: True.

 <Reference Include="Mono.Cecil, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
      <HintPath>..\packages\Mono.Cecil.0.10.0\lib\net40\Mono.Cecil.dll</HintPath>
      <EmbedAssembly>true</EmbedAssembly>
      <Private>True</Private>
    </Reference>
    <Reference Include="Mono.Cecil.Mdb, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
      <HintPath>..\packages\Mono.Cecil.0.10.0\lib\net40\Mono.Cecil.Mdb.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="Mono.Cecil.Pdb, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
      <HintPath>..\packages\Mono.Cecil.0.10.0\lib\net40\Mono.Cecil.Pdb.dll</HintPath>
      <Private>True</Private>
    </Reference>
<Reference Include="Mono.Options, Version=5.0.0.0, Culture=neutral, processorArchitecture=MSIL">
      <HintPath>..\packages\Mono.Options.5.3.0.1\lib\net4-client\Mono.Options.dll</HintPath>
      <EmbedAssembly>true</EmbedAssembly>
      <Private>True</Private>
    </Reference>
    <Reference Include="Mono.Cecil.Rocks, Version=0.10.0.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e, processorArchitecture=MSIL">
      <HintPath>..\packages\Mono.Cecil.0.10.0\lib\net40\Mono.Cecil.Rocks.dll</HintPath>
      <Private>True</Private>
    </Reference>
GoatLeywin commented 1 month ago

What exactly do I change and where?

Stan-Stani commented 1 month ago

@GoatLeywin ah it's been a while but do a global search ctrl+shift+f in your code and search for <reference Include= and that might help you find the file.

<Private>True</Private> is what you should add, I believe.