I am trying to replicate one coding example in Visual Studio and I see that in a form there are some resx files.
I am trying to put a resx file into my form as well so I created a new resource file but as I try to move it on the form in solution explorer i get an error saying i cannot do that ("destination folder is the same as the origin")
I am new to Visual Basic so maybe I am missing something but where am I doing wrong?
Rename the copy of folder and files because two folders with same name can not exist at same place.
Copy file to outside anyway rename and again paste there.
Related
my problem is :
I have a VB .NET project, with an installation project made with the old poor "Visual Studio Installer".
The version of Visual Studio I'm currently using is 2015.
Now I need to insert into the installer project a huge amount of file, from different directories,
and the IDE doesn't let me to add multiple files in subdirectories, with a simple "copy and paste into".
Apparently, I have to manually create, into the file system, every sigle directory that I want to have in the final installation.
I've already did a little program that inserts those files programmatically into the main project file (.vbproj), that's simply an xml file, but the .vdproj file seems more "tricky" do manage,
it contains GUID numbers, as 9F6F8455-1EF1-4B85-886A-4223BCC8E7F7 that I'm not sure I'd want to tangle with.
Anyone has ever dealt with a problem like this?
I solved by myself.
Simply I was wrong, you can actually copy the directories you want to add, from a file explorer windows, and then paste it into the File System Windows of the installation project.
Anyway, I think I'm leaving here this question, in case anyone else would need that.
I have a trayicon in my WPF App. When I was debugging in Visual Studio, it works well:
System.Windows.Forms.NotifyIcon ni = new System.Windows.Forms.NotifyIcon();
ni.Icon = new Icon("../../logo,ico");
But after I published it, the App threw an exception saying it could find the path of the image of the trayicon. I've search a lot resources on online, I saw many solutions use pack, but it seems pack only accept Uri variable and the path for trayicon must be string. I also tried to create a folder called Resource under the project solution and put the image file into it. This was the same: worked while debugging but would not work after publishing..
So based on #WPF Germany's suggestion, I solved the path issue after publishing the App by Clickonce. However, if I copy a App shortcut to system startup folder, it would find the ico in C:\WINDOWS\system32, which is not easy to workaround since systems32 usually requires admin right to access. Any idea for that?
Did you check, that your logo.ico file is copied to output path?
In VS you have multiple options to provide your Resource files.
First option:
Select your logo.ico file in solution explorer and choose None as Build Action and Copy always at Copy to Output Directory (at file properties).
After compiling you will find the file in a subdirectory of our OutputPath.
use (if logo.ico is placed in your projects root):
ni.Icon = new Icon("logo.ico");
other option:
Use Resource as Build Action and build your Icon using a Stream created from Resources.logo...
I have been making a simple program on my computer using Dr. Java, and I would like to know how to move it to my android on AIDE. I can easily get the files onto the android, I just can't figure out how to make AIDE compile and run them.
Thanks!
Using My Files or the file browser you prefer, move your entire project directory into a folder call AppProjects. Should be fairly easy to open from there. Also you will want to make sure the directory is set up correctly. If all else fails, you can always recreate the project using AIDE and copy your java files into the java folder and XML files into the layout folder, and your images and icons into the drawable folders. These folders are automatically generated by AIDE so you don't have to create them.
You can copy the source files normally as you do with other files but Desktop's Java is not always same as Android's. So it needs some more coding and editing to make the code work as you want. But if the code is so simple, it can work.
I'm relatively new to VS (only used it once before for a simple project) and all I want to do is create a new C file for my project. When I go to add file to the project I created, the only available language option I'm remotely familiar with is C++. I chose that and tried saving the file as a regular C file, which VS let me do, but it saved it as a separate file outside of my project. Is there a way I can add this C file to my project? I've tried playing around with some of the options and I can't seem to find a way.
On Solution Explorer, Click on the Source Files folder. Press Shift + Alt + A to add an existing item to the sources folder. Then just choose your .c file.
Works for me.
Right click on the Source Files folder from Solution Explorer -> Add -> Existing Item ... and choose your file.
I don't have a copy of VS handy at the moment and cannot check, but I believe it should be possible to create a new .c source file. What you can do for sure is to create your .c file outside of VS and then drag it into the solution explorer. Always works.
I had to rebuild a project in my application.
I created a new project, created each file, and copied the contents of each file into the new project one at a time making all the necessary changes.
Now when I try to compile the project, it gives me three errors:
The metafile c:\projects\project1\CustomerModule\bin\Debug\CustomerModule.dll could not be found.
Application Definition Element could not be given by the library project file.
The project file has invalid properties.
Clicking any of these does nothing.
What are these errors telling me? What do I need to change to get my application running again?
New info: If I do a "rebuild" on just the project, I only get the second two errors, so these seem to be the original issue, but what is the library project file and what properties are invalid?
I found the answer on this forum question.
Basically the thing I did wrong was copy images from a directory in one module to a directory in another module within the Solution Explorer. Don't do this. Instead, copy them from the Windows Explorer into the Solution Explorer, then everything works fine.
Click add a reference and browse for the dll file you want to use.
You may have to rebuild the dll for it to work.