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

Framework references to System.* removes reference to System #1880

jasonmalinowski opened this Issue Dec 31, 2015 · 1 comment


None yet
2 participants
Copy link

jasonmalinowski commented Dec 31, 2015

  1. Create a project.json that has a framework reference to something like System.Linq or System.Xml.
  2. Add an explicit reference to System in your .csproj
  3. Try building.

Expected: your System reference is still there
Actual: it gets removed

The bug is here:

  <!-- Remove simple name references if we're directly providing a reference assembly to the compiler. For example,
       consider a project with an Reference Include="System", and some NuGet package is providing System.dll -->
  <Reference Remove="%(_ReferencesFromNuGetPackages.FileName)" /> 

The FileName metadata is dropping the second namespace. The easiest fix is probably to just add a condition to verify the extension is actually of the type that line expects. The more complicated fix might be to revisit some of this entirely.


This comment has been minimized.

Copy link

onovotny commented Feb 8, 2016

Documenting the temporary workaround as per @jasonmalinowski:

Add <IncludeFrameworkReferencesFromNuGet>false</IncludeFrameworkReferencesFromNuGet> to the csproj.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment