VS 2013 templates - asp.net

All the msdn documents say I should have the following template options (see image below) when trying to create a new asp.net application but for some reason the only options I have are Empty, Web Forms, and Azure Mobile Service.
Does anyone know how I might go about restoring the missing options here as I need to create a new MVC application?
EDIT: Further clarification:
When following the steps carried out here ...
http://www.asp.net/visual-studio/overview/2013/creating-web-projects-in-visual-studio
... when I get to the above dialog I do not have any mention at all of both web API and MVC.

Finally cracked it ...
For some reason the web developer tools were not installed as part of my installation (likely due to the repair that happened last week).
So if anyone else gets this the fix is as follows:
Go to control panel > programs and features
Find "Visual Studio Ultimate 2013" entry.
Right click > change.
Click on "modify"
Tick the box labelled "Microsoft Web Developer Tools" and click to continue.
After running through the setup process everything should now be in place !
Wierd ... these options were in their correct place but apparently not after the repair !

Please ..Select WebForms-> Press Below Check for MVC (This optional u can leave it for now )-> Then you wil have an option for
MVC Application
WEB API application
ASP.NET WEB Application and so on!!
If no
reinstall or run some update for VS2013 ... its corrupted installation i guess or
clear APP-DATA ,TEMP AND MYDOCUEMNTS for VS related stuff...if u have massed it while working other settings...
Cheers!

Related

How to properly update SQL database in Azure after EF Code First model of asp.net mvc model change?

It seems like I always have a variety of problems doing this, and usually I end up nuking the db out of frustration and rebuilding, but obviously there has to be some way to do this.
I have an existing asp.net mvc web app living with its sql db in azure. Works fine has some data that can be replaced but, again, the point is to learn how to update model without destroying the database.
In VS2017 I add one property public string ScreenShot { get; set; }
I make some small changes to my mvc and web api controllers to handle this extra property. I update my localdb via packmanager console and add-migration addprop and update-database. Works fine, run it locally, no probs.
Goto publish, goto settings, check update database. Click publish.
It hangs for like 5 or 6 min and I get:
Warning : A project which specifies SQL Server 2016 as the target platform may experience compatibility issues with Microsoft Azure SQL Database v12. when publishing
I try publishing several times and get the same thing. Google, look around, scratch my head, try again and it seems to publish. Site opens, and somehow I have lost my bootstrap theme. In fact in my Content folder I now have 4 files i believe are new: bootstrap-theme. (css,css.map, min.css, min.css.map) (same prefix , different suffix) as well as what I think are virgin versions of those without theme in the name, and seems to be the default mvc theme of black and white.
When I goto my app and I get an generic error and checking elmah I get:
System.InvalidOperationException: The model backing the 'TaskTrackerContext'
context has changed since the database was created. Consider using Code
First Migrations to update the database (http://go.microsoft.com/fwlink/?
LinkId=238269).
Well I really thought thats what I did. Almost forgot one thing! Maybe this is where my problem lies: I actually had to run two migrations-in addition to the model change I dropped a column that had never been used (scaffolding a controller for a DTO version of one of my models added it to my context which created a table).
I did create a new branch before making any of these change so I could just revert back but at some point I have to make this work and have to understand how to do it without destroying my db and remaking fresh.
A check in SQL object explorer shows it added the ScreenShot column to my table but didn't remove the unused table.
This works for me :
In visual Studio, go to publish settings and then select the option
Execute Code First Migration
Please see the screenshots below
Kind regards

Development and debugging in Dynamics 365

I’ve upgraded a custom model to Dynamics 365, from Ax2012. I’ve created deploy-able package and imported into an on-prem environment.
The machine on which I developed is different from the on-prem environment (TEST-env).
There is some functionality that is not working as it should, which I need to debug, and this is where I get stuck.
I’ve been developing in Ax from version 3 to 2012. I am struggling to get comfortable and find my way in Visual Studio.
In a broad sense I guess my question is: how do I debug something as simple as a button click event on a form? Can I run the form from Visual Studio and debug it there, without having to open the Dynamics 365 website?
Since my development environment and the on-prem D365 website (TEST-env) are on two different machines, is there an easy way to make changes to the code and have the TEST-env updated, or do I have to create a deployment package and import it into TEST-env for each change?
To debug, you just create a project with your objects, right click on a form and click "Set as Startup Object" then go put a breakpoint (F9) on whatever line of code, and press F5 to run.
You could connect your Test version to VSTS and do code moves that way via branch/merging.
Your development environment is an entirely isolated version meaning typically your database and the application all live on the same box and all the D365 services run from that one box. IIS is configured to run your instance so when you browser to D365 you are viewing your development environment.
Typical debugging involves placing break points in the code, normally if you know there is code behind a button click you want to break into you would find the form where the button is right-click and get the form name. Then open visual studio 2015 which is the exclusive IDE for development. Find the AOT explorer and paste in the form name. Then open the form once it is in the explorer, find the button and look at the methods, events of that and view the code. From there you can put break points and you just have to attach the debugger to w3wp.exe. Make sure you go into the options under the Dynamics 365 menu and find debugging and make sure to uncheck "Load symbols only for items in the solution" or your break point won't get unless it is something in your project.
The other option you have with debugging is to create what is called a runnable class in D365. You create a new class and add a void main entry and then right-click on the class from the solution explorer and select "set as startup object". Then you can just press the start button from visual studio and that class will fire. This allows you to easily debug scenarios where you are checking what a select in X++ returns or items like that. You can't run the D365 site from pressing start, only simple runnable classes.
Example of a runnable class in D365
class TestClass
{
public static void main(Args _args)
{
Info("hello world");
}
}

