Source Only Nuget Package is not being found

d3labar's Avatar


12 Aug, 2017 03:14 AM

I'm getting errors for

Line 8 is Restoring NuGet package DLaB.Common.Sources.
But the first error is line 162 CSC : error CS2001: Source file 'C:\projects\dlab-xrm-xrmtoolboxtools\DLaB.CrmSvcUtilExtensions\App_Packages\DLaB.Common.Sources.\ConfigKeyValueSplitInfo.cs' could not be found. That file exists in the DLaB.Common.Sources package...

  1. Support Staff 1 Posted by Ilya Finkelshte... on 14 Aug, 2017 08:35 PM

    Ilya Finkelshteyn's Avatar

    Correct me if I wrong, those CrmSvcUtilExtensions.cspro references assume that DLaB.CrmSvcUtilExtensions folder contains App_Packages sub-folder with all that content, right? I believe it exists on your local machine, but I cannot understand how it supposed to appear on build VM, if it does not exist in repo...

  2. 2 Posted by d3labar on 15 Aug, 2017 03:00 AM

    d3labar's Avatar

    DLaB.Common.Sources. is a source only NuGet Package ( When I install it locally, it creates the files in the App_Packages sub-folder. I could deletethose files, and re-install the nuget package, and it would bring in the source files.

    I live in a world where I have to deploy everything to a sandbox environment where I can't reference external dlls, so rather than IL-Merging everything, source only nuget Packages are really nice.


    Daryl LaBar


  3. Support Staff 3 Posted by Ilya Finkelshte... on 16 Aug, 2017 03:37 AM

    Ilya Finkelshteyn's Avatar

    Sorry my ignorance. I see now. But if you look at logs nuget restores those sources to default packages folder: Adding package 'DLaB.Common.Sources.' to folder 'C:\projects\dlab-xrm-xrmtoolboxtools\packages'. Maybe you have custom repositoryPath settings in packages.config on your machine?

  4. 4 Posted by d3labar on 23 Aug, 2017 12:47 PM

    d3labar's Avatar

    Um... When I run it on my local machine, it puts it in both places:


    Shared from


    Daryl LaBar


  5. Support Staff 5 Posted by Ilya Finkelshte... on 26 Aug, 2017 06:24 AM

    Ilya Finkelshteyn's Avatar

    Local machines with historical settings are always different from clean VM. I have very strong feeling that if you try to git clone and nuget restore on some another computer or VM you never sue before, you will see the same results as on AppVeyor. Can you try that?

  6. 6 Posted by d3labar on 26 Sep, 2017 08:32 PM

    d3labar's Avatar

    So... finally figured out what the heck is/was going on.

    A Nuget Restore, does not copy over content files, which the App_Sources is. So the source files are copied to the packages directory, but not to the actual project directory, unless you actual re-install the package.

    Incase someone else has the same issue:

    I ended up having to create an exe to perform the copy and potential transformation:

    And then calling it from the Pre-Build of the project:

    "$(SolutionDir)References\NuGetContentInstaller.exe" "$(SolutionDir) " "$(ProjectPath)"


    Daryl LaBar


  7. Support Staff 7 Posted by Ilya Finkelshte... on 26 Sep, 2017 11:08 PM

    Ilya Finkelshteyn's Avatar

    Thanks a lot for the update!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac