Windows Compact Embedded Not Automatically Deployed - c#

I have a strange behavior with Visual Studio 2013 and .Net Compact Framework:
I can compile my WinCE program correctly, I can deploy it and start in debug mode by pressing F5. Everything is fine. But if I change my program and press F5 the application is compiled but not deployed, debugging starts with the old application.
(after than I can deploy the application and start it by hand, so I see it's compiled but not deployed)
If I start a new solution, add a new Visual C# project it all works correct. It worked in my working solution but not anymore. My working solution has a 'C# Class Library', 2 C# projects and 1 C++ project.
Hardware is a Toradex Ixora with Windows Embedded Compact 2013, VS 2013 Update 5.

Ah, a little embarrassing:
Right click on solution -> expand 'Configuration Properties' -> click 'Configuration'
There the checkmarks are missing for 'Deploy'

Related

Debug a dll using C# 7.0 and build from VS 2017 when consumed by a LightSwitch project that can only run on VS2013

I have a legacy LightSwitch app to work on. It only runs on VS2013 (not even VS2015).
I have a new project in VS2017 that exposes an Anti Corruption Layer library as a dll that the LightSwitch project consumes.
When debugging the LightSwitch project, I want to set breakpoints in the cs files of the livrary.
Notes:
1°) VS2013 can't load the dll symbols (even when I select them manually from Debug>Windows>Modules). It says "a matching symbol file was not found in this folder".
2°) I cannot just add the library project into the LightSwitch solution as it target net45 as well as netstandard2.0 and uses C# 7.0
3°) I tried to attach VS2017 to the running LightSwitch app but couldn't find the proper process to attach to. I tried iss and iexplorer but none worked.
Start debugger from code of your library:
System.Diagnostics.Debugger.Launch();
Simply launch your app without debugging and once it reaches the code it will offer to open VS debugger.
I used this approach to Debug managed COM libraries and you can debug even library which is called from bat file.

C# application runs but doesn't compile changes?

My .NET framework 4.6.1 console application works fine on my friends computer but after cloning the repository and running it on mine it seems to not want to compile. Everything still works the same as it did when I tried debugging and noticed it wasn't working.
Any other application I try compiles fine, this is a bug with this project only.
Extra details, as I was told I didn't example enough?
I've tried compiling it pretty much every way, clicking the Start button with the green triangle, F5, CTRL+F5 and none compile the code. It runs just as it would if it worked, it just doesn't apply changes I've made in the source code when debugging. I'm using Visual Studio 2015.
In Visual Studio, go to Build > Configuration Manager
With Active solution configuration set to Debug, make sure that your console application project has the Build checkbox ticked. This is usually ticked by default.
Otherwise you can explicitly build your project by selecting Build > Build ProjectName (Shift+F6) or right-clicking your project in the solution explorer and selecting Build from the context menu.

Visual Studio - cannot run any projects: application was unable to start correctly (0xc0000142)

Windows 10 x64
Visual Studio 2012 x32
.NET Framework 3.5 and 4.6
I cannot run/debug/F5 any projects in Visual Studio. I have tried nopCommerce, BlogEngineDotNet, File->New Website, etc. First I was getting an error about .NET 4.5 and .NET 4.0 not being registered, but I installed the fix from Microsoft (https://support.microsoft.com/en-us/kb/3002339) which resolved that issue.
Now, everytime I try to F5 I get the error below.
I've searched until I was ready to beat my head against the desk. I found a lot of posts from a few years ago saying to use dependency walker to see if any pre reqs fail, but dependency walker says its only good up to Windows 8.
I ran into this issue after I switched the "Default terminal application" to Windows Terminal. I had to restart Visual Studio and then it worked again but using Windows Terminal caused other issues so I had to revert and restart VS again.
As #Trout.Z mentioned, you may also want to enable the Automatically close the console when debugging stops option in Visual Studio. You can find it in the options under Debugging > General.
uninstall Visual Studio 2012 x32 and install new Visual Studio 2012 x64 because your os is 64 bit
above code helps you to make it working.

visual studio 2015 desktop project debugging options show only browsers

There's probably a really quick and easy solution to this but I was not able to find it in search. In a nutshell, created a windows 8.1 desktop project a while back in VS2013 on windows 10. Had to rebuild the win10 machine. Installed VS 2015 this time around. enable develop mode, crack open the same solution (project targets windows 8.1).....but my only debug options are my installed web browsers. It's as if VS has it confused as being a web app. Everything in the property pages looks correct. Any ideas?
Create a new desktop project in VS 2015, and then use a tool like winmerge or other diff tool to diff the project/solution files (your real one and the new one). That should show you what is incorrectly making VS treat it like a web project.
It was just me being a numb skull. Hadn't worked in VS in a while, had added a couple web projects to the solution right before walking away from it last, forgot to set windows 8 project as startup project. smh {-_-}

Program does not run after switching from VS2013 to VS2015

I have a solution which contains 5 C# projecst, 2 wix projects and a C project (2010). We have been developing this in VS2013 Ultimate and all has been fine. I've just tried opening the solution in VS2015, I have no errors, and no warnings. When I press the start button (F5), nothing happens. I don't even hit the first line of the Program.cs file. All it seems to do is build the project. Any ideas?
EDIT
The same project was open in both VS2013 and VS2015 at the same time as I was comparing config etc.
When I closed down VS2013, the program ran!
Not entirely sure why this occurred...
Yes the problem is indeed with running the same project in both Visual Studio 2013 and 2015 at the same time.
When you start the program, only the version of VS which was opened first will be able to run the program. This is because the first opened VS attaches the vshost.exe process to the project and denies any access to that exe, which is why the last opened version fails to attach its own vshost.exe. Thus it stops after building the solution.
The same project was open in both VS2013 and VS2015 at the same time as I was comparing config etc.
When I closed down VS2013, the program ran!
Not entirely sure why this occurred...

Categories