BeforeBuild를 실행해야하는 .csproj 파일에 다음 인라인 작업이 정의되어 있습니다. VS2012에서 프로젝트를 빌드 할 때MSBuild가 DLL을 작업에 참조합니다.
<UsingTask TaskName="VersioningTask" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<FileName ParameterType="System.String" Required="true" />
<XmlFileName ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Xml.dll" />
<Reference Include="System.Xml.Linq.dll"/>
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Using Namespace="System.Linq" />
<Using Namespace="System.Text" />
<Using Namespace="System.Text.RegularExpressions" />
<Using Namespace="System.Xml.Linq" />
<Code Type="Fragment" Language="cs"><![CDATA[
var xDoc = XDocument.Load(XmlFileName);
//...
나는 다음과 같은 오류 얻을 : 나는 XML 물건과 두 개의 참조를 제거하면
Could not find reference "System.Xml.dll". If this reference is required by your code, you may get compilation errors.
Could not find reference "System.Xml.Linq.dll". If this reference is required by your code, you may get compilation errors.
를 빌드가 성공합니다. 나는 DLL (% windir %/assembly)에 대한 전체 경로를 아무런 성공없이 사용하려고했습니다.
어떤 아이디어가 잘못 되었습니까?
감사합니다, 인라인 작업에 MSDN 페이지 (http://msdn.microsoft.com/en-us/library/dd722601. aspx) 잘못 끝에 .dll이 포함됩니다. – makhdumi