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

Can't run dotnet pack with sources/symbols when project uses Paket #2689

Open
purkhusid opened this issue Aug 30, 2017 · 8 comments · May be fixed by #2711
Open

Can't run dotnet pack with sources/symbols when project uses Paket #2689

purkhusid opened this issue Aug 30, 2017 · 8 comments · May be fixed by #2711

Comments

@purkhusid
Copy link

purkhusid commented Aug 30, 2017

Description

I get an error when running dotnet pack with the --include-symbols and --include-source arguments.

\.paket\Paket.Restore.targets(100,5): error : The given path's format is not supported.

Everything works when dropping these arguments.
One strange thing that also happens is that if you build it with the arguments then the build without arguments also fails until you delete the symbols.nuspec file in the obj folder.

Repro steps

Repro:
PaketRepro.zip

  1. Extract the repo and go to the root Stuff.Repro
  2. Run dotnet pack --include-symbols or dotnet pack --include-source

Expected behavior

The command should output a nuget package for the project and one for the symbols

Actual behavior

Throws error \.paket\Paket.Restore.targets(100,5): error : The given path's format is not supported.

Known workarounds

None

Environment

Paket version: 5.91.0
.Net SDK version: 2.0.0
OS: Windows 10

@matthid
Copy link
Member

matthid commented Aug 30, 2017

Thanks for reporting this. I hope someone can take this.

@purkhusid
Copy link
Author

@matthid I might take a look at this if I could get a little direction in how to debug this.

@matthid
Copy link
Member

matthid commented Aug 31, 2017

@sjuberman Well, this is definitely not the easiest to debug, but I guess you would start by using either https://www.hanselman.com/blog/MSBuildStructuredLogRecordAndVisualizeYourBuilds.aspx or add msbuild messages/warnings to output the variables in the build process (see/edit the Paket.Restore.targets file) once you have identified the issue you would fix it :).

If you don't know how to fix just report back your findings.

@purkhusid
Copy link
Author

@matthid I think I managed to pinpoint it to the PackTask in Paket.Restore.targets. If you use --include-symbols or --include-source there will be 2 .nuspec files. One for the project and one for the symbols.

The output from ConvertToAbsolutePath then returns a property that is fromatted like this c:/somepath/project.nuspec;c:/somepath/project.symbols.nuspec. This property is fed into the NuspecFile in the PackTask but I think PackTask expects it to be a path to a single .nuspec file.

I managed to get past the error by splitting the string and running PackTask for both .nuspec files but now I'm getting this error: error : The process cannot access the file 'D:\DanniDev\PaketRepro2\Stuff.Repro\bin\Debug\Stuff.Repro.1.2.3.4.nupkg' because it is being used by another process. The changes I made also create 2 .nupkg files but it still fails for some reason. I'm not really sure what to do next since this is my first time editing a MsBuild target file ;)

