Click here to Skip to main content
15,919,434 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
I've made a solution in Windows 10 with vs2015. This works fine in testing and editing. OK.
My problem has 3 points:
1- When I tested my app on windows 7. It runs for one minute then, got a problem (Unhandled exception).
2- When I edit it in Windows 7 with vs2010 I've problems:
a) My created from scratch controls not seen on testing, other ordinary controls seen.
b) My own controls are inherited from another base one, on editing in blend they are not shown, and got unhandled exception "Cannot create instance of my base control."
3- When I edit it in window 10 with vs2010, it works but My own controls which inherited from another base one, on editing in blend not shown, and got unhandled exception "Cannot create instant of my base control."
Can any one get help? What's happen?
Note: I want to use vs2010 and windows 7.
CHill60 22-Dec-15 11:34am    
Did you install your custom control(s) on the test machine?

In my opinion, Solution 1 (perfectly working, of course) is too radical to be practical.

I just recently down-graded the solution created in VS 2013 to 2008 and found it amazingly easy. (Not to 2010, but I'll mention it below). Here is what I done. First of all, set the projects' target version to .NET v.3.5 (you may want to use v.4.0, but I'm not sure it's really required). Make sure it compiles to the lower target version. Then I created VS 2008 solution from scratch and compared 2008 and 2013 versions in a text editor. Changing just few character with version information turned out to be enough — down-graded solution and projects immediately worked with VS 2008. In particular, those changes are in the number if Format Version for solution file and ToolsVersion XML attributes in project files. I don't remember exact detail, only remember that it was easy; you should better go this way yourself.

Try to do the same with VS 2015 and 2010. I'm sure you will find a workflow to down-grade the solution and projects. Besides, I saw a couple of (obsolete) solution for automatic down-grade on CodeProject. I am not using them anymore and don't remember which one is working better, but I remember that one of them has some serious defects. Anyway, it's not a big deal to create such tool.

Besides, I don't understand why using VS 2010 at all. First of all, if the reason is the compatibility with the target .NET version, you don't need different solution/projects; you only need to set appropriate target versions on the same projects. Starting with VS 2008, all Visual Studio versions support multi-platform build. I can understand that you need down-grading for publication, to cover more readers. But then you would need to down-grade to VS 2008 or even 2005. Also, I think that the best VS versions are 2008 and 2013/2015, and 2010 was relatively bad. These days, 2010 is pointless; I removed it from all my system but still use 2008. It was just slower then slim 2008, without any good features of 2013 and 2015. It made some sense only when it was the only Microsoft IDE to support .NET v.4.0, but these days this role is played much better by VS 2013 or 2015.

As to "unhandled exception", this issues is quite irrelevant, especially when you did not provide any exception information or any code. This is just your bug which you need to fix. Use the debugger.

Share this answer
If the project was created in VS2015, I would suspect that you cannot load a VS2015 project into VS2010 and expect everything to work perfectly.

If you "want to use VS2010 and windows 7", why did you create the project on VS2015? It's really unlikely you're going to find anyone with experience opening a VS2015 project in a 5 year old Visual Studio.

I was really suggest going back to VS2015 to debug the problem using the remote debugging tools if at all possible.

If you really want to use VS2010, then I would suggest recreating the project in 2010.
Share this answer
Sergey Alexandrovich Kryukov 22-Dec-15 12:46pm    
My 4 this time. You are right, but...
1) Down-grading of the solution and projects files is amazingly simple.
2) I doubt down-grading to VS 2010 is really needed.
Please see Solution 2.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900