I am having a program written and I am developing on 2 different pcs.
First PC: Windows 7 Professional 64bit with VS 2015 Community.
Second PC: Windows 10 64bit with VS 2013.
Problem:
On the first PC, when I build and run the program or even just run the exe, the icons for the buttons are not displaying. It shows only square boxes in place of icons. I am getting no errors either. Everything works fine on the second PC.
Any idea why this may be? I have googled and cannot seem to find an answer.
If you just copy and paste the images into the folder of your project using windows, it is unlikely that the build is gonna predict that you need this image as a part of your process.
You need to add an image item to your project using Visual Studio and set its properties (Copy To Ouput Directory => Always).
Or the best approach is go to your Project Settings > Resources and add an image resource from existing file there. And then use it inside your code using Properties.Resources.YouImageName you through the designer.
Related
It seems to me that the Default blank app from Visual Studio is not at all a blank app.
It comes with a ton of files including some xml files. When I think of a Blank App I imagine a solution without files at all. And then you can go and create your first class and so on. But in Visual Studio there it seems it doesn't behave like this. Is this just the way of the C# Environment in Visual Studio ? Or is there a way to create a real blank App?
I observe that even the Assets folder is filled with Images in the Blank App.
If you create a new Project in Visual Studio you are using Templates.
If you want the 'rocky' from scratch process just select the Empty Project.
But I won't recommend this!
The purpose of this given templates is to avoid errors, common mistakes and preventing of repeating your self. Also to setup the right hooks for debugging in the Visual Studio IDE.
Especially Universal Apps need a lot of configuration. So why trying doing all by yourself and spend a lot of hours of reading and trying if you can have the whole process in second?
As I left home for a weeks holiday I decided to quickly zip+copy a project I have been working on from my pc to my laptop. It is a c# winforms application that I have been creating on my PC using visual studio 2017 community.
My laptop however uses visual studio 2015. If I just open the project on my laptop and run it, everything is fine. However the slightest change to the form (IE anything that causes it to save?) and when I run the application half my controls now anchor off the right hand side of the screen and are out of view.
I can restore the project back to working by replacing Form1.designer file with the original from my zip and rebuilding - but again any changes after that break it in the same way. The bizarre thing is the form looks absolutely perfect IN the designer, both when opened and unchanged and after changing regardless of how it looks when the program is executing.
Completely baffled and thinking I'm going to lose a week of leisurely work - any ideas as to what may cause this? I could try installing 2017 to see if its a going backwards problem but the free wifi at my location is.. lacking.
I am working on one of our older projects that still uses Visual Studio 2010. I need to make our Winforms application auto-update, so I'm using ClickOnce. However, even though it's configured to create both a "start menu" shortcut as well as desktop shortcut, no shortcuts are created. (I am running Windows 8.1.)
Is there a work around for this?
What I've tried is as follows: I noticed that if I run the .application file directly, it does update, so it appears to be working, but I don't know if it will work properly for our customers, and I'm struggling to find relevant info online. We have customers using Windows 7 and Windows 8.
I don't understand the difference between the .application file and the shortcut that should be created. Will giving them the .application file work, or is it something totally different to the shortcut?
I am relatively new to programming and only have some experience with Python and MATLAB but was given an assignment in which I have to run and test a sample program using .NET. I'm set up with Windows 7 via VMWare running on my Macbook Pro and obviously I've got Visual Studio on the desktop.
I have a zip file of the sample program but am having trouble opening it correctly in Visual Studio. Inside the file there is a Microsoft Visual Studio Solution with the same name as the test program. When I open that I get error messages saying certain file paths are not found (which I assume means that I'm not opening the program correctly).
There are also:
a couple XML configuration files
a Visual C# Project File
Visual C# Source files
other folders entitled 'bin', 'obj', 'Properties'
Again, I know this might be a very rudimentary solution but I have been struggling with it for a few days and was hoping I might be able to find a solution here. Thanks!
If you have extracted it correctly, by double clicking on .sln file should launch the application on visual studio.
You can create new solution and import files and references.
I am doing this Robosapien Kinect project in C# ( http://www.youtube.com/watch?v=TKpO5F8LsCk ) and I zipped the code source form here https://github.com/fatihboy/Robosapien and I don't know why that when I open the KinectRopsapien project with Visual Studio 2012 and I run and debug the MainWindow.xaml.cs window, the window that should show what the Kinect is filming is not opening and there is blue bar on the bottom saying "Ready". I have Kinect for Windows SDK 1.7 installed on my computer. On the first image is a message that appears twice while the code is being debugged in which I click "Continue" (which I think is to finish debugging and I think there is no problem to continue) and the second image is what appears after the code is debugged where you can see the blue bar below saying "Ready" and when the window of what the Kinect is filming should appear, in which I have the Kinect and USB Uirt connected to my computer. So I would like to know why there is no window opening after I run the code? Thank you for your attention
img850.imageshack.us/img850/7566/13285409.png - First image img547.imageshack.us/img547/1449/31396912.png - Second image
Identical problem... XamlParseException after deploying WPF project
In this case the project was clean re-built...
However, I do think it might be deeper than that. Try: http://geekswithblogs.net/lbugnion/archive/2007/03/14/108728.aspx that at least then should give you more concrete information.
This program worked great for me in VS 2010 running .Net Framework 4.0 and debug as x86.
I can see your Debug is set as Any CPU in your screenshot. Make sure it is set as x86.