Visual Studio shortcut key to WFC service code behind - wcf

I am currently working in Visual Studio 2013 Update 4 in a WebForms project. For every file the shortcut key F7 will bring me to the files code behind.
However for a WFC service or .svc file that looks like:
<%# ServiceHost Language="C#" Debug="true" Service="XXX.Web.Svc.XXX" CodeBehind="XXX.svc.cs" %>
F7 does not appear to work. I have also test on a brand new project and it exhibits the same behavior.
I love my keyboard shortcuts, and I was wondering if anyone knew of one to for this, or how to set one?
I apologize in advance if this is not a question for StackOverflow, I did see other questions for Visual Studio shortcuts on here as well as a Visual Studio tag.

When right-clicking on the .svc file and selecting "View Markup", this will bring you to the actual .svc file instead of the .svc.cs. Knowing this, you can go into Tools -> Options -> Environment -> Keyboard, then search for "View.ViewMarkup" and assign a shortcut there.
More information can be found in a previous Stack Overflow question:
What is the shorcut in visual studio to switch from code behind to Xaml Code?

Related

How do I compile vb code to exe?

I have some vb code that is structured like this:
./AssemblyInfo.vb
./WindowsApplication1/AppUtils.vb
./WindowsApplication1/Form1.vb
./WindowsApplication1.Form1.resx
./WindowsApplication1.My/MyApplication.vb
./WindowsApplication1.My/MyComputer.vb
./WindowsApplication1.My/MyProject.vb
./WindowsApplication1.My/MySettings.vb
./WindowsApplication1.My/MySettingsProperty.vb
./WindowsApplication1.My.Resources/Resources.vb
./WindowsApplication1.Resources.resx
./WindowsApplication1.vbproj
I have tried several times trying to create an empty solution and then import the .vb and the .vbproj but I can not stumble on the right combination to get it to expose the build button on the menu so we can build it.
I am not a windows person so googling is difficult because the terminology is difficult to understand: Example: I use the New Project button to create a solution; that is confusing.
In short, I am hoping to get instructions that will cover:
A) Creating a new solution,
B) Importing the code listed above into the solution, and
C) Compiling the code into an .exe.
BTW: I am using Visual Studio 2008.
If you give me you best guess I will edit your answer as I try it and figure out more precise instructions.
[EDIT] When I double click on the .vbproj file on windows explorer visual studio opens and the .vbproj file is displayed as XML. No build button is shown.
[EDIT] When I do File -> Open Project... .vbproj is not listed as a supported extension so there is no way to load the project from that menu item. That menu items does not have a *.* all source option. The .vbproj file has an icon that indicates that windows knows what it is: "Visual Basic Project file". This code is the result of a decompiling an .exe of the original project where the source was lost.
[EDIT] I just followed Joel's advice, but I used VS2005 rather than VS2008 and it was able to find the .vbproj file. Does that make sense? Is there something wrong with my VS2008 that makes it not open .vbproj files or is that to be expected?
[EDIT] The version of VS that CANNOT see the .vbproj is VS2008 9.0.30729.4462. The version of VS that CAN see the .vbproj is VS2005 8.0.50727.762. By "see" I mean when I follow Joel's instructions of using File->Open Project VS will recognize the .vbproj file as something it can open.
When I double click on the .vbproj file on windows explorer visual studio opens and the .vbproj file is displayed as XML
Something is broken with file associations on your Windows system.
You can open Visual Studio first and choose "Open Project/Solution" inside Visual Studio. Doing this will makes sure Visual Studio treats it as a project file, rather than just an XML file, and will allow you to attempt to build the project.
BTW, recent versions of Visual Studio are free. You might be able to fix this by updating to a more recent version.

visual c# - Add visual web developer project as a reference

I want to create a winform/console application inside visual c# that uses class library project from visual web developer, how do I do that?
Thanks
Right-click on the references folder in the Solution Explorer pane
Click Add Reference in the menu that appears
Select the Browse tab
Browse to the file you'd like to include
Click OK
You're done! The file has been added to your references.

VB.NET Debug Button Disabled

I am using Visual Studio Ultimate. I have made a fairly long program which worked fine.
One day I find that the debug button was disabled and both the build and rebuild buttons do not work. I have tried opening the same project files in Visual Basic Express 2010 but still, the sane problem.
I don't really want to have to reinstall but I'm not even sure that that will fix the problem. Thanks in advance.
Is there a startup project? One project in the Solution Explorer should be in bold. Right-click the executable project and select "Set as StartUp Project". Additionally, open the Project Properties, Application tab, and ensure Application type is either "Windows Forms Applications" or "Console Application".
Did you try to reset the setting of your Visual Studio Ultimate?
Type: (In your visual studio command prompt)
devenv /resetsettings
Buttons disabled for just that program, or all programs?
I vaguely remember having a similar problem many years ago. Re-creating the project and solution files fixed it, I think (ie. create a new solution/project and import all the .vb files).
Another thing to check would be whether the compiled files have become read-only. Maybe VB.NET can't delete the old .EXEs
You need to build a test application. I think thats more difficult then making the application itself. In my personal opinion, your better off building the whole software in a notepad.
http://msdn.microsoft.com/en-us/library/ms182532.aspx

