I'm building a nuget package for my company MVC4 template. I have run into an issue where I need the Global.asax.cs to be modified to add these two lines:
using System.Web.Optimization;
at the top, before the namespace and
BundleConfig.RegisterBundles(BundleTable.Bundles);
at the end of the Application_Start() method
I tried creating a Global.asax.cs.pp with namespace $rootnamespace$ inside it, but that doesn't seem to work. It seems Nuget wont overwrite existing files?
My last option, as I see it, is to write a powershell script (Install.ps1?) to do this. Here's my template.nuspec
<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>
<id>Template.MVC4</id>
<version>1.5</version>
<title>MVC4 Template</title>
<description>Installs and configures files for MVC 4 application template.</description>
<authors>Me</authors>
<language>en-US</language>
<dependencies>
<dependency id="Microsoft.AspNet.Web.Optimization" />
</dependencies>
<iconUrl>http://www.someurl.com/Logo.jpg</iconUrl>
</metadata>
<files>
<file src="Template\Helpers\*" target="content\Helpers\" />
<file src="Template\Content\*.css" target="content\Content\" />
<file src="Template\Content\animGif\*" target="content\Content\animGif\" />
<file src="Template\Content\custom-theme\*" target="content\Content\custom-theme\" />
<file src="Template\Content\templateImages\*" target="content\Content\templateImages\" />
<file src="Template\Scripts\*" target="content\Scripts\" />
<file src="Template\Views\Shared\*" target="content\Views\Shared\" />
<file src="Template\Views\Home\*" target="content\Views\Home\" />
<file src="Template\Views\_ViewStart.cshtml" target="content\Views\" />
<file src="NuGetPackage\App_Start\*" target="content\App_Start\" />
<file src="NuGetPackage\Controllers\*" target="content\Controllers\" />
<file src="NuGetPackage\Helpers\*" target="content\Helpers\" />
<file src="NuGetPackage\Models\*" target="content\Models\" />
<file src="NuGetPackage\Views\*" target="content\Views\" />
<file src="NuGetPackage\*" target="content\" />
</files>
</package>
My question is 2 fold, 1) am I doing something wrong in my .nuspec? and 2) if modifying a Global.asax with .pp isn't an option, then what is the powershell script that I'd need to write to have this run automatically when this nuget is added to a project, and do I need to do anything special for it to run (reading the docs seems like just placing Install.ps1 in tools\ will do)?
Here's the answer in case someone needs it, this goes in your Install.ps1 inside the Tools folder:
param($installPath, $toolsPath, $package, $project)
# Read the transformed text from the custom template included in the package
$customGlobalAsax = $project.ProjectItems | where { $_.Name -eq "Global.asax.cs.custom" }
$customGlobalAsax.Open()
$customGlobalAsax.Document.Activate()
$customGlobalAsax.Document.Selection.SelectAll();
$replacementGlobalAsax = $customGlobalAsax.Document.Selection.Text;
$customGlobalAsax.Delete()
# Replace the contents of Global.asax.cs
$globalAsax = $project.ProjectItems | ForEach-Object { $_.ProjectItems } | where { $_.Name -eq "Global.asax.cs" }
if($globalAsax) {
$globalAsax.Open()
$globalAsax.Document.Activate()
$globalAsax.Document.Selection.SelectAll()
$globalAsax.Document.Selection.Insert($replacementGlobalAsax)
$globalAsax.Document.Selection.StartOfDocument()
$globalAsax.Document.Close(0)
}
I would take a look at WebActivator before going down the route of writing a PowerShell script to update existing source code. WebActivator is a NuGet package that you can use to add startup and shutdown code into an application without having to modify global.asax.
You will probably want to use the PostApplicationStartMethod attribute so your bundle registration is done at the end.
If you want to "replace" some text in some file you can do like this:
$file = $project.ProjectItems | ForEach-Object { $_.ProjectItems } | where { $_.Name -eq "Global.asax.cs" }
if($file) {
$file.Open()
$file.Document.Activate()
$file.Document.Selection.StartOfDocument()
$file.Document.ReplaceText("TextToFind`n", "TextToReplace")
}
Note the `n which is escaping for \n or enter (CR).
If you need quote character " it can be escaped as `" as well
In case anyone sees this thread, I want to point out that as of version 2.5 released April, 2013 Nuget will overwrite content files. If using the GUI, the install process will detect the issue and prompt whether or not to overwrite the file. A new option -FileConflictAction allows the setting of a default value.
See the release notes:
http://docs.nuget.org/docs/release-notes/nuget-2.5
Related
I have a PHP unit working on a remote interpreter perfectly.
It work in all cases without PHP Storm (I.E. using the same command in command line on the docker)
Here is the command command executed by phpstorm, and its the one i try in all situation to compare:
php /var/www/privateapi/vendor/bin/simple-phpunit --bootstrap /var/www/privateapi/tests/bootstrap.php --configuration /var/www/privateapi/phpunit.xml.dist --teamcity --cache-result-file=/va
r/www/privateapi/.phpunit.result.cache
In PhpStorm when I run tests that should communicate with database, it fails because it tries to use a MYSQL driver and I use PGSQL.
Summary:
Working cases:
In commandline, on the docker, with or without DB Tests
In commandline, outside the docker (i.e. docker exec -it ... ), with or without DB Tests
With PHPStorm, with remote interpreter, without DB Tests
Failing case:
With PHPStorm, with remote interpreter, with DB Tests
Here is my conf :
app/config/packages/test/doctrine.yaml
doctrine:
dbal:
url: '%env(resolve:DATABASE_URL_TEST)%'
driver: 'pdo_pgsql'
mapping_types:
container_mode: string
network_provider: string
sensor_status: string
notification_channel: string
server_version: 11
orm:
auto_generate_proxy_classes: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true
mappings:
App:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
app/phpunit.xml.dist
<?xml version="1.0" encoding="UTF-8"?>
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.5/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="tests/bootstrap.php"
>
<php>
<ini name="error_reporting" value="-1" />
<server name="SHELL_VERBOSITY" value="-1" />
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
<server name="SYMFONY_PHPUNIT_VERSION" value="7.5" />
<env name="APP_ENV" value="test" />
<env name="KERNEL_CLASS" value="App\Kernel" />
</php>
<testsuites>
<testsuite name="Project Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
<exclude>
<file>src/Kernel.php</file>
<file>src/Event/Listener/JsonToHtmlDevEventListener.php</file>
</exclude>
</whitelist>
</filter>
<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
</listeners>
</phpunit>
It works well with any code, but as soon as I want to test some use case with Database like this one :
app/tests/Security/Voter/OrganizationVoterTest.php
class OrganizationVoterTest extends KernelTestCase
{
private ?OrganizationVoter $voter;
private ?UserRepository $userRepository;
private ?OrganizationRepository $orgaRepository;
protected function setUp()
{
self::bootKernel();
$container = self::$container;
$this->voter = $container->get(OrganizationVoter::class);
$this->userRepository = $container->get('doctrine')->getRepository(User::class);
$this->orgaRepository = $container->get('doctrine')->getRepository(Organization::class);
parent::setUp();
}
public function testGetMinRequiredLevel()
{
$orga = $this->orgaRepository->findOneBy(['name' => 'orga1']);
[....]
}
}
I will get the following error :
Doctrine\DBAL\Exception\DriverException : An exception occurred in driver: could not find driver
/var/www/privateapi/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:106
/var/www/privateapi/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:166
/var/www/privateapi/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:154
/var/www/privateapi/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php:28
/var/www/privateapi/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:362
/var/www/privateapi/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1443
/var/www/privateapi/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:890
/var/www/privateapi/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:718
/var/www/privateapi/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:193
/var/www/privateapi/tests/Security/Voter/OrganizationVoterTest.php:32
Thanks to Jakumi, i found out that I needed to manually add the env Var DATABASE_URL_TEST.
Because I am using WSL I should use this as the host docker.for.win.localhost.
I am using WiX to build a MSI that will be used to silently install and replace templates for a customer's client environment.
This works rather good by now, but when linking the final package with light.exe, I get errors for files using äöüß.
The customer doesn't want to change these names, so I have to change the code.
Is this possible? I currently use the encoding 'windows-1252' which is usable with German. Also I don't think this is an issue in .wix, but rather later on, since there are no errors when compiling with candle.exe
Here are some of the errors. They are all rather similar and all go away if I change the name, heat.exe them and repeat the process after that.
\Folder\Installer.wxs(125) : error LGHT0103 : The system cannot find the file 'SourceDir\install\word\Vorlagenverzeichnisse öffnen.bat'.
\Folder\Installer.wxs(545) : error LGHT0103 : The system cannot find the file 'SourceDir\office12\vorlagen\intern\Protokoll-MA-Gespräch.docx'.
\Folder\Installer.wxs(569) : error LGHT0103 : The system cannot find the file 'SourceDir\office12\vorlagen\Marketing\Waben für Firmendarstellung Englisch.pptx'.
\Folder\Installer.wxs(572) : error LGHT0103 : The system cannot find the file 'SourceDir\office12\vorlagen\Marketing\Waben für Firmendarstellung.pptx'.
\Folder\Installer.wxs(767) : error LGHT0103 : The system cannot find the file 'SourceDir\office12\vorlagen\sonstiges\Hähnchenbestellung.xlt'.
\Folder\Installer.wxs(1007) : error LGHT0103 : The system cannot find the file 'SourceDir\office16\Bilder\Grafiken\nikolausmuÌ^tze.png'.
\Folder\Installer.wxs(1064) : error LGHT0103 : The system cannot find the file 'SourceDir\office16\Bilder\Grafiken\Rechner mit Zahnrädern.png'.
\Folder\Installer.wxs(1130) : error LGHT0103 : The system cannot find the file 'SourceDir\office16\Bilder\Grafiken\unabhaâ êngigkeit.png'.
This is my .wix. I changed it a bit and left out some unneeded parts:
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Name='BLABLABLA' Id='*' UpgradeCode='ValidGUID'
Language='1031' Codepage='1252' Version='1.1.1' Manufacturer='BLABLABLA'>
<Package Id='*' Keywords='Installer' Description="Something 1.0 Installer"
Comments='Nothing' Manufacturer='Selfmade Inc.'
InstallerVersion='100' Languages='1031' Compressed='yes' SummaryCodepage='1252' />
<MajorUpgrade AllowSameVersionUpgrades="yes"
DowngradeErrorMessage="More Nothing" />
<Media Id='1' Cabinet='A.cab' EmbedCab='yes' DiskPrompt="Files" />
<Property Id='DiskPrompt' Value="" />
<Property Id="MSIRESTARTMANAGERCONTROL" Value="Disable"/>
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='noone' Name='noone'/>
</Directory>
<Feature Id='Complete' Level='1'>
<ComponentGroupRef Id='A' />
</Feature>
</Product>
<Fragment>
<DirectoryRef Id="noone">
<Directory Id="..." Name="install" />
<Directory Id="..." Name="office12" />
<Directory Id="..." Name="office16" />
<Directory Id="..." Name="windows" />
</DirectoryRef>
</Fragment>
<Fragment>
<ComponentGroup Id="A">
<Component Id="..." Directory="..." Guid="AnotherValidGUID">
<File Id="..." KeyPath="yes" Source="SourceDir\install\word\Vorlagenverzeichnisse öffnen.bat" />
</Component>
<!--Many More Components-->
</ComponentGroup>
</Fragment>
<!--Also Directories also as Fragments-->
</Wix>
Edit:
#BrianSutherland gave me the final push to the solution.
I changed the Codepages for both Product and Package, which turned out to one step too much.
All it needed is to change the product's codepage.
So my final WiX-Script starts like this:
<?xml version='1.0' encoding='utf-8'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Name='BLABLABLA' Id='*' UpgradeCode='ValidGUID'
Language='1031' Codepage='utf-8' Version='1.1.1' Manufacturer='BLABLABLA'>
<Package Id='*' Keywords='Installer' Description="Something 1.0 Installer"
Comments='Nothing' Manufacturer='Selfmade Inc.'
InstallerVersion='100' Languages='1031' Compressed='yes' SummaryCodepage='1252' />
I'm having a integrated environment with TFS BuildServer + TestControler + Several TestAgents.
Previously I used a *.testsettings file and define the remote server under Roles.
I update the BuildServer to VS2013 and introduced SpecRun for test executions.
As i'm having a custom *.srprofile file for TFS, I have to use a .runsettings file instead of .testsettings file.
I can not find a tag where i can define "Remote Controller name" in .runsettings file.
Is there a way to include 'Remote Controller name' in *.runsettings file??
I'm very new to Build Configurations. Any insight highly appreciated.
Additional Details:
I found this article and defined the .testsettings file path inside the .runsettings file. Following are the changed files according to the article.
But It's not working.
May be SpecRun Adaptor do not support tag.
TestSettings file i used.
<?xml version="1.0" encoding="UTF-8"?>
<TestSettings name=".........." id="........." xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Description>Remote settings for running the tests on.....</Description>
<Deployment>
....
</Deployment>
<RemoteController name=".....local:6901" />
<Execution location="Remote">
<TestTypeSpecific>
<UnitTestRunConfig testTypeId=".....">
<AssemblyResolution>
<TestDirectory useLoadContext="true" />
</AssemblyResolution>
</UnitTestRunConfig>
</TestTypeSpecific>
<AgentRule name=".....">
</AgentRule>
</Execution>
<Properties />
</TestSettings>
Sample *.runsettings file i'm using now.
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<!-- Configurations that affect the Test Framework -->
<RunConfiguration>
<!-- Path relative to solution directory -->
<ResultsDirectory>......</ResultsDirectory>
</RunConfiguration>
<SpecRun>
<Profile>TFS.srprofile</Profile>
<ReportFile>TestResults.html</ReportFile>
<GenerateSpecRunTrait>true</GenerateSpecRunTrait>
<GenerateFeatureTrait>false</GenerateFeatureTrait>
<SettingsFile>.....\Remote.AutoTest_2013.testsettings</SettingsFile>
<ForcedLegacyMode>true</ForcedLegacyMode>
</SpecRun>
</RunSettings>
OK, I think the mistake you've made is to use the runsettings file. You specify it in the testsettings file instead. Ours looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<TestSettings name="RemoteTest" id="9cfa5873-0238-4d56-a1ec-079192fa72c8" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Description>Settings set up to run remotely through test controller</Description>
<RemoteController name="**YOURCONTROLLERMACHINE**" />
<Execution location="Remote" hostProcessPlatform="MSIL">
<TestTypeSpecific>
<UnitTestRunConfig testTypeId="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b">
<AssemblyResolution>
<TestDirectory useLoadContext="true" />
</AssemblyResolution>
</UnitTestRunConfig>
</TestTypeSpecific>
<AgentRule name="AllAgentsDefaultRole">
</AgentRule>
</Execution>
<Properties />
</TestSettings>
You then call this from the command line, passing in the testsettings path:
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "C:\blahblah\TestsAssembly.dll" /Logger:trx /settings:C:\DummyTests\Remote.testsettings /Platform:x64
Where TestsAssembly.dll contains the tests you want to run, and Remote.testsettings is as above. The resultant .trx file appears in \TestResults...
You shouldn't need the runsettings file at all.
We have our shared Ivy repository on an nginx web server reachable within our intranet.
I configured a url resolver to read from the shared repository and an ssh resolver to write to it, mostly following Jason Grimes' excellent blog post on managing dependencies in non-Java projects.
Now I just successfully published a module to the repository via the ssh resolver.
In my SFTP client I can see the directory structure and files sitting in the directory served by the web server:
com.organization/modulename/ivy-modulename-2.0.1.xml.md5
com.organization/modulename/ivy-modulename-2.0.1.xml.sha1
com.organization/modulename/ivy-modulename-2.0.1.xml
com.organization/modulename/modulename-2.0.1.zip.md5
com.organization/modulename/modulename-2.0.1.zip.sha1
com.organization/modulename/modulename-2.0.1.zip
However, when I execute ivy:listmodule it doesn't seem to find it. Frankly, it doesn't output anything apart from the ivysettings initialization output.
This is the Ant target I am executing:
<!-- ================================
target: check-already-in-repo
Check if the current version of a module already exists in the (shared) repository.
================================ -->
<target name="check-already-in-repo">
<ivy:listmodules resolver="shared" organisation="${ivy.organisation}" module="${ivy.module}" revision="${version}" property="already-in-repo" value="true"/>
<ac:if>
<isset property="already-in-repo"/>
<then>
<echo>${ivy.module} ${version} already exists in the repository.</echo>
<echo>Skipping publishing of ${ivy.module}.</echo>
</then>
</ac:if>
</target>
And this is the only output:
$ ant check-already-in-repo -Dversion=2.0.1 -Divy.organisation=com.organization -Divy.module=modulename
Buildfile: [...]/build.xml
check-already-in-repo:
[ivy:listmodules] :: Apache Ivy 2.4.0-rc1 - 20140315220245 :: http://ant.apache.org/ivy/ ::
[ivy:listmodules] :: loading settings :: file = [...]/build/ivysettings.xml
BUILD SUCCESSFUL
Total time: 0 seconds
I checked the value of ivy.shared.default.root and the corresponding ivy and artifact patterns and they're all matching (I kept them simple).
I tried it with the glob matcher and called ivy:listmodules with organization=*, module=* and revision=*, so it should in every case return something. Which it doesn't.
What do I miss?
Here's the rest of the relevant config:
<ivysettings>
<!-- This file is referenced from multiple projects - DO NOT EDIT! -->
<!-- shared -->
<property name="ivy.shared.default.root" value="http://10.79.1.30/ivy"/>
<property name="ivy.shared.default.ivy.pattern" value="[organisation]/[module]/ivy-[module]-[revision].[ext]"/>
<property name="ivy.shared.default.artifact.pattern" value="[organisation]/[module]/[artifact]-[revision].[ext]"/>
<!-- local -->
<property name="ivy.local.default.root" value="${ivy.default.ivy.user.dir}/local"/>
<property name="ivy.local.default.ivy.pattern" value="${ivy.shared.default.ivy.pattern}"/>
<property name="ivy.local.default.artifact.pattern" value="${ivy.shared.default.artifact.pattern}"/>
<settings defaultResolver="default"/>
<resolvers>
<filesystem name="local">
<ivy pattern="${ivy.local.default.root}/${ivy.local.default.ivy.pattern}" />
<artifact pattern="${ivy.local.default.root}/${ivy.local.default.artifact.pattern}" />
</filesystem>
<!-- read access -->
<url name="shared">
<ivy pattern="${ivy.shared.default.root}/${ivy.shared.default.ivy.pattern}" />
<artifact pattern="${ivy.shared.default.root}/${ivy.shared.default.artifact.pattern}" />
</url>
<!-- write access -->
<ssh name="ssh" host="10.79.1.30" port="22" user="ivy" userPassword="${ivy.ssh.password}" publishPermissions="0664">
<ivy pattern="${ivy.shared.default.ivy.pattern}" />
<artifact pattern="${ivy.shared.default.artifact.pattern}" />
</ssh>
<chain name="default" returnFirst="true">
<resolver ref="local"/>
<resolver ref="shared"/>
</chain>
</resolvers>
</ivysettings>
After executing the Ant target with the -d (debug) option something caught my eye:
$ ant check-already-in-repo -Dversion=2.0.1 -Divy.organisation=com.organization -Divy.module=modulename -d
[...]
[ivy:listmodules] using shared to list all in http://10.79.1.30/ivy/
[ivy:listmodules] HTTP response status: 403 url=http://10.79.1.30/ivy/
[ivy:listmodules] CLIENT ERROR: Forbidden url=http://10.79.1.30/ivy/
[ivy:listmodules] HTTP response status: 403 url=http://10.79.1.30/ivy/
[ivy:listmodules] CLIENT ERROR: Forbidden url=http://10.79.1.30/ivy/
[ivy:listmodules] problem while listing resources in http://10.79.1.30/ivy/ with shared (java.io.IOException: The HTTP response code for http://10.79.1.30/ivy/ did not indicate a success. See log for more detail.)
[ivy:listmodules] java.io.IOException: The HTTP response code for http://10.79.1.30/ivy/ did not indicate a success. See log for more detail.
[...]
It seems for listmodules to work, the web server needs to have directory listings enabled. And indeed, after adding
location /ivy {
autoindex on;
}
to the nginx config and restarting the web server it finally worked as expected!
$ ant check-already-in-repo -Dversion=2.0.1 -Divy.organisation=com.organization -Divy.module=modulename
Buildfile: [...]/build.xml
check-already-in-repo:
[ivy:listmodules] :: Apache Ivy 2.4.0-rc1 - 20140315220245 :: http://ant.apache.org/ivy/ ::
[ivy:listmodules] :: loading settings :: file = [...]/build/ivysettings.xml
[echo] modulename 2.0.1 already exists in the repository.
[echo] Skipping publishing of modulename.
BUILD SUCCESSFUL
Total time: 0 seconds
Hooray! :-)
I have an ant file which updates the data in ant file due this ini file gets updated and at the top it has a comment as follows
#Thu, 07 Jul 2011 06:54:54 -0500
I don't want this comment as i am accessing this file by php using parse_ini. Due to this comment i get an failure
Comments starting with '#' are deprecated in build.ini on line 1
so is there any way so that i will not get the comment in ini file.
Thanks.
EDIT:
<propertyfile file="build.ini">
<entry key="build-number" type="int" operation="+" value="1" />
</propertyfile>
this updates my ini file build-number by +1
Martin's comment points you to a way to remove comments using replaceregexp. (I was about to show you a similar idea but using move, filterchain and striplinecomments. But the replaceregexp is more compact.)
The other suggestion I have is that since you are editing ini files, maybe you should use a task dedicated to that, rather than using the PropertyFile task. There is an IniFile taks in ant-contrib might do the job.
If the replaceregexp doesn't work for you because your file has other # comments in it and you only want to remove that top line, then try this:
<target name="test">
<propertyfile file="test.properties">
<entry key="key" value="value"/>
</propertyfile>
<move file="test.properties" tofile="test.properties.tmp">
<filterchain>
<headfilter lines="-1" skip="1"/>
</filterchain>
</move>
<move file="test.properties.tmp" tofile="test.properties"/>
</target>
Output:
$ cat test.properties
one=1
# existing comment
$ ant
Buildfile: C:\tmp\ant\build.xml
test:
[propertyfile] Updating property file: C:\tmp\ant\test.properties
[move] Moving 1 file to C:\tmp\ant
[move] Moving 1 file to C:\tmp\ant
BUILD SUCCESSFUL
Total time: 0 seconds
$ cat test.properties
one=1
# existing comment
key=value