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

Error in importing task if SolutionDir paramerter not available #5

Closed
ancer opened this issue Sep 11, 2014 · 4 comments
Closed

Error in importing task if SolutionDir paramerter not available #5

ancer opened this issue Sep 11, 2014 · 4 comments

Comments

@ancer
Copy link

ancer commented Sep 11, 2014

NugetContentRestore target uses $(SolutionDir) parameter, but it is unavailable in several specific cases when running msbuild from command line:

  • when building just web project (msbuild SomeWebProj.csproj)
  • when building solution. For web project validation build starts which doesn't reference $(SolutionDir).

The problem is fixed by changing in file NugetContentRestore.targets UsingTask to this:

(No need to full path to assembly, it is relative to targets file)

Please, verify this and make a fix.

@panchilo
Copy link
Owner

@ancer - I believe I understand the issue you are having. Unfortunately, I didn't try NugetContentRestore Task with a "lonely" Web Project. I'll take a look at it and try to fix it a soon as I get some time.
I believe you forgot some line in your post (the fix). If you have the solution already and want me to try it out and update the package, please repost it. Tks!

@ancer
Copy link
Author

ancer commented Sep 22, 2014

@panchilo - UsingTask AssemblyFile="MSBuild.NugetContentRestore.dll" TaskName="NugetContentRestoreTask"

Now I use your task with this fix, but it is copied to my solution, not grabbed from NuGet.

@panchilo
Copy link
Owner

@ancer - Yes. I see what you are saying now. And you are right, the documentation says:

Relative paths are relative to the directory of the project file or targets file where the UsingTask element is declared.

I'll fix it this week.

@panchilo
Copy link
Owner

@ancer - This is now fixed in version 0.1.6. You can update your package.

Thanks and sorry for the delay.

panchilo added a commit that referenced this issue Sep 28, 2014
Error in importing task if SolutionDir parameter not available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants