c#


Windows Service: Managed Compatibility Mode does not support Edit and Continue


I have been assigned to work on a Windows Service project. I installed it in my machine using installer class (ProjectInstaller.cs). I want to debug the source code and sometimes need to make changes while it is in debug mode. I attached the process via Debug menu to debug the project which works fine but it throw an error while I am trying to edit or continue the source code:
Managed Compatibility Mode does not support Edit and Continue
I googled and tried tons of solutions but none of them worked for me, couple of them are as below:
Unchecked the Use Managed Compatibility Mode from Tools -> Options
Unchecked Managed Compatibility Mode from Debug -> Attach to Process
-> Attached To -> Select...
Checked the Managed (v4.6, V4.5, V4.0) from Debug -> Attach to
Process -> Attached To -> Select...
Played with Platform target in Project Build.
Added {351668CC-8477-4fbf-BFE3-5F1006E4DB1F} field in my .csproj file
The error message varies depending on different solutions I implemented.
Below is the link I last time tried:
https://blogs.msdn.microsoft.com/visualstudioalm/2013/10/16/switching-to-managed-compatibility-mode-in-visual-studio-2013/
I am guessing: the last one didn't work because I do not have an exe project for my service instead I have implemented ProjectInstaller.cs Class and manually installed it through command prompt.
Any suggestion/recommendation are welcomed.
Edit and Continue requires many factors which are not obvious to users. Your case is simply not supported (mostly for attaching cases).
See Supported Code Changes (C#) in MSDN. In particular:
Edit and Continue is not available in the following debugging scenarios: [...]
Debugging an application that has Attach to instead of running the application by choosing Start from the Debug menu.
Attaching my process for each debug was a headache for me.
Just want to share a link that saved a lot of my time by writing a simple method and calling it in Main() method inside Program.cs.
This also gives me flexibility to edit and continue my code as simple as WinForm / Web Form. LOVE IT.
https://coding.abel.nu/2012/05/debugging-a-windows-service-project/

Related Links

How to achive this code in c# to post Xml
Not rendering controls in debug mode
How to pick a specific treenode expanded in C#
How to change the Time of the datepicker?
AccessViolationException error
Exchange Web Service (EWS) call fails under ASP.NET but not a console application
C# creating an array with in an array of objects
Add a timestamp field to a table in SQLite
How can my game have a wide icon for the start screen?
Clean value of RibbonCombobox
entity framework query, how to select more than 1 table?
What is the robust way to create continuation for already exceuting task?
Rationale behind constraining default parameters as compile-time constants
Generics used in struct vs class
Create batches in linq
How to put negative number in brackets in a Grid view [duplicate]

Categories

HOME
pact
drupal
indexing
url
twitter-bootstrap
ftp
stanford-nlp
gsm
ssh
jenkins-pipeline
postgresql-9.3
mysqli
xamarin.forms
window.open
download
thermal-printer
grid
webpack-dev-server
rtc
soap-client
ethereum
minimax
select2
ndepend
drush
console-application
infopath
owncloud
orange
printf
spring-webflow
fastboot
rvm
datastax-enterprise
scalatest
knapsack-problem
android-6.0-marshmallow
edsdk
login-required
contextmenustrip
rtos
flickr
matlab-compiler
javafxports
stochastic-process
nscollectionview
ngrok
observer-pattern
android-graphview
servicebus
risc
google-chrome-storage
spring-cloud-bus
monaca
px4
business-catalyst
wicketstuff
timex
firebase-polymer
glade
airwatch
angularfire
radar-chart
alchemy
dynamics-nav-2013
android-contentresolver
gnu-sort
angular-promise
maven-antrun-plugin
sdkman
vanilla-forums
eula
page-refresh
genero
maven-archetype
autopep8
wingdb
unityvs
conditional-comments
formbuilder
system.net
drawable
disabled-control
episerver-7
farpoint-spread
pidgin
infor-eam
db2-connect
myrrix
tlbimp
symbian3
biztalk-deployment
moonscript
volatility
orchestration
hypertable
event-propagation
filedialog
django-admin-tools
commonsware
maven-eclipse-plugin
zend-validate
webdb
rpxnow
file-icons
qlibrary
bootstrap-protocol
cstring
software-update

Resources

Encrypt Message