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

No file links created when using File: references in .NET Core projects #2622

Closed
magne opened this Issue Aug 17, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@magne
Contributor

magne commented Aug 17, 2017

Description

When using File: references (in paket.references) with .NET Core projects, no file links are added to the .csproj file.

Repro steps

Given the following .Net Core .csproj file:

<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFramework>net461</TargetFramework>
        <IsPackable>false</IsPackable>
    </PropertyGroup>
    <Import Project="..\..\.paket\Paket.Restore.targets"/>
</Project>

paket.dependencies:

source https://api.nuget.org/v3/index.json

github MiniProfiler/dotnet:v3 StackExchange.Profiling/Data/ExecuteType.cs
github MiniProfiler/dotnet:v3 StackExchange.Profiling/Data/IDbProfiler.cs

and paket.references:

File:ExecuteType.cs
File:IDbProfiler.cs

When running

paket install

no link is made to the IDbProfile.cs file in the project file.

...> dotnet --info
.NET Command Line Tools (2.0.0)

Product Information:
 Version:            2.0.0
 Commit SHA-1 hash:  cdcd1928c9

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.15063
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.0.0\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0
  Build    : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d

...> .paket\paket.exe --version
Paket version 5.85.3

Expected behavior

I would expect the .csproj file to contain a link to the file:

<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFramework>net461</TargetFramework>
        <IsPackable>false</IsPackable>
    </PropertyGroup>
    <ItemGroup>
        <Compile Include="..\..\paket-files\MiniProfiler\dotnet\StackExchange.Profiling\Data\ExecuteType.cs">
            <Paket>True</Paket>
            <Link>paket-files/ExecuteType.cs</Link>
        </Compile>
        <Compile Include="..\..\paket-files\MiniProfiler\dotnet\StackExchange.Profiling\Data\IDbProfiler.cs">
            <Paket>True</Paket>
            <Link>IDbProfiler.cs</Link>
        </Compile>
    </ItemGroup>
    <Import Project="..\.paket\Paket.Restore.targets"/>
</Project>

Actual behavior

The .csproj file does not contain any file links.

Known workarounds

You need to manually add any file links to the .csproj file.

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Aug 17, 2017

Member

Yes this part is not yet implemented for sdk projects. Thank you for sending a repro

Member

forki commented Aug 17, 2017

Yes this part is not yet implemented for sdk projects. Thank you for sending a repro

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Aug 17, 2017

Member

ok the issue is simpler. there is not ItemGroup in the file so it doesn't know where to insert

Member

forki commented Aug 17, 2017

ok the issue is simpler. there is not ItemGroup in the file so it doesn't know where to insert

@forki forki closed this in 4aa2db1 Aug 17, 2017

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Aug 17, 2017

Member

fixed in latest alpha

Member

forki commented Aug 17, 2017

fixed in latest alpha

forki added a commit that referenced this issue Aug 18, 2017

No file links were created when using File: references in .NET Core p…
…rojects - fixes #2622

# Conflicts:
#	RELEASE_NOTES.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment