2012-04-20 12 views
0

私はASP.NETの初心者です。 msbuild + msdeployを使用してWebアプリケーションをデプロイするときにエラーが発生します。App_GlobalResourcesリソースはbin/App_GlobalResources.dllにコンパイルされません。

System.IO.FileNotFoundException: Could not load file or assembly 'App_GlobalResources' or one of its dependencies. The system cannot find the file specified. 

=== Pre-bind state information === 
LOG: User = NT AUTHORITY\NETWORK SERVICE 
LOG: DisplayName = App_GlobalResources 
(Partial) 
WRN: Partial binding information was supplied for an assembly: 
WRN: Assembly Name: App_GlobalResources | Domain ID: 2 
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:/inetpub/wwwroot/MyServiceApp/ 
LOG: Initial PrivatePath = C:\inetpub\wwwroot\MyServiceApp\bin 
Calling assembly : MyServiceApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. 
=== 
LOG: This bind starts in default load context. 
LOG: Using application configuration file: C:\inetpub\wwwroot\MyServiceApp\web.config 
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config 
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). 
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/MyServiceApp/b220778e/cc04677/App_GlobalResources.DLL. 
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/MyServiceApp/b220778e/cc04677/App_GlobalResources/App_GlobalResources.DLL. 
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/MyServiceApp/bin/App_GlobalResources.DLL. 
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/MyServiceApp/bin/App_GlobalResources/App_GlobalResources.DLL. 
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/MyServiceApp/b220778e/cc04677/App_GlobalResources.EXE. 
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/MyServiceApp/b220778e/cc04677/App_GlobalResources/App_GlobalResources.EXE. 
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/MyServiceApp/bin/App_GlobalResources.EXE. 
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/MyServiceApp/bin/App_GlobalResources/App_GlobalResources.EXE. 

私のMSBuildタスク:

<Target Name="Build"> 
    <MSBuild Projects="$(ProjectFilePath)" 
     Targets="Package" 
     Properties="OutDir=$(BuildDir)\;Configuration=$(Configuration);Platform=$(Platform);PackageLocation=$(WebPackageDir)\$(WebSiteName).zip"/> 
    </Target> 
... 
    <Target Name="MsDeploy"> 
    <Exec Command="$(WebPackageDir)\$(WebSiteName).deploy.cmd /Y /m:http://$(DeployServer)/MSDeployAgentService /U:$(DeployServerUser) /P:$(DeployServerPsw)" 
      ContinueOnError="false" /> 
    </Target> 

binディレクトリには、EN/MyServiceApp.resources.dll含まデ/ MyServiceApp.resources.dllなどなぜファイルのWebサーバーを検索App_GlobalResources.dll ? MyServiceApp.App_GlobalResources.Xxx.xx.resourcesファイルはobjフォルダに表示されますが、App_GlobalResourcesはbin/App_GlobalResources.dllにコンパイルされません。 どうしたのですか?

答えて

0

私はそれを理解しました。問題はEazfuscatorでした。このエラーを修正するために、私は自分のビジネスレイヤーdllから難読化されていない別のdllにリソースを移動しました。

関連する問題