Get cannot find the master page error

I have added master page to the project. Although I can successfully run the page, it doesn't switch to design view.
It gives me errors :
1)Cannot find the master page.
2)No build providers specified for the extension (They are added in both the applications and machine's web.config).
3)Can't switch to design view. Get an error cannot find a User Control. The UserControl is an dll, provided by the client for searching employees.
Just Clean the Solutions of Project.And Buid the Application.Again Re-Build the Application.
Ctrl+Shift+B --> To Build an Solution
Go to Build --> Clean Solution
Some times the Visual Studio get the intellisense problems.This is may also Like that i think otherwise there is nothing.

What is the process involved in viewing a webservice in a browser from within visual studio?

I have created a new VS2008 ASP.Net Web service project, with the default name WebService1. If I right click on the Service1.asmx file and select 'View in Browser' what are the processes that go on to make this happen? I am asking because I have a situation where when I run this from a visual studio project started in our development shell (which sets up a common build environment) I cannot get the web service to show up in the browser.
It starts the asp.net development server and creates a single file:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\c43ddc22\268ae91b\hash\hash.web
but when I start it from a stand alone project i get a whole slew of files in here:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\edad4eee\d198cf0e\App_Web_defaultwsdlhelpgenerator.aspx.cdcab7d2.vicgkf94.dll
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\edad4eee\d198cf0e\service1.asmx.cdcab7d2.compiled
etc etc
I am trying to debug this but not really getting anywhere. i have inspected the output from VS but the only option I get is for the build output, which is basic and doesn't really contain any information that is useful. I have tried running both versions with DebugView running but no output there either.
I would like to know if there are any log files I could look at, or if anyone has any suggestions on how I might be able to debug what is going wrong here?
For completeness the output I get when it doesn't work is:
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not create type 'WebService1.Service1'.
Source Error:
Line 1:
Source File: /Service1.asmx Line: 1
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
Ok, not sure that its perfect but I found a resolution to this issue. the problems seems to be that the development shell redirects the <OutputPath> of the projects visual studio is building, and this was causing problems as, although the dependencies of the web service project were being copied into the $(ProjectDir)Bin\ directory, the actual webservice dll itself was not. The solution (workaround?) seems to be to add this to the post build event command line:
xcopy /y "$(TargetPath)" "$(ProjectDir)Bin\"
Then i am able to right click on the .asmx file and select view in browser and everything works as expected.
Hope this might help someone else in the future. or maybe even me in another place and time.

VSeWSS Administrator Privileges and <SafeControl> entry

I am trying to deploy my first custom aspx page in sharepoint:
Windows Server 2003
Microsoft Visual Studio 2008
VSeWSS 1.3
Latest Sharepoint Patches as of May 28, 2009
I am following this detailed howto:
http://geeksconnected.com/jamil/Lists/Posts/Post.aspx?ID=19
Unfortunately, it quickly becomes incomplete toward the bottom. I am running into two issues thus far:
How do you grant the VSeWSS Administrator privileges so that the "Deploy" option will work in Visual Studio?
It cuts off half of the <SafeControl> tag in the example, and I am not sure what to put after the PublicKeyToken= option. All current attempts completely break sharepoint.
Any solutions and explanations would be appreciated. Thanks in advance for any help.
Do yourself a favor and use WSPBuilder and its companion SPVisualDev instead of VSeWSS. Both of these tools are on CodePlex.com
They will take care of your safecontrols problem by adding that into the WSP file that any SharePoint administrator can install. (Frankly, modifying web.config by hand in a SharePoint environment is a big no-no in my mind, especially safecontrols)
They will also not need the elaborate 2-project spoof just to have a codebehind for an ASPX page that the article you quoted promotes. SPVisualDev will give you the option to do 'add new item' in visual studio and select a new Page or UserControl with codebehind, and take care of the deployment through WSP. Easy as!
Did you follow the instructions for post-install configuration of VSeWSS 1.3? http://blogs.msdn.com/steve_fox/archive/2009/03/18/vsewss-1-3-post-install-configuration.aspx
You probably need an account which is allowed to run stsadm.
2.The safe control tag should look like the following:
<SafeControl Assembly="[Assembly Name]" Namespace="[Namespace]" TypeName="*" Safe="True" />
To get the public key token you first have to sign the assembly (properties on the project->signing). Then you can build it and drop in the GAC (C:\Windows\assembly) and read the public key token directly in your explorer window.

Resources