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
c#
drupal
classification
url
network-programming
ldap
packet
wifi
weblogic
casting
highmaps
conceptual
ubuntu-14.04
esxi
artifactory
localhost
msbi
css-selectors
powerquery
samsung-gear-s2
urllib2
decoding
adroitlogic
tracking
tmux
popup
pylint
css-float
ofbiz
cucumberjs
md2
novacode-docx
gpo
descriptor
gnu-screen
screen-scraping
infinite-loop
ballerinalang
formtastic
workflow-foundation
keil
qt-designer
powerbi-embedded
javafxports
iterm2
lex
scalamock
python-venv
amazon-fire-tv
logan-square
weld
google-chrome-storage
spring-cloud-bus
beanshell
jcifs
bioperl
typewriter
opticalflow
cc
try-catch-finally
suitesparse
group
portaudio
mongodb-3.3
x12
xcode7.1
hotkeys
diameter-protocol
django-celery
apache2-module
ruby-1.8.7
mojolicious
windows-kernel
javapackager
gulp-cdnizer
php-gd
cloud-storage
targetprocess
valdr-bean-validation
pymol
qxorm
agent-based-modeling
msdropdown
kohana-orm
reference-manual
rbm
gpl
ncml
shapado
waveout
django-admin-tools
httppostedfilebase
flexbuilder
backlight
hwnd
cryptolicensing
html5-animation
javah
rollover
table-valued-parameters
jquery-attributes
large-data-volumes
retrospectiva
content-delivery-network
jgrowl

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