Bir MsBuild Task: MyTask yazdım. Benim çözümümde, Görev projem ve diğer projelerim var. MyTask, üçüncü meclislere atıfta bulunan bir projeye (Proj1) atıfta bulunur (dep1 ve dep2).MsBuild, özel görevin ikinci düzey bağımlılıkları için iyi dizine bakmıyor
Tüm projeler iyi bir şekilde oluşturulur ve çıktıları bir dizinde (Compil) alır. Bu dizinde ben istediğim tüm dll var: MyTask.dll, ProjA.dll, dep1.dll, dep2.dll ve diğerleri.
<UsingTask AssemblyFile="..\Compil\MyTask.dll" TaskName="CreateSitesCss" />
Sonra MyTask düzeneğinin görevi diyoruz: Benim MsBuild dosyasında
i ile özel görev montaj dahil. Çağrı de idam fakat (aynı dizinde olmasına rağmen) MsBuild DEP1 ve DEP2 meclisleri görmediklerine hakkında şikayet edilir:
hatası: dosya veya derleme yüklenemedi 'DEP1 = 2.0.0.0, Culture, Sürüm = neutral, PublicKey Token = 9109c11469ae1bc7 'veya bağımlılıklarından biri. Sistem belirtilen dosyayı bulamıyor.
Ben dep1.dll kopyalayarak bu sorunu çözmek ve c dep2.dll edebilirsiniz: microsoft .net \ framework \ v4.0 \ \ \ pencereleri ama sorunları olduğunda tetikler çünkü bunu yapmak istemiyorum diğer projeler inşa (dep1.dll ve dep2.dll çıktı dizinine kopyalamaz ...).
Aynı sorun veya daha iyi bir çözümü olan var mı?
DÜZENLEME İşte
Fusion Günlük Görüntüleyici
*** Assembly Binder Log Entry (19/10/2010 @ 17:52:45) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = HEADOFFICE\bbaumann
LOG: DisplayName = ProjA
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: ProjA | Domain ID: 1
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///c:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = MSBuild.exe
Calling assembly : System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
WRN: Not probing location file:///d:/svn/twilight/_build/ProjA.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///d:/svn/twilight/_build/ProjA/ProjA.DLL, because the location falls outside of the appbase.
WRN: Not probing location file:///d:/svn/twilight/_build/ProjA.EXE, because the location falls outside of the appbase.
WRN: Not probing location file:///d:/svn/twilight/_build/ProjA/ProjA.EXE, because the location falls outside of the appbase.
LOG: Attempting download of new URL file:///c:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/ProjA.DLL.
LOG: Attempting download of new URL file:///c:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/ProjA/ProjA.DLL.
LOG: Attempting download of new URL file:///c:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/ProjA.EXE.
LOG: Attempting download of new URL file:///c:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/ProjA/ProjA.EXE.
LOG: All probing URLs attempted and failed.
çıkışı olan Ve bütün dll nerede olduğunu dizinde MSBuild.exe kopyalarsanız, iyi çalışıyor ..
MsBuild, Componenter dizinindeki dep1.dll ve dep2.dll dosyasını aramıyor gibi görünmüyor ... (Bu bağlantı, bir kısmı veya tamamı İngilizce olan içeriğe işaret edebilir.)
DÜZENLEME benim bağlamaları yapılır nasıl gelince
:
<ProjectReference Include="..\ProjA\ProjA.csproj">
<Project>{ED61DCC3-D759-4D44-B802-A6A46F328402}</Project>
<Name>ProjA</Name>
</ProjectReference>
ProjA
<Reference Include="dep1, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Dependencies\dep1\dep1.dll</HintPath>
</Reference>
<Reference Include="dep2, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Dependencies\dep2\dep2.dll</HintPath>
</Reference>
olası yinelenen [aynı çözeltisinden Kullanım özel MSBuild görevler?] (Http://stackoverflow.com/questions/282615/use-custom-msbuild-tasks-from-the-same-solution –
Hayır. Bağladığın konuyu gördüm. Durumunda, msbuild görev düzeneğini yükleyemez çünkü yol iyi değil. Benim durumumda, görev iyi yüklenir, ilk bağımlılık (ProjA) da ancak 2. düzey bağımlılıklar (dep1 ve dep2) değildir. –
Bu soruna * uygun * bir çözüm buldunuz mu? Sanırım şu anda aynı problemim var. – theDmi