fsprojects / Paket

A dependency manager for .NET with support for NuGet packages and Git repositories.
https://fsprojects.github.io/Paket/
MIT License
2.02k stars 525 forks source link

Failure of generating tool package for netcoreapp2.0 #3414

Open moh-hassan opened 6 years ago

moh-hassan commented 6 years ago

I have a netcore2.0 project

    <Project Sdk="Microsoft.NET.Sdk">
      <PropertyGroup>
        <OutputType>Exe</OutputType>
        <TargetFramework>netcoreapp2.0</TargetFramework>
      </PropertyGroup>
      <Import Project="..\.paket\Paket.Restore.targets" />
    </Project>

I run the following command to generate a package:

         .paket\paket pack nugets --version 1.0.0

I get error:

Paket failed with -> FileNotFoundException: Could not find file 'F:\projects\PaketDemo\PaketDemo\bin\Release\netcoreapp2.0\PaketDemo.exe'

It seems that packet consider that netcoreapp2.0 project with should use .exe not .dll

How to configure paket to generate netcoreapp2.0 package ?

matthid commented 6 years ago

@moh-hassan Can you open a new issue with correct details?

moh-hassan commented 6 years ago

Sorry, The issue is committed by accident before completing. I modified it. Kindly, can you re-open the issue.

matthid commented 6 years ago

@moh-hassan Can you edit the description and remove the placeholders as well to have more details of what's going on?

BlythMeister commented 6 years ago

Your project file says it's an exe...

moh-hassan commented 6 years ago

The project is a Console App (.Net Core) When I create Console App (.Net Core) project in vs 2017, it add <OutputType>Exe</OutputType> When I run dotnet pack, it create the package using the dll (because paketdemo.dll is generated on build)

Should i remove the <OutputType>Exe</OutputType> ?

da9l commented 5 years ago

I get this problem when I want to create a self contained exe using dotnet publish --runtime . The exe does not end up in the folder mentioned in the error message but in the subfolder ..\