Вопрос

I trying to use nant to build a solution via msbuild. The problem is the solution´s directory is:

C:\Repositorio\Proyectos Casino\SPPM\Codificación\PokerManager

as yo can see it got an specia character ó

this is my build file

<?xml version="1.0" encoding="ascii"?>
<project name="Simple" default="copy">
<property name="nantcontrib-dir"
   value="${path::combine(nant::get-base-directory(), '..\..\nantcontrib-0.85')}" overwrite="false" />

<property name="dest-dir"
   value="C:\temp\nant\table\full-release" overwrite="true" />

<property name="remote-dir"
   value="C:\temp\nant\table\full-release" overwrite="true" />


<property name="cleandir"
   value="C:\temp\nant\table" overwrite="false" />



<property name="pm-soldir"
   value ="C:\Repositorio\Proyectos Casino\SPPM\Codificación\PokerManager\PokerManager.sln" />



<loadtasks assembly=
    "${path::combine(nantcontrib-dir,'bin/NAnt.Contrib.Tasks.dll')}" 
 /> 
<target name="build-PokerManager"
        description="Builds all C# code">

<property name="nant.settings.currentframework" value="net-4.0"/>
  <msbuild project="${pm-soldir}">
    <property name="Configuration"
              value="release" />
    <property name="OutputPath" value="${dest-dir}"/>

  </msbuild>
</target>


<target name="copy" depends="build-PokerManager">
     <copy todir="${remote-dir}">
    <fileset basedir="${dest-dir}">
        <include name="**/*" />
    </fileset>
</copy>
    </target>



</project>

when i run it i get

build-PokerManager:

BUILD FAILED

C:\Juan Pablo\Release Maker\ForTablet\NAnt\table-releases.build(30,4):
'C:\Repositorio\Proyectos Casino\SPPM\Codifica
ci?n\PokerManager\PokerManager.sln' is not a valid value for attribute 'project'
 of <msbuild ... />.
    not valid characters in path..

Total time: 0.1 seconds.

i´ve tried using utf-8 and unicode but it didn´t work

Thanks in advance

Это было полезно?

Решение

I think Spudley is on the right track; Shouldn't <?xml version="1.0" encoding="ascii"?> be <?xml version="1.0" encoding="UTF-8"?>. Ascii doesn't do so well with Unicode characters...

Другие советы

UTF-8 encoding should work, but possibly something in your system doesn't like dealing with it?

In the absence of UTF-8, have you tried entity encoding?

The ó character would encode to an XML entity code of &#211;. This should work in your XML regardless of what the character encoding is.

(but don't just string replace that one character -- use a proper entity encoding function, so you can be sure you catch any other stray characters you've got lurking around, now or in the future)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top