Not able to get .cs file in windows phone app - windows-phone-7

I am learning windows phone app.
This
is the tut used.
It asks to modify .cs file available in solution explorer. For me I can only see .vb file. Kindly tell me how to get .cs file ?

You can write your code in 2 different types of languages, the first one is c#, the second one is visual basic.net. You created a the Project from the type vb.net.
You can safely delete this Project and create a new one, this time with C#.
You may have to give the Project another name because the old one is still on the harddrive

Related

adding .dll file to visual studio, and open in the code

Hi I currently have a uni course in f#, where i need to use a .dll file that my professor made, in my code. In this picture, the parser.dll file has a red circle around it, and the current f# file has a blue:
Now the parser.dll is a parser that i need to pass some strings to, and get some output in my f# program.
My professor is for some reason able to acces this file by simply putting the parser.dll file in the current directory. When i do this in visual studio, the .dll file is hidden in the file explorer, and i am not ablue to acces it in the code either.
Now i could read some places that it could be a good idea to create references to it in the solution explorer>add>Reference>Browse, and try to find it on my machine (tried a few different locations), it is still hidden to me in the browse tool.
What is the best thing for me to do? and why is my dll file hidden from me when I attempt to add it using the "browse feature"?
Thank you

Windows phone apps with same GUID - Creating more apps from one single app

I had made a Windows Phone 7 application. I copy pasted that same application 10 times to create 10 different applications, as the only difference in those 10 apps were the images. But now I cannot install 2 applications on emulator as they have same GUID. I tried using the GUID generator tool and replaced the product id in WMAppManifest.xml file and also the GUID in Assembly Information with the new generated GUID, but as soon as I Rebuild the solution, it goes back to the same old GUID and still replaces other app already installed with same GUID. Can anyone help me why is this happening? Am I missing something?
I got it working finally!! It might help somebody who might be stuck just like me.
The mistake I was doing was I was entering the GUID generated by the tool in UpperCase while it has to be put in "LowerCase". The GUID Generator tool in Visual Studio 2012 generates a GUID something like this: "AAB123-xxxx-xxxx-xxxxxxx" while what the WMAppManifest.xml file takes is: "aab123-xxxx-xxxx-xxxxxxx".
So the steps to change GUID of any project is as follows:
Go to www.guidgen.com
Copy the GUID.
Open Assembly Information and paste it in the GUID field (in lowercase only).
Open WMAppManifest.xml file and paste it again in the productID field (again in lowercase only)
Rebuild and deploy the solution.
To avoid the GUID issue copy the projects following next steps:
Copy the project folder
Change the name to the .csproj file
Add the copyed project to the solution: Right click on solution -> Add -> Existing
project...
Open the WMAppManifest.xml file and replace the Product ID (you can use a generator)
This works for me. If I deploy multiple projects to the phone I can see all of them ther, they're not replaced.

Share a link to a location in code (source file / line number) in Visual Studio

I'm looking for a plugin (may be a TFS plugin) for Visual Studio 2010 that add a 'Copy uri' context menu entry in code editor and would make possible to copy paste a file/line number into an IM conversation (skype) or an email, and of course clicking the link would open the project/file at the correct line number (in an existing instance if VS if possible).
I'm working from home and that would be nice to be able to share easily a code location with team via skype (and sometimes email).
I googled and found nothing, but it's perhaps available in a big plugin like Resharper and not advertised.
I wrote an extension for this. It's called CodeLink:
https://marketplace.visualstudio.com/items?itemName=AuriRahimzadeh.CodeLinktm
I'm looking for testers and feedback. I only have so many solutions with which to test it :)
There's no such extension that exist from what I know.
However it wouldn't that hard to create a VSX that adds an entry in the Source Code context menu that will get the Source Control path from the Local Path using the TFS Api then putting the result in the clipboard.
In the meantime there's no easy way to come up with a workaround as I'm not aware of a way to get the Source Control path from the Local path in Visual Studio.
Its not a plugin, but you can now add a line parameter (eg &line=1234) to a TFS file browser url, and then email that link to a colleague, it will open the file in a browser with the specified line highlighted.

how to change icon in XNA

I built a game, and I wanted to change the icon (this is a windows game.) I tried removing the Game.ico that it came with and put in another , but now it just showed the standard exe file icon. All help would be appreciated.
When changing the .ico file, right-click on your project in Visual Studio and go to Properties. Select "Application" form the list on the left. In the "Resources" section browse to the icon file that you wish to use for your game.
Note that the .ico file is only used by XNA on Windows game projects and is ignored for Xbox 360 and Windows Phone 7 games. Also note that it's often easier to edit the existing Game.ico file and make your changes to that file when possible (easier because it's already linked and is in the correct format).

WP7 app could not start for debugging

I have to create around 200 WP7 apps that are very similar. They differ only in the content, icons and name. So manually create them isn't a good idea so let's I've written a little tool, which does the following:
Copy the created template project
Copy the content files from a source directory to the copied template.
Change the app name, tile name and app id in the WMAppManifest.xml
Add the copied content files in the .csproj-file.
This works and the generated project opens error-free in Visual Studio 2010 and compiles without errors. The xap-file can be deployed on device and emulator.
The problems:
If I want to debug the app by pressing F5 in Visual Studio I get "The application could not be launched for debugging. Ensure that the target device screen is unlocked and that application is installed", both for device (which is unlocked and connected with Zune/WPConnect) and the emulator.
If I try to start the app on the emulator it closes immediatle after start. BUT if I start the app on my device it works like a charm. Crazy stuff.
The curious stuff: If I do the things which my little tool does manuelly I can debug the project from Visual Studio.
This only occures with my generated projects. Every other WP7 project (existing or newly created within VS) works and debugs error-free.
I tried to PCs: Win7 x64 with VS2010 Ultimate and an other one Win7 x64/VS2010 Pro and on both maschines I have the problem.
Maybe someone has an idea which causes the problem. Thanks for the help!
Edit: I've seen something new: The AssemblyInfo.cs file is located in the properties folder and correctly included in the csproj-file. But if I try to open the Assembly Information from the project properties all fields are empty and if I try to set them I get an error ("value is not in the expected range" or something like this).
I've got similar problem with some sample programs.
It turned out that I have to set in a Solution properties:
Active config => Debug|Windows Phone
it works for me
If they only differ in content, icons, and name, would it be simpler to make one complete app, copy it 199 times, and then just put the appropriate files into the correct directories?(if you made a tool to make templated projects, i'm sure you could do this with code too)
Plus that way if you ever need to change the program you can just recopy with that code again, but not copy the content, thus updating all of your individual 200 apps.

Resources