-
Notifications
You must be signed in to change notification settings - Fork 258
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
.net Core App 1.1 doesn't resolve external .net standard libs #4772
Comments
NuGet doesn't read Trying this locally I'm able to restore this fine and the project shows up in the project.assets.json file. It is expected that when removing the project reference and adding a direct dll reference that this would no longer show up in the assets file. @gentlehag can you provide some clear repro steps on how to get this to fail? The output project.assets.json file does not match what you have checked in, or your mention of file references. EDIT: I think I was able to repro this with consoleapp1: <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Reference Include="..\Service\bin\Debug\netstandard1.6\Service.dll" />
</ItemGroup>
</Project> output:
|
I'm also not sure wether this is a nuget bug. Is Nuget handling file references? Your project xml looks exactly like the steps i have to reproduce the bugs manually:
It is also reproduceable when you fo:
=> Then I get FileNotFound Exception PS: When I wrap up the Service.dll in a NuGetPackage and reference this nugetpackage instead of the file reference everything is working fine. |
It looks like this issue can be closed. NuGet is doing the right thing in this scenario. Since it is a We do need to consider how |
@Gentlehag you should use the workaround of adding the dll to a nupkg for now. |
I had this issue with a .NET Framework 4.6.1 library which I converted to multi-target .NET Standard. It uses C# dynamics, and requires Before: <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
</Project> After: <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard1.6;net461</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.3.0" />
</ItemGroup>
</Project> This removes the Hope this can help someone having the same problem. |
Opening on behalf of @gentlehag who posted this at https://github.com/dotnet/coreclr/issues/10037 originally:
@gentlehag shared the following data as well (at https://github.com/dotnet/coreclr/issues/10037#issuecomment-285152712):
Per @eerhardt, NuGet isn't writing the correct information into the project.assets.json file.
CC @rrelyea
The text was updated successfully, but these errors were encountered: