Skip to main content
Home Forums Silverlight Programming Visual Studio & Silverlight Development Tools Change Language of page.xaml and app.xaml in SL-Project in Visual Studio - Solved
5 replies. Latest Post by Liversage on March 4, 2009.
(0)
Blacky
Member
0 points
14 Posts
11-10-2008 10:56 AM |
Hello,
I'm new to Silverlight, started on a project and have a problem where I have currently no idea where to look.
If I create a basic SL-Project with the Visual Studio Wizard, then load and open it, there is always the default setting for Visual Basic as language, and I would like to use C# ( I don't like VB and luckily the requirement is C# ;-) ) .
How can I change this setting ?
I am running VS 2008 with all the neccessary updates on XP pro 32 in a virtual environment ( VMWare ) , and in paralell I have the same configuration with Vista 64 Business , also in virtual.
On the Vistasystem, I get C# as Language of page.xaml ( It gives me there a page.xaml.cs ) .
The only difference between those two systems was during the first startup of visual studio ( the "layout"-question, for what kind of development VS is going to be used ) , on the XP I have chosen "General development", on Vista " C# Development" .
I have tried and changed the setting on the XP-System to C#-Development, but it did not solve the problem.
Any idea before I revert the XP to the initial state ?
Thanks alot for your help !
roland
post scriptum : helped myself by removing the blindfold from my eyes, I have completly overseen, that the default selection in the new project wizard was on "other languages - VB" and there on Silverlight.
The C# Selection fields where "hidden" and scrolled away in the list of possibilities.
bartczer...
Contributor
4172 points
730 Posts
11-10-2008 3:29 PM |
It sounds like VB.NET is your default language. Try doing this. Open VS 2008. File -> New Project. In the dialog select "Other languages"..select C# and then pick Silverlight. It should create a template for you for Silvrerlight in C#. If you do not see C# in the "other languages", you might not have C# installed in VS 2008. In that case you can pop the DVD/CD in and add C# to the languages in your installation.
WadeFlex...
377 points
82 Posts
11-14-2008 10:40 AM |
The way to fix this for all new projects is to go to the Visual Studio Command Prompt window and type: devenv /setup
This will redo the intial configuration for Visual Studio and prompt you for the type of development environment settings you want. When it does choose C# Developer setting.
This should solve the problem.
MRutkowski
14 points
10 Posts
02-05-2009 10:20 AM |
I tried the "devenv /setup" command; however, this resulted in a minute or so of disk churning after which no setup panel appeared nor did VS 2008 start (which is at SP1 level).
TerraInc...
4 points
5 Posts
02-10-2009 11:01 PM |
This answer is close to what resolved my own problem, but the instructions you give are confusing. When I open a New Project, I have to expand the selections for VC# on the left, and from there choose Silverlight... there is no option for "Other Languages" on that screen for me.
Liversage
2 points
1 Posts
03-04-2009 1:03 PM |
In Visual Studio 2008 you can change the "default" language for all new projects by using Import and Export Settings in the Tools menu to import environment settings for either Visual Basic, Visual C# or Visual C++. The selected language will appear first in the New Project dialog box and the remaining two languages will appear in the Other Languages category. Running devenv /setup will not do the trick.