sharpdevelop


How to prevent variable substitution in a SharpDevelop project template


I am authoring a project template for SharpDevelop 4.1 and one of the files in this template is an XML config file which contains NLog configuration. The problem is that NLog layouts and variable substitution for the SharpDevelop template itself use the same syntax. Namely the ${time} in the layout is the problem:
<target xsi:type="File" name="file" layout="${time} ${level} ${logger} ${message}" fileName="${ProjectName}.log" />
It is intended to be output into the resulting file as is, however, the SharpDevelop template expansion is replacing it with the time the template is expanded:
<target xsi:type="File" name="file" layout="10:37 AM ${level} ${logger} ${message}" fileName="TestProject.log" />
I still need the ${ProjectName} substitution. How can I prevent or work-around the ${time} substitution?
After looking through SharpDevelop's source code in the StringParser class, it appears there is no escape mechanism for tags.
But I can work around it by modifying the NLog layout renderer so it no longer matches the SharpDevelop tag but still has the same effect in NLog:
<target xsi:type="File" name="file" layout="${time:universalTime=False} ${level} ${logger} ${message}" fileName="${ProjectName}.log" />

Related Links

The program doesn't show
SharpDevelop and DebugBreak (F12 key)
Disable code inspection in SharpDevelop
The imported project “C:\Dot42.CSharp.targets” was not found
Drawing shapes to use as controls
Using a SharpDevelop library, how do I add a reference to a project?
Foreach loop VB.Net to C# Code Conversion
How to prevent variable substitution in a SharpDevelop project template
How do I highlight syntax errors using ICSharpCode.TextEditor.TextEditorControl?
tell sharpdevelop to use unix line endings?
Active configuration for solutions SharpDevelop
Developing the mono application on Sharp Develop 3.1

Categories

HOME
joomla
skype-for-business
ckan
pyspark
service
display
c++builder
dynamic
spss
redhawksdr
squeak
ubuntu-14.04
download
mediarecorder
hibernate-mapping
virtualhost
promotions
token
theory
gcloud
aspectj
tracking
swift3.1
opendaylight
github-flavored-markdown
react-jsx
descriptor
wai-aria
apdu
aws-certificate-manager
suitescript
inspec
traveling-salesman
utc
drombler-fx
deferred
textview
pymunk
var
file-descriptor
compiled-query
jquery-ui-slider
superclass
amazon-fire-tv
piranha-cms
encoder
skype-bots
jscoverage
intermediate-language
cc
dynatable
codesniffer
spring-cloud-aws
robotc
copy-constructor
stripes
blackberry-webworks
indoor-positioning-system
init
php-java-bridge
transaction-isolation
pebble-js
web-optimization
abstract
hana-sql-script
apache2-module
google-finance-api
android-facebook
biginsights
om
dnvm
openhab
textblob
azure-mobile-app
tooltwist
eaaccessory
litedb
log-analysis
teamwork
tinymce-plugins
genome
radgrid
valdr-bean-validation
strcpy
dockerpy
gnip
tigase
powershell-v1.0
pnunit
time-frequency
twitter-finagle
sqldatasource
elixir-framework
nop
complete
randomaccessfile
myrrix
qgraphicsscene
pyxplot
kademlia
mosix
latex-suite
mmo
database-restore
django-tinymce
moonscript
invalidoperationexception
report-viewer2010
aspmenu-control
cpack
fxcopcmd
lgpl
xcdatamodel
code-golf
web-widget
script-tag
cstring
stackless

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App