Intellisense stops working in VWD 2010

I'm working with VWD2010 and as stated in the topic title I have zero intellisense usability for my project.
I installed VWD2010 fresh a few months ago to start and noticed that intellisense wasn't working. For the last three months I was working with VS2010 trial and intellisense was working fine. The trial version expired, so now I am back to VWD2010.
Intellisense seems to work for NEW projects, so I created a new project and transferred all my files from the VS2010 project. Intellisense was working fine for a couple of days, but this morning I am back with it not working...
I have checked the following:
Intellisense works for new projects;
Intellisense is switched on in the editor settings;
I have reinstalled VWD2010 several times before without it making the blindest bit of difference;
I have reset settings both via the Options menu and via the command line, again without it making the slightest bit of difference.
Intellisense was definitely working for this project last Thursday evening when I last switched off my computer.
I have googled this issue several times and can't find the slightest bit of info on how intellisense is actually supposed to work. Advice generally resumes to "reinstall VWD" or "reset your settings"... Any help would be greatly appreciated.
Here is a distillation of some solutions that have worked for other users from the MSDN forum thread IntelliSense stopped working:
In Visual Studio, Go to Tools > Import and Export Settings,
and then select Reset all settings.
After closing Visual Studio, move the .suo file to a temporary
folder, and then reopen Visual Studio.
Check that Build Action property of your source files are set to
Compile rather than Content. Setting a file to Content detaches the source file from the rest of the project, disabling IntelliSense.
If you have a web project, exclude the WebConfig from the project and
rebuild the project. Then include the WebConfig.file again.
If you’re using C++, close Visual Studio, and then delete the .ncb
file. The ncb file contains IntelliSense information for C++. Deleting it resets IntelliSense, but it may take a while to rebuild in the background.
Finally, from the post Visual Studio & XAML – IntelliSense Not Working:
If you're using XAML, adding ;assembly= to the end of the custom CLR namespace fixes the issue.

Why is my Edit WCF Configuration option missing?

I created WCF RIA services. It added app.config by default. But there is no option of Edit WCF Configuration that appears when you create simple WCF services. What am i missing? How do i get that GUI tool? Do i have to write all that xml and remember for the next time when i use it?
Thanks in advance :)
This is a known bug - at times, you have to select it from the Tools menu once and close it again right away, before it becomes available as a right-click context-menu option on your app.config file.
I would have hoped this would have been fixed in Visual Studio 2010 - but it's still there...
There should be a link in the main Tools menu to the editor, or alternatively run it externally and open your app.config from it's menu.
Open Visual Studio
Go to tools
Click on Edit WCF Service Configuration
Choose Tools --> Edit WCF Service Configuration Editor
1) Open Visual Studio command prompt & type SvcConfigEditor
OR
2)Navigate to C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin\SvcConfigEditor.exe
In VS 2022, I could not locate a way to Edit Wcf configuration. Maybe I need to install more components of VS 2022 ? Anyways, I used Tools->External Tools menu item in VS 2022 to define a way to open the Wcf configuration myself.
Then hit start menu and search for 'cmd' or 'Developer command prompt' and choose the version suitable for you (e.g. 2022). Now enter :
svcconfigeditor
This opens a new window with svcconfigeditor and must succeed, or else you do not have installed Svc config editor anyways.. The tool which 'Edit wcf configuration' will open.
Next type this command :
where svcconfigeditor
This should show you the path to the executable on your system.
Locating svcconfigeditor executable on your Windows system
Go back again to Tools->Exernal Tools and hit 'Add' button
Give these values (example, last two values must be set):
Title: 'Edit Wcf configuration'
Command:
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\SvcConfigEditor.exe
Arguments:
$(ItemFileName)$(ItemExt)
Initial dir:
$(ItemDir)
External Tools - creating a edit wcf configuration tool window
Now - switch back to Solution explorer with the web.config file containing your web.config file.
Select the web.config file and choose :
Tools=>Edit Wcf configuration
Editing wcf configuration
Please note that I suspect Edit WCF configuration tools are better with older VS versions as WCF is getting replaced with