Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in v1.1.0 on .NET 4.6.1: System.Runtime not found in the GAC #24

Closed
ben-reilly opened this issue Jun 12, 2018 · 4 comments
Closed

Comments

@ben-reilly
Copy link

When I try to update my nuget package from v1.0.7 to v1.1.0 on .NET 4.6.1, I get the following error:

Failed to add reference. The package 'DnsClient' tried to add a framework reference to 'System.Runtime' which was not found in the GAC. This is possibly a bug in the package. Please contact the package owners for assistance.

It appears that another package, NLog, experienced the same problem, so the solution might be found here: NLog/NLog.Extensions.Logging#91

@ben-reilly ben-reilly changed the title Error in v1.1.0 on .NET 4.6.1: "System.Runtime not found in the GAC" Error in v1.1.0 on .NET 4.6.1: System.Runtime not found in the GAC Jun 12, 2018
@MichaCo
Copy link
Owner

MichaCo commented Jun 12, 2018

Hey @ben-reilly, thanks for letting me know.
I just double checked and I had:

  <ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
    <Reference Include="System.Runtime" />
    <Reference Include="System" />
    <Reference Include="Microsoft.CSharp" />
  </ItemGroup>

Since the beginning of time (of this library) in the project file.

For whatever reason, only the 1.1.0 version now has this in the nuspec:

    <frameworkAssemblies>
      <frameworkAssembly assemblyName="System.Xml" targetFramework=".NETFramework4.5.1" />
      <frameworkAssembly assemblyName="System.Runtime" targetFramework=".NETFramework4.5.1" />
      <frameworkAssembly assemblyName="System.Xml.Serialization" targetFramework=".NETFramework4.5.1" />
    </frameworkAssemblies>

Which seem to cause those issues...

I can reproduce it with VS2015, VS2017 doesn't have any issues. Seems to be a nuget package manager issue...

I'll try to fix it somehow.
First I'll just remove the ItemGroup as the project compiles without it. Let's see...

@MichaCo MichaCo reopened this Jun 12, 2018
@MichaCo
Copy link
Owner

MichaCo commented Jun 13, 2018

should be fixed in v1.1.1

@MichaCo MichaCo closed this as completed Jun 13, 2018
@ben-reilly
Copy link
Author

That was fast! Confirmed it works in v1.1.1; thank you!

@MichaCo
Copy link
Owner

MichaCo commented Jun 13, 2018

Great ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants