Having trouble with .targets file not being found in nuget package.
Hi all,
I've been having trouble getting AppVeyor to correctly build my GitHub project. I've narrowed it down to a single problem. I'm importing a nuget package into my project . This project has 'Antlr4.targets' file which is referenced automatically in the csproj file automatically when the nuget package was added in Visual Studio.
However the reference to the targets file is conditional on the
file being present. I altered the csproj file manually, removing
the condition on the import, to see if this was the cause of my
build failure. See
this commit for details. The resulting
log from this commit confirms that for some reason the targets
file is not present (at least in the path it is looking for it).
Interestingly the EnsureNuGetPackageBuildImports build
task that is automatically added by Visual Studio is meant to check
for the existance of these files doesn't throw an error.
Any help in understanding why the file is not found would be much appreciated, since its hard to debug the problem when you can't see the file system.
Regards
Ross
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

Support Staff 1 Posted by Feodor Fitsner on 14 Jul, 2015 02:32 AM
Hi Ross,
Try adding
nuget restore Vba.Language\Vba.Language.slncommand to "Before build".Also, you can always access build worker via RDP for better troubleshooting: http://www.appveyor.com/docs/how-to/rdp-to-build-worker
2 Posted by Ross Knudsen on 14 Jul, 2015 06:30 AM
Hi Feodor,
Thanks so much. Adding the nuget restore line seems to have fixed the problem. I didn't think that would have been an issue as the log seemed to show that the packages were being downloaded and installed.
Its also nice to know that its possible to get into a RDP session with the build engine. That will make it easier to diagnose any further problems.
Regards
Ross
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:57 AM.