Problems with Microsoft.Common.CurrentVersion.targets

mark's Avatar

mark

10 Mar, 2015 12:34 PM

Hi guys,

I'm having trouble compiling my project.

I think it's a well known problem, but I tried everything and didn't even come close to a solution:

C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "WebGrease". Check to make sure the assembly exists on disk.

The same error occurs with other references as well: Raven.Client.Lightweight.

Nuget package restore is enabled for solution. The project that is a submodule also has NUget restore enabled. I also added nuget restore <path-to-my.sln> just to make sure. But in the top, all packages are installed.
Nuget.exe is updated to latest version.

Thanks,
Mark

  1. Support Staff 1 Posted by Feodor Fitsner on 10 Mar, 2015 03:26 PM

    Feodor Fitsner's Avatar

    So it's probably sub-modules? Git submodules are not checked out by default. Take a look at this article: http://www.appveyor.com/docs/how-to/private-git-sub-modules

    In addition to that - now it's possible to see project public SSH key on its General tab, so the "easiest" way (less secure but maybe just to see if everything works) to allow access to sub-module repositories is to move repository SSH key under account on GitHub.

    -Feodor

  2. 2 Posted by mark on 10 Mar, 2015 03:45 PM

    mark's Avatar

    Hi Feodor,

    Thanks for getting back to me so fast. Yes, it is a private submodule. I followed that guide and added the ssh key. The build log also implies, that the project is available and found, but it's not only related to that specific project. A project inside the original repository and VS solution also throws.

    I've attached a log with some modifications ;)

  3. Support Staff 3 Posted by Feodor Fitsner on 10 Mar, 2015 03:54 PM

    Feodor Fitsner's Avatar

    Try enabling detailed logging to see paths msbuild "considers" while trying to resolve those references. Wrong versions could be referenced there or absolute paths. Check .csproj contents for reference paths as well.

    -Feodor

  4. 4 Posted by mark on 11 Mar, 2015 10:16 AM

    mark's Avatar

    Thanks, Feodor. You pointed me in the right direction. There were serverel issues with references into other projects bin folder and some that were unnecessary.
    After some package reinstalls, updates etc, it works now.

    Thanks :-)

  5. mark closed this discussion on 11 Mar, 2015 10:16 AM.

  6. mark re-opened this discussion on 11 Mar, 2015 10:16 AM

  7. mark closed this discussion on 11 Mar, 2015 10:16 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? 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