LinuxDoku / migratordotnet

Automatically exported from code.google.com/p/migratordotnet
0 stars 0 forks source link

MSBuild cannot find dependencies on assemblies downloaded from NuGet #175

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add Migrator.NET to a migrations project using NuGet.
2. Add a MSBuild target to your build script.
3. Run the MSBuild target that was added in the last step.

What is the expected output? What do you see instead?
- Migrator.NET should run its migrations. Instead I'm getting a .NET exception 
about a missing assembly (Migrator.Framework) even though it is in the same 
folder and is also explicitly added to the migrations project. The error is:

c:\Projects\Jundo\build.xml(111,9): error MSB4062: The "Migrate" task could not 
be loaded from the assembly c:\Projects\Jundo\packages\MigratorDotNet
.0.9.0.33276\tools\Migrator.MSBuild.dll. Could not load file or assembly 
'Migrator.Framework, Version=0.0.0.0, Culture=neutral, PublicKeyToken=3b3586
e9632ecfce' or one of its dependencies. Nie można odnaleźć określonego 
pliku. Confirm that the <UsingTask> declaration is correct, that the assembly
and all its dependencies are available, and that the task contains a public 
class that implements Microsoft.Build.Framework.ITask.

What version of the product are you using? On what operating system? With what 
.NET implementation/version?
- I'm using NuGet 1.4, Migrator.NET 0.9 on .NET 4.0 x64 on an x64 Windows 7 
machine.

What database and version are you seeing this issue on?
- PostgreSQL 9, but it is irrelevant.

Please provide any additional information below.
- Migrations work properly on Migrator.NET that is compiled manually by me 
(i.e., doesn't come from NuGet). It looks as if the reference is wrong (version 
0.0.0.0?)

Here are the relevant MSBuild targets: http://www.pastie.org/2149829

Original issue reported on code.google.com by pawel.kr...@gmail.com on 1 Jul 2011 at 1:01