I'll include the before and after file below:

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!-- Prevent dotnet template engine to parse this file -->
  <!--/-:cnd:noEmit-->
  <PropertyGroup>
    <!-- Mark that this target file has been loaded.  -->
    <IsPaketRestoreTargetsFileLoaded>true</IsPaketRestoreTargetsFileLoaded>
    <PaketToolsPath>$(MSBuildThisFileDirectory)</PaketToolsPath>
    <MonoPath Condition="'$(MonoPath)' == '' And Exists('/Library/Frameworks/Mono.framework/Commands/mono')">/Library/Frameworks/Mono.framework/Commands/mono</MonoPath>
    <MonoPath Condition="'$(MonoPath)' == ''">mono</MonoPath>
    <!-- Paket command -->
    <PaketExePath Condition=" '$(PaketExePath)' == '' AND Exists('$(PaketRootPath)paket.exe')">$(PaketRootPath)paket.exe</PaketExePath>
    <PaketExePath Condition=" '$(PaketExePath)' == '' ">$(PaketToolsPath)paket.exe</PaketExePath>
    <PaketCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketExePath)"</PaketCommand>
    <PaketCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"</PaketCommand>
    <PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' AND Exists('$(PaketRootPath)paket.bootstrapper.exe')">$(PaketRootPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
    <PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
    <PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
    <PaketBootStrapperCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
    
    <!-- Disable automagic references for F# dotnet sdk -->
    <!-- This will not do anything for other project types -->
    <!-- see https://github.com/fsharp/fslang-design/blob/master/RFCs/FS-1032-fsharp-in-dotnet-sdk.md -->
    <DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
    <DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>  
  </PropertyGroup>

  <Target Name="PaketRestore" BeforeTargets="_GenerateDotnetCliToolReferenceSpecs;_GenerateProjectRestoreGraphPerFramework;_GenerateRestoreGraphWalkPerFramework;CollectPackageReferences" >

    <Exec Command='$(PaketBootStrapperCommand) ' Condition="Exists('$(PaketBootStrapperExePath)') AND !(Exists('$(PaketExePath)'))" ContinueOnError="false" />
    <Exec Command='$(PaketCommand) restore --project "$(MSBuildProjectFullPath)" --target-framework $(TargetFramework)' Condition="$(TargetFramework) != ''" ContinueOnError="false" />
    <Exec Command='$(PaketCommand) restore --project "$(MSBuildProjectFullPath)" --target-framework "$(TargetFrameworks)"' Condition="$(TargetFramework) == ''" ContinueOnError="false" />

    <PropertyGroup>
      <PaketReferencesFilePath>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).references</PaketReferencesFilePath>
    </PropertyGroup>

    <ReadLinesFromFile File="$(PaketReferencesFilePath)" >
      <Output TaskParameter="Lines" ItemName="PaketReferencesFileLines"/>
    </ReadLinesFromFile>

    <ItemGroup Condition=" '@(PaketReferencesFileLines)' != '' " >
      <PaketReferencesFileLinesInfo Include="@(PaketReferencesFileLines)" >
        <PackageName>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])</PackageName>
        <PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion>
      </PaketReferencesFileLinesInfo>
      <PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
        <Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
      </PackageReference>
    </ItemGroup>

    <PropertyGroup>
      <PaketCliToolFilePath>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).paket.clitools</PaketCliToolFilePath>
    </PropertyGroup>

    <ReadLinesFromFile File="$(PaketCliToolFilePath)" >
      <Output TaskParameter="Lines" ItemName="PaketCliToolFileLines"/>
    </ReadLinesFromFile>

    <ItemGroup Condition=" '@(PaketCliToolFileLines)' != '' " >
      <PaketCliToolFileLinesInfo Include="@(PaketCliToolFileLines)" >
        <PackageName>$([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[0])</PackageName>
        <PackageVersion>$([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[1])</PackageVersion>
      </PaketCliToolFileLinesInfo>
      <DotNetCliToolReference Include="%(PaketCliToolFileLinesInfo.PackageName)">
        <Version>%(PaketCliToolFileLinesInfo.PackageVersion)</Version>
      </DotNetCliToolReference>
    </ItemGroup>

    <PropertyGroup>
      <RestoreConfigFile>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).NuGet.Config</RestoreConfigFile>
    </PropertyGroup>

  </Target>

  <Target Name="PaketDisableDirectPack" AfterTargets="_IntermediatePack" BeforeTargets="GenerateNuspec" Condition="('$(IsPackable)' == '' Or '$(IsPackable)' == 'true') And Exists('$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).references')" >
    <PropertyGroup>
      <ContinuePackingAfterGeneratingNuspec>false</ContinuePackingAfterGeneratingNuspec>
    </PropertyGroup>
  </Target>

  <Target Name="PaketOverrideNuspec" AfterTargets="GenerateNuspec" Condition="('$(IsPackable)' == '' Or '$(IsPackable)' == 'true') And Exists('$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).references')" >
    <PropertyGroup>
      <PaketReferencesFilePath>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).references</PaketReferencesFilePath>
      <ContinuePackingAfterGeneratingNuspec>true</ContinuePackingAfterGeneratingNuspec>
      <UseNewPack>false</UseNewPack>
      <UseNewPack Condition=" '$(NuGetToolVersion)' != '4.0.0' ">true</UseNewPack>
    </PropertyGroup>

    <ItemGroup>
      <_NuspecFiles Include="$(BaseIntermediateOutputPath)*.nuspec"/>
    </ItemGroup>

    <Exec Command='$(PaketCommand) fix-nuspecs files "@(_NuspecFiles)" references-file "$(PaketReferencesFilePath)" ' Condition="@(_NuspecFiles) != ''" />

    <ConvertToAbsolutePath Condition="@(_NuspecFiles) != ''" Paths="@(_NuspecFiles)">
      <Output TaskParameter="AbsolutePaths" PropertyName="NuspecFileAbsolutePath" />
    </ConvertToAbsolutePath>

    <!-- Call Pack -->
    <PackTask Condition="$(UseNewPack)"
              PackItem="$(PackProjectInputFile)"
              PackageFiles="@(_PackageFiles)"
              PackageFilesToExclude="@(_PackageFilesToExclude)"
              PackageVersion="$(PackageVersion)"
              PackageId="$(PackageId)"
              Title="$(Title)"
              Authors="$(Authors)"
              Description="$(Description)"
              Copyright="$(Copyright)"
              RequireLicenseAcceptance="$(PackageRequireLicenseAcceptance)"
              LicenseUrl="$(PackageLicenseUrl)"
              ProjectUrl="$(PackageProjectUrl)"
              IconUrl="$(PackageIconUrl)"
              ReleaseNotes="$(PackageReleaseNotes)"
              Tags="$(PackageTags)"
              DevelopmentDependency="$(DevelopmentDependency)"
              BuildOutputInPackage="@(_BuildOutputInPackage)"
              TargetPathsToSymbols="@(_TargetPathsToSymbols)"
              TargetFrameworks="@(_TargetFrameworks)"
              AssemblyName="$(AssemblyName)"
              PackageOutputPath="$(PackageOutputAbsolutePath)"
              IncludeSymbols="$(IncludeSymbols)"
              IncludeSource="$(IncludeSource)"
              PackageTypes="$(PackageType)"
              IsTool="$(IsTool)"
              RepositoryUrl="$(RepositoryUrl)"
              RepositoryType="$(RepositoryType)"
              SourceFiles="@(_SourceFiles->Distinct())"
              NoPackageAnalysis="$(NoPackageAnalysis)"
              MinClientVersion="$(MinClientVersion)"
              Serviceable="$(Serviceable)"
              FrameworkAssemblyReferences="@(_FrameworkAssemblyReferences)"
              ContinuePackingAfterGeneratingNuspec="$(ContinuePackingAfterGeneratingNuspec)"
              NuspecOutputPath="$(BaseIntermediateOutputPath)"
              IncludeBuildOutput="$(IncludeBuildOutput)"
              BuildOutputFolder="$(BuildOutputTargetFolder)"
              ContentTargetFolders="$(ContentTargetFolders)"
              RestoreOutputPath="$(RestoreOutputAbsolutePath)"
              NuspecFile="$(NuspecFileAbsolutePath)"
              NuspecBasePath="$(NuspecBasePath)"
              NuspecProperties="$(NuspecProperties)"/>

    <PackTask Condition="! $(UseNewPack)"
              PackItem="$(PackProjectInputFile)"
              PackageFiles="@(_PackageFiles)"
              PackageFilesToExclude="@(_PackageFilesToExclude)"
              PackageVersion="$(PackageVersion)"
              PackageId="$(PackageId)"
              Title="$(Title)"
              Authors="$(Authors)"
              Description="$(Description)"
              Copyright="$(Copyright)"
              RequireLicenseAcceptance="$(PackageRequireLicenseAcceptance)"
              LicenseUrl="$(PackageLicenseUrl)"
              ProjectUrl="$(PackageProjectUrl)"
              IconUrl="$(PackageIconUrl)"
              ReleaseNotes="$(PackageReleaseNotes)"
              Tags="$(PackageTags)"
              TargetPathsToAssemblies="@(_TargetPathsToAssemblies->'%(FinalOutputPath)')"
              TargetPathsToSymbols="@(_TargetPathsToSymbols)"
              TargetFrameworks="@(_TargetFrameworks)"
              AssemblyName="$(AssemblyName)"
              PackageOutputPath="$(PackageOutputAbsolutePath)"
              IncludeSymbols="$(IncludeSymbols)"
              IncludeSource="$(IncludeSource)"
              PackageTypes="$(PackageType)"
              IsTool="$(IsTool)"
              RepositoryUrl="$(RepositoryUrl)"
              RepositoryType="$(RepositoryType)"
              SourceFiles="@(_SourceFiles->Distinct())"
              NoPackageAnalysis="$(NoPackageAnalysis)"
              MinClientVersion="$(MinClientVersion)"
              Serviceable="$(Serviceable)"
              AssemblyReferences="@(_References)"
              ContinuePackingAfterGeneratingNuspec="$(ContinuePackingAfterGeneratingNuspec)"
              NuspecOutputPath="$(BaseIntermediateOutputPath)"
              IncludeBuildOutput="$(IncludeBuildOutput)"
              BuildOutputFolder="$(BuildOutputTargetFolder)"
              ContentTargetFolders="$(ContentTargetFolders)"
              RestoreOutputPath="$(RestoreOutputAbsolutePath)"
              NuspecFile="$(NuspecFileAbsolutePath)"
              NuspecBasePath="$(NuspecBasePath)"
              NuspecProperties="$(NuspecProperties)"/>
  </Target>
  <!--/+:cnd:noEmit-->
</Project>

After:

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!-- Prevent dotnet template engine to parse this file -->
  <!--/-:cnd:noEmit-->
  <PropertyGroup>
    <!-- Mark that this target file has been loaded.  -->
    <IsPaketRestoreTargetsFileLoaded>true</IsPaketRestoreTargetsFileLoaded>
    <PaketToolsPath>$(MSBuildThisFileDirectory)</PaketToolsPath>
    <MonoPath Condition="'$(MonoPath)' == '' And Exists('/Library/Frameworks/Mono.framework/Commands/mono')">/Library/Frameworks/Mono.framework/Commands/mono</MonoPath>
    <MonoPath Condition="'$(MonoPath)' == ''">mono</MonoPath>
    <!-- Paket command -->
    <PaketExePath Condition=" '$(PaketExePath)' == '' AND Exists('$(PaketRootPath)paket.exe')">$(PaketRootPath)paket.exe</PaketExePath>
    <PaketExePath Condition=" '$(PaketExePath)' == '' ">$(PaketToolsPath)paket.exe</PaketExePath>
    <PaketCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketExePath)"</PaketCommand>
    <PaketCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"</PaketCommand>
    <PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' AND Exists('$(PaketRootPath)paket.bootstrapper.exe')">$(PaketRootPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
    <PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
    <PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
    <PaketBootStrapperCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
    
    <!-- Disable automagic references for F# dotnet sdk -->
    <!-- This will not do anything for other project types -->
    <!-- see https://github.com/fsharp/fslang-design/blob/master/RFCs/FS-1032-fsharp-in-dotnet-sdk.md -->
    <DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
    <DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>  
  </PropertyGroup>

  <Target Name="PaketRestore" BeforeTargets="_GenerateDotnetCliToolReferenceSpecs;_GenerateProjectRestoreGraphPerFramework;_GenerateRestoreGraphWalkPerFramework;CollectPackageReferences" >

    <Exec Command='$(PaketBootStrapperCommand) ' Condition="Exists('$(PaketBootStrapperExePath)') AND !(Exists('$(PaketExePath)'))" ContinueOnError="false" />
    <Exec Command='$(PaketCommand) restore --project "$(MSBuildProjectFullPath)" --target-framework $(TargetFramework)' Condition="$(TargetFramework) != ''" ContinueOnError="false" />
    <Exec Command='$(PaketCommand) restore --project "$(MSBuildProjectFullPath)" --target-framework "$(TargetFrameworks)"' Condition="$(TargetFramework) == ''" ContinueOnError="false" />

    <PropertyGroup>
      <PaketReferencesFilePath>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).references</PaketReferencesFilePath>
    </PropertyGroup>

    <ReadLinesFromFile File="$(PaketReferencesFilePath)" >
      <Output TaskParameter="Lines" ItemName="PaketReferencesFileLines"/>
    </ReadLinesFromFile>

    <ItemGroup Condition=" '@(PaketReferencesFileLines)' != '' " >
      <PaketReferencesFileLinesInfo Include="@(PaketReferencesFileLines)" >
        <PackageName>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])</PackageName>
        <PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion>
      </PaketReferencesFileLinesInfo>
      <PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
        <Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
      </PackageReference>
    </ItemGroup>

    <PropertyGroup>
      <PaketCliToolFilePath>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).paket.clitools</PaketCliToolFilePath>
    </PropertyGroup>

    <ReadLinesFromFile File="$(PaketCliToolFilePath)" >
      <Output TaskParameter="Lines" ItemName="PaketCliToolFileLines"/>
    </ReadLinesFromFile>

    <ItemGroup Condition=" '@(PaketCliToolFileLines)' != '' " >
      <PaketCliToolFileLinesInfo Include="@(PaketCliToolFileLines)" >
        <PackageName>$([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[0])</PackageName>
        <PackageVersion>$([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[1])</PackageVersion>
      </PaketCliToolFileLinesInfo>
      <DotNetCliToolReference Include="%(PaketCliToolFileLinesInfo.PackageName)">
        <Version>%(PaketCliToolFileLinesInfo.PackageVersion)</Version>
      </DotNetCliToolReference>
    </ItemGroup>

    <PropertyGroup>
      <RestoreConfigFile>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).NuGet.Config</RestoreConfigFile>
    </PropertyGroup>

  </Target>

  <Target Name="PaketDisableDirectPack" AfterTargets="_IntermediatePack" BeforeTargets="GenerateNuspec" Condition="('$(IsPackable)' == '' Or '$(IsPackable)' == 'true') And Exists('$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).references')" >
    <PropertyGroup>
      <ContinuePackingAfterGeneratingNuspec>false</ContinuePackingAfterGeneratingNuspec>
    </PropertyGroup>
  </Target>

  <Target Name="PaketOverrideNuspec" AfterTargets="GenerateNuspec" Condition="('$(IsPackable)' == '' Or '$(IsPackable)' == 'true') And Exists('$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).references')" >
    <PropertyGroup>
      <PaketReferencesFilePath>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).references</PaketReferencesFilePath>
      <ContinuePackingAfterGeneratingNuspec>true</ContinuePackingAfterGeneratingNuspec>
      <UseNewPack>false</UseNewPack>
      <UseNewPack Condition=" '$(NuGetToolVersion)' != '4.0.0' ">true</UseNewPack>
    </PropertyGroup>

    <ItemGroup>
      <_NuspecFiles Include="$(BaseIntermediateOutputPath)*.nuspec"/>
    </ItemGroup>

    <Message Text="$(PaketReferencesFilePath)" Importance="high"/>
    <Message Text="$(ContinuePackingAfterGeneratingNuspec)" Importance="high"/>
    <Message Text="$(UseNewPack)" Importance="high"/>
    <Message Text="$(NuGetToolVersion)" Importance="high"/>
    <Message Text="@(_NuspecFiles)" Importance="high"/>
    <Message Text="$(BaseIntermediateOutputPath)" Importance="high"/>

    <Exec Command='$(PaketCommand) fix-nuspecs files "@(_NuspecFiles)" references-file "$(PaketReferencesFilePath)" ' Condition="@(_NuspecFiles) != ''" />

    <ConvertToAbsolutePath Condition="@(_NuspecFiles) != ''" Paths="@(_NuspecFiles)">
      <Output TaskParameter="AbsolutePaths" PropertyName="NuspecFileAbsolutePath" />
    </ConvertToAbsolutePath>

    <ItemGroup>
        <NuspecList Include="$(NuspecFileAbsolutePath.Split(`;`))" />
    </ItemGroup>

    <Message Text="@(NuspecList)" Importance="high"/>

    <Message Text="$(NuspecFileAbsolutePath)" Importance="high"/>
    <Message Text="$(IncludeSymbols)" Importance="high"/>
    <Message Text="$(IncludeSource)" Importance="high"/>
    
    <!-- Call Pack -->
    <PackTask Condition="$(UseNewPack)"
              PackItem="$(PackProjectInputFile)"
              PackageFiles="@(_PackageFiles)"
              PackageFilesToExclude="@(_PackageFilesToExclude)"
              PackageVersion="$(PackageVersion)"
              PackageId="$(PackageId)"
              Title="$(Title)"
              Authors="$(Authors)"
              Description="$(Description)"
              Copyright="$(Copyright)"
              RequireLicenseAcceptance="$(PackageRequireLicenseAcceptance)"
              LicenseUrl="$(PackageLicenseUrl)"
              ProjectUrl="$(PackageProjectUrl)"
              IconUrl="$(PackageIconUrl)"
              ReleaseNotes="$(PackageReleaseNotes)"
              Tags="$(PackageTags)"
              DevelopmentDependency="$(DevelopmentDependency)"
              BuildOutputInPackage="@(_BuildOutputInPackage)"
              TargetPathsToSymbols="@(_TargetPathsToSymbols)"
              TargetFrameworks="@(_TargetFrameworks)"
              AssemblyName="$(AssemblyName)"
              PackageOutputPath="$(PackageOutputAbsolutePath)"
              IncludeSymbols="$(IncludeSymbols)"
              IncludeSource="$(IncludeSource)"
              PackageTypes="$(PackageType)"
              IsTool="$(IsTool)"
              RepositoryUrl="$(RepositoryUrl)"
              RepositoryType="$(RepositoryType)"
              SourceFiles="@(_SourceFiles->Distinct())"
              NoPackageAnalysis="$(NoPackageAnalysis)"
              MinClientVersion="$(MinClientVersion)"
              Serviceable="$(Serviceable)"
              FrameworkAssemblyReferences="@(_FrameworkAssemblyReferences)"
              ContinuePackingAfterGeneratingNuspec="$(ContinuePackingAfterGeneratingNuspec)"
              NuspecOutputPath="$(BaseIntermediateOutputPath)"
              IncludeBuildOutput="$(IncludeBuildOutput)"
              BuildOutputFolder="$(BuildOutputTargetFolder)"
              ContentTargetFolders="$(ContentTargetFolders)"
              RestoreOutputPath="$(RestoreOutputAbsolutePath)"
              NuspecFile="%(NuspecList.Identity)"
              NuspecBasePath="$(NuspecBasePath)"
              NuspecProperties="$(NuspecProperties)"/>

    <PackTask Condition="! $(UseNewPack)"
              PackItem="$(PackProjectInputFile)"
              PackageFiles="@(_PackageFiles)"
              PackageFilesToExclude="@(_PackageFilesToExclude)"
              PackageVersion="$(PackageVersion)"
              PackageId="$(PackageId)"
              Title="$(Title)"
              Authors="$(Authors)"
              Description="$(Description)"
              Copyright="$(Copyright)"
              RequireLicenseAcceptance="$(PackageRequireLicenseAcceptance)"
              LicenseUrl="$(PackageLicenseUrl)"
              ProjectUrl="$(PackageProjectUrl)"
              IconUrl="$(PackageIconUrl)"
              ReleaseNotes="$(PackageReleaseNotes)"
              Tags="$(PackageTags)"
              TargetPathsToAssemblies="@(_TargetPathsToAssemblies->'%(FinalOutputPath)')"
              TargetPathsToSymbols="@(_TargetPathsToSymbols)"
              TargetFrameworks="@(_TargetFrameworks)"
              AssemblyName="$(AssemblyName)"
              PackageOutputPath="$(PackageOutputAbsolutePath)"
              IncludeSymbols="$(IncludeSymbols)"
              IncludeSource="$(IncludeSource)"
              PackageTypes="$(PackageType)"
              IsTool="$(IsTool)"
              RepositoryUrl="$(RepositoryUrl)"
              RepositoryType="$(RepositoryType)"
              SourceFiles="@(_SourceFiles->Distinct())"
              NoPackageAnalysis="$(NoPackageAnalysis)"
              MinClientVersion="$(MinClientVersion)"
              Serviceable="$(Serviceable)"
              AssemblyReferences="@(_References)"
              ContinuePackingAfterGeneratingNuspec="$(ContinuePackingAfterGeneratingNuspec)"
              NuspecOutputPath="$(BaseIntermediateOutputPath)"
              IncludeBuildOutput="$(IncludeBuildOutput)"
              BuildOutputFolder="$(BuildOutputTargetFolder)"
              ContentTargetFolders="$(ContentTargetFolders)"
              RestoreOutputPath="$(RestoreOutputAbsolutePath)"
              NuspecFile="%(NuspecList.Identity)"
              NuspecBasePath="$(NuspecBasePath)"
              NuspecProperties="$(NuspecProperties)"/>
  </Target>
  <!--/+:cnd:noEmit-->
</Project>

@matthid
Copy link
Member

matthid commented Sep 2, 2017

ok we don't have either :) next step I would probably do is compare the visual msbuild log without paket with the one where paket is enabled (and with and without your flags). I guess when using those parameters we need to do something different (ignore the target or hook into a different place)

@purkhusid purkhusid linked a pull request Sep 2, 2017 that will close this issue
@purkhusid
Copy link
Author

Pull request here: #2711

@enricosada
Copy link
Collaborator

same error <IncludeSymbols>true</IncludeSymbols> as props in msbuild file ( the --include-symbols just set that property )

@PMudra
Copy link

PMudra commented Oct 29, 2018

Site note for anybody that just wants to add the *.pdb into the main nuget package:

<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>

https://stackoverflow.com/a/48391188
NuGet/Home#4142

aaronpowell added a commit to aaronpowell/Chauffeur that referenced this issue Feb 27, 2019
Can't publish a separate NuGet symbols package due to a bug in paket (fsprojects/Paket#2689), instead working around it by embedding the pdb's in the package itself